build.sh -> build.go for better cross platform support

This commit is contained in:
Jakob Borg
2014-08-18 21:38:22 +02:00
parent 2f055a75a0
commit 4f92482294
3 changed files with 456 additions and 2 deletions

View File

@@ -81,10 +81,16 @@ func main() {
}
fd.Close()
doc, err := html.Parse(os.Stdin)
fd, err = os.Open(os.Args[2])
if err != nil {
log.Fatal(err)
}
doc, err := html.Parse(fd)
if err != nil {
log.Fatal(err)
}
fd.Close()
generalNode(doc)
bs, err := json.MarshalIndent(trans, "", " ")
if err != nil {