This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| projects:cm3us [2026/05/11 16:20] – created - external edit 127.0.0.1 | projects:cm3us [2026/06/12 07:01] (current) – edml | ||
|---|---|---|---|
| Line 6: | Line 6: | ||
| So no editing from cmus which I would seldom do anyway | So no editing from cmus which I would seldom do anyway | ||
| - | # android m3u file ---[cm3us]---> | + | 1. On cmus start call cm3us |
| - | 1. On cmus start call cm3us (somehow) | + | 2. For every playlist in ~/ |
| - | 2. For every playlist in ~/Documents/Sync/ | + | |
| 3. Save output to ~/ | 3. Save output to ~/ | ||
| - | sed 's/\/storage\/ | + | ```bash |
| + | #!/bin/bash | ||
| + | # convert android m3u playlist to cmus playlist | ||
| + | # cmus playlists location | ||
| + | CMUSDIR="/ | ||
| + | # m3u playlists location | ||
| + | M3UDIR="/ | ||
| + | # cmus music library | ||
| + | CMUSPATH="/ | ||
| + | # m3u music library on android | ||
| + | M3UPATH="/ | ||
| + | |||
| + | # m3u to cmus playlist | ||
| + | for pl in $M3UDIR*; | ||
| + | do | ||
| + | # sed ' | ||
| + | |||
| + | tmp=$(mktemp) | ||
| + | plname=" | ||
| + | cmuspl=" | ||
| + | while IFS= read -r s; do | ||
| + | s=${s//" | ||
| + | printf ' | ||
| + | done < " | ||
| + | mv " | ||
| + | done | ||
| + | ``` | ||