Little script for downloading plugins from steam workshop for server that do not support natively the workshop like left4dead2 server.
This variation of the script was optimized and modified for multi-threaded downloading, as to not get rate-limited by steam. Right now, it will start downloading all addons at the same time, which may or may not work in your situation.
Changes made by our new AI overlord ChatGPT, with prompts by me.
Looking to modify the code to make the script only download one plugin at a time. Pull requests welcome!
Download the script and run it with the collection(s) id as arg. Note that it will also download the content of the linked collection.
./workshop.py [-o <output_dir] [<collection_id>]... collection_id
Run the script with as many collection_id as you want
./workshop.py <collection_1_id> <collection_2_id> ... <collection_n_id>
No, you can't and I don't want to implement it. Create a collection, your players will thank you if you have more than one plugin. If you only have one plugin, one day you will use many so create a collection.
Just run the script
./workshop.py
Note that each time the script is call, the plugins will be updated if needed. If you already have the plugins download, the script will redownload everything the first time.
Edit the addons.lst file : - remove the collection_id you don't want anymore - don't bother removing the plugins from the file, this part is re-generated each time the script is run. You still need to remove manually the plugin (.vpk) file.
The save file name addons.lst is write in json and has the following form :
{
"collections": [
"<collection_1_id>",
"<collection_2_id>",
...
"<collection_n_id>"
],
"plugins": {
"<plugin_1_id>": {
"title": "Title of the plugin",
"time_updated": <last_updated_time_unix_timestamp>
},
"<plugin_2_id>": {
"title": "Title of the plugin",
"time_updated": <last_updated_time_unix_timestamp>
},
...
"<plugin_n_id>": {
"title": "Title of the plugin",
"time_updated": <last_updated_time_unix_timestamp>
}
}
This file is generated the first time you run the script with the collection(s) id.
./workshop.py -o /path/to/l4d2/addons/workshop 313949717
./workshop.py -o /path/to/l4d2/addons/workshop 313949718
Will download all plugins from 313949717 and 313949718 collections
./workshop.py
steam workshop plugin collection download