Skip to content

Instantly share code, notes, and snippets.

@themasch
Forked from tobybaier/mkindex.sh
Last active December 17, 2015 13:10
Show Gist options
  • Save themasch/5615514 to your computer and use it in GitHub Desktop.
Save themasch/5615514 to your computer and use it in GitHub Desktop.
Tweaked tobybaiers version of his mkindex.sh file a little bit. There might me room for more improvments but i'm by far not a sh wizard. (Add <ul>
#!/bin/sh
for i in $1/*.mp3;
do
file=$(basename $i)
echo "<li><audio preload='none' controls='controls'><source src='$file' type='audio/mp3'/></audio> <a href='$file'>download $file</a></li>" >> "$1/index.html";
done;
echo "<li><a href='$1'>$1</a></li>" >> index.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment