A literate programming tangler written in Go
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
447 B

package main
import (
"fmt"
"os"
"log"
"codeberg.org/josias/retangled/parser"
"codeberg.org/josias/retangled/tangler"
)
func main() {
if len(os.Args) == 1 {
fmt.Println("Usage: retangled FILE")
return
}
file, err := os.Open(os.Args[1])
if err != nil {
fmt.Println("Error opening file", os.Args[1], err);
}
blocks, err := parser.Read(file)
if err != nil {
log.Fatal(err)
}
fmt.Println(blocks)
tangler.Tangle(blocks)
}