Created
June 27, 2017 03:27
-
-
Save GermaniumSystem/5fba942f3fbb5f5bf6cfc303b3b8ba6a to your computer and use it in GitHub Desktop.
Starbound workshop mod ID list generator.
This file contains hidden or 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
#!/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§ion=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