2 Commits

Author SHA1 Message Date
6b24eb7e07 Todo 2024-09-04 01:48:43 +02:00
b8c7234ed9 Embed html files in compiled executable 2024-09-04 00:06:35 +02:00
2 changed files with 12 additions and 2 deletions

View File

@ -37,3 +37,9 @@ To process a file directly from the command line:
```
This will download the file and save it in the base directory specified in the config.
## TODO
- Filename Sanitation (Makes new directory on /... oops)
- GoPlay Fix
- Windows?
- Proper UI?

View File

@ -16,6 +16,8 @@ import (
"sync"
"time"
"embed"
"github.com/BurntSushi/toml"
)
@ -60,12 +62,14 @@ type ProgressInfo struct {
var templates *template.Template
var templateFS embed.FS
func init() {
if err := os.MkdirAll(uploadDir, 0755); err != nil {
fmt.Printf("Error creating upload directory: %v\n", err)
}
templates = template.Must(template.ParseGlob("templates/*"))
templates = template.Must(template.ParseFS(templateFS, "templates/*"))
}
func main() {