A command-line tool for handling .m3u / .m3u8 playlists.
This utility helps with handling playlists that contain:
- nested playlists
- directories
- relative or absolute paths
- comments and metadata
Go to the latest release
Download the .whl file
Install:
pip install file.whlor
pipx install file.whlCommands:
print
export
Displays the structure of a playlist as a tree.
m3u-tools print <file>--absolute
Display file paths as absolute paths.
--relative-root
Display paths relative to the root playlist.
--relative-parent
Display paths relative to the parent playlist/directory.
--expand-playlist
--shrink-playlist
Expand or collapse nested playlists.
--expand-dir
--shrink-dir
Expand or collapse directories referenced in the playlist.
--display-empty
Show empty lines.
--display-comment
Show comment lines.
--display-extinf
Show #EXTINF metadata.
Exports a processed playlist to a new .m3u or .m3u8 file.
m3u-tools export <file> <export-path>--absolute
--relative
Choose whether exported paths should be absolute or relative.
(Default: relative)
--flatten-playlist
Write out the contents of nested playlists instead of referencing them.
--flatten-dir
Write out files inside referenced directories.
--remove-empty
Remove empty lines.
--remove-comment
Remove comment lines.
--remove-extinf
Remove #EXTINF metadata.
MIT License