26 lines
452 B
Go
26 lines
452 B
Go
package main
|
|
|
|
import (
|
|
"flag"
|
|
"fmt"
|
|
"git.wntrmute.dev/kyle/goutils/die"
|
|
"os"
|
|
"path/filepath"
|
|
thread2 "thread2md/thread"
|
|
)
|
|
|
|
var janAIPath = filepath.Join(os.Getenv("HOME"), "jan", "threads")
|
|
|
|
func main() {
|
|
var path string
|
|
flag.StringVar(&path, "path", janAIPath, "path to thread directory")
|
|
flag.Parse()
|
|
|
|
for _, arg := range flag.Args() {
|
|
thread, err := thread2.LoadThread(filepath.Join(path, arg))
|
|
die.If(err)
|
|
|
|
fmt.Println(thread)
|
|
}
|
|
}
|