Skip to content

Instantly share code, notes, and snippets.

@orhun
Last active April 10, 2021 20:08
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save orhun/eda9701e357b625c2bada19563872715 to your computer and use it in GitHub Desktop.
Save orhun/eda9701e357b625c2bada19563872715 to your computer and use it in GitHub Desktop.
Random MOD player
#!/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}
@ptanmay143
Copy link

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment