Last active
April 10, 2021 20:08
-
-
Save orhun/eda9701e357b625c2bada19563872715 to your computer and use it in GitHub Desktop.
Random MOD player
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Plays a random MOD file from https://modarchive.org | |
# Depends on XMP (http://xmp.sourceforge.net/) | |
# https://gist.github.com/orhun/eda9701e357b625c2bada19563872715 | |
rand=$(shuf -i 1-189573 -n 1) | |
tmp=$(mktemp /tmp/${rand}.XXXXXXXX.mod) | |
curl https://modarchive.org/jsplayer.php?moduleid=${rand} > ${tmp} | |
xmp ${tmp} | |
rm ${tmp} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I saw your post on Reddit. You might want to hide the curl download progress bar. Here's a link that'll probably help. (https://stackoverflow.com/questions/7373752/how-do-i-get-curl-to-not-show-the-progress-bar)