Commit cd6d3b9
Changed files (3)
templates/playlist.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta http-equiv="X-UA-Compatible" content="ie=edge">
+ <title>{{ .Title }}</title>
+ <link rel="stylesheet" href="style.css">
+ </head>
+ <body>
+ <h1>{{ .Title }}</h1>
+ <audio controls>
+ <source src="" type="audio/ogg">
+ </audio>
+ <ol>
+ {{ range $index, $item := .Tracks }}
+ <li>
+ {{ $index }}
+ <a href="">{{ .Details.Title }}</a>
+ -
+ <a href="">{{ .Details.Artist }}</a>
+ ({{ .Details.Duration }})
+ </li>
+ {{ end }}
+ </ol>
+ <script src="index.js"></script>
+ </body>
+</html>
+
mixtape.go
@@ -36,6 +36,7 @@ func main() {
var combined *wav.WAV
for i, t := range pl.Tracks {
+ fmt.Printf("processing track %02d %s\n", i, t.Details.Title)
tPath := filepath.Join(playlistDir, t.Filename)
track, err := wav.ReadWAV(tPath)
@@ -73,6 +74,7 @@ func main() {
}
+ fmt.Println("compiling mixtape")
mixtapeWav := "mixtape.wav"
mixtapeWavPath := filepath.Join(playlistDir, mixtapeWav)
err = combined.WriteFile(mixtapeWavPath)
README.md
@@ -22,9 +22,9 @@ go run mixtape.go {{ path to playlist.json }}
- [x] get playlist details into JSON
- [x] playlist title
- [x] run yt-dlp on a playlist.json
-- [ ] progress details mixtape.go
-- [ ] make cobra-cli with subcommands
+- [x] progress details mixtape.go
- [ ] create html page for each playlist
+- [ ] make cobra-cli with subcommands
- [ ] create header image for each playlist
- [ ] publish into cloudflare R2