FastDL Lua Generator | Automatic resource.AddWorkshop()!

What does this do?
It turns your collections

into the resource.AddWorkshop().

This is for those who don’t want to use the WSDL on the workshop.

Example Output:

I’m a lazy asshole who doesn’t want to right click each item and paste it over and over then edit it with notpad++.

Some packs show up with one or two extra links, no idea why.

How did you get its xml page?

file_get_contents from with $_GET[“id”]
then preg_match_all

once I had the href, I foreached the results, there was /comments/**** and /discussions/*** which i made a check to do nothing if the string had either comment or discuss in it, also the original pack ID shows up, so I checked if it was that, and returned nothing,
after I removed things not wanted, I took the results currently: /?id=99999999 I string sub’d the /?id= to resource.AddWorkshop(’ then added ') after the the replacement.
Now, steams workshop page makes the href show twice, not sure why so the response is:

and so on

So I had to write this to a txt, take the txt into an array, remove the duplicate lines, save that to the TXT and then echo each line in the TXT

Probably not the best way, but it works

In other words, it’s not based on xml.

Nice, thanks for the answer :slight_smile:

Nice! This will come in handy!

Great work! :slight_smile:

[editline]25th June 2015[/editline]

I thought is was " instead of a ’


This is WorkshopDL not FastDL

thanks mate, could we get the source? It’d be nice to automate this

I think both work out fine but I’m not 100% sure

Both works, in lua
local Var = ‘this is’


local Var2 = " my val"

will parse

local Final = Var … Var2

‘this is my val’

[editline]25th June 2015[/editline]

? Define automate…

As in work out a lua function using your code to scrape a collection and load everything in it

I think a better way would be for him to return the addons that require a download as a json table, instead of running arbitrary code that could be changed at any point.

You should add a comment right after the

resource.AddWorkshop("akdklaksf") --2pro gun addon

so we can see what addon it is, but this is super cool.

Not a bad idea, I might

I legit saw this thread, and got inspired to make a greasemonkey script that produces a single resource.AddWorkshop line for any gmod addon you are currently browsing. Thought I might share it here, seeing how its relevant and all.

Don’t look at the code on a full stomach, you might finish reading it with an empty one and a smelly keyboard.

Heh, you think thats a mess? My code is awful.

Link down :frowning: Awesome.

Fixed, changed my servers listing page from the index of MelonLibrary to servers, which wsdl was hosted inside.
New link added on thread.

Could you release this please?

The website is working perfectly fine for me

I’m getting that error too though