tag — bash script for writing music tags to html
title: «tag — bash script for writing music tags to html» date: «2026-05-11 17:47»
🎵 Music Folder to Fancy HTML Page — Script Summary for Beginners
This script takes a folder full of audio files (like .mp3, .flac, .mka, etc.) and automatically creates a beautiful HTML table inside that same folder. The table shows the Artist, Song Name, Duration, Bitrate, Codec, and File Extension for each song.
The result is a dark, stylish page with a black background and electric neon pink text – perfect for sharing, viewing, or just keeping track of your music collection.
🚀 How to use it
- Save the script Copy the script into a plain text file, for example musictable.sh.
- Make it runnable Open a terminal in the same folder and type: chmod +x musictable.sh
- Run it on your music folder ./musictable.sh /path/to/your/music It will create a file named after the folder (e.g., MyAlbum.html) inside that folder.
🔧 What you need
· mediainfo installed on your computer (most systems have it or you can install it from your app store/package manager). · The script works even without jq, but jq is recommended for nicer results.
✨ Options (extra features)
· Show what’s happening while it runs ./musictable.sh -v /path/to/music · Save a log file ./musictable.sh -o mylog.txt /path/to/music · Combine both ./musictable.sh -v -o log.txt /path/to/music
🎨 What you get
· A complete HTML page with a black background and neon pink text. · Each song in a clean row of a table. · The artist name is automatically extracted, even for Matroska (.mka) files. · Bitrates are shown as 320 kbps style, easy to read. · Special characters (like &, <, Japanese or emoji) are displayed safely.
💡 Example
If you have a folder called Summer Hits with songs, just run:
./musictable.sh "Summer Hits"
Open Summer Hits.html in any web browser and enjoy the view!
📁 No advanced terminal skills needed – just copy, run, and double‑click the resulting HTML file.