mirror of
https://github.com/Evidlo/remarkable_printer.git
synced 2024-10-19 19:17:37 -04:00
add an additional .content file, see issue #23
This commit is contained in:
parent
52f31746ab
commit
2da4b179ae
13
main.go
13
main.go
|
@ -37,6 +37,11 @@ const METADATA_TEMPLATE = `{
|
|||
}
|
||||
`
|
||||
|
||||
const CONTENT_TEMPLATE = `{
|
||||
"fileType": "pdf"
|
||||
}
|
||||
`
|
||||
|
||||
|
||||
func main() {
|
||||
|
||||
|
@ -171,5 +176,13 @@ func handleRequest(conn net.Conn) {
|
|||
f.WriteString(fmt.Sprintf(METADATA_TEMPLATE, time.Now().Unix(), title))
|
||||
f.Close()
|
||||
|
||||
// ----- Create .content -----
|
||||
|
||||
cont_path := XOCHITL_DIR + u.String() + ".content"
|
||||
fmt.Println("Saving content file to", cont_path)
|
||||
f, err = os.Create(cont_path)
|
||||
f.WriteString(fmt.Sprintf(CONTENT_TEMPLATE))
|
||||
f.Close()
|
||||
|
||||
conn.Close()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue