Cleanup
* Modernize java-script * Add CSP meta tag * Minor refactor * Add Makefile to update bootstrap css * Fix filename in dummytdl tool
This commit is contained in:
@ -4,22 +4,28 @@ import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
// Dummy tool to replace youtube-dl when testing
|
||||
// Pass -ytdlcmd "go run cmd/dummytdl/main.go"
|
||||
|
||||
func main() {
|
||||
var op string
|
||||
var title string
|
||||
flag.StringVar(&op, "output", "", "path to save file")
|
||||
flag.StringVar(&title, "get-title", "", "title")
|
||||
flag.Bool("newline", false, "sdlkfjdslkfj")
|
||||
flag.Bool("newline", false, "print update as lines")
|
||||
flag.Parse()
|
||||
|
||||
if title != "" {
|
||||
time.Sleep(2 * time.Second)
|
||||
fmt.Println("Dummy title")
|
||||
return
|
||||
}
|
||||
|
||||
op = fmt.Sprintf("%s.mp4", strings.TrimSuffix(op, ".%(ext)s"))
|
||||
os.WriteFile(op, []byte("slkfjsdlkfdjkfj"), 0644)
|
||||
i := 0
|
||||
for range time.Tick(1 * time.Second) {
|
||||
|
Reference in New Issue
Block a user