Skip to content

Instantly share code, notes, and snippets.

@GermaniumSystem
Created June 27, 2017 03:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GermaniumSystem/5fba942f3fbb5f5bf6cfc303b3b8ba6a to your computer and use it in GitHub Desktop.
Save GermaniumSystem/5fba942f3fbb5f5bf6cfc303b3b8ba6a to your computer and use it in GitHub Desktop.
Starbound workshop mod ID list generator.
#!/bin/bash
[ -e "workshopPages" ] || mkdir 'workshopPages'
for NUM in $(seq 1 92) ; do
echo "[INFO]: Requesting list page '${NUM}'"
wget -O "workshopPages/list_${NUM}.html" "http://steamcommunity.com/workshop/browse/?appid=211820&browsesort=mostrecent&section=readytouseitems&actualsort=mostrecent&p=${NUM}"
done
echo "[INFO]: Generating ID list."
grep -E '^ *<a href="http://steamcommunity.com/sharedfiles/filedetails/\?id=' workshopPages/list_* | sed 's/.*?id=//' | sed 's/&.*//' | sort -u > IDList.txt
echo "[INFO]: - Complete."
cat IDList.txt | while read ID ; do
echo "[INFO]: Requesting mod page for ID '$ID'"
wget -O "workshopPages/modPage_${ID}" "http://steamcommunity.com/sharedfiles/filedetails/?id=${ID}&searchtext="
done
echo "[INFO]: Completed at $(date)."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment