• FastDL Lua Generator | Automatic resource.AddWorkshop()!
    41 replies, posted
[url]http://melonservers.com/servers/wsdl/[/url] What does this do? It turns your collections [url]http://steamcommunity.com/sharedfiles/filedetails/?id=300653696[/url] into the resource.AddWorkshop(). This is for those who don't want to use the WSDL on the workshop. Example Output: [IMG]http://i.gyazo.com/f338db07ea25142e9bb2d3df886d7757.png[/IMG] Why? 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++. BUGS: Some packs show up with one or two extra links, no idea why.
How did you get its xml page?
file_get_contents from [url]http://steamcommunity.com/sharedfiles/filedetails/?id=[/url] with $_GET["id"] then preg_match_all href="http://steamcommunity.com/sharedfiles/filedetails 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: 123123123 123123123 345345345 345345345 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 EDIT: In other words, it's not based on xml.
Nice, thanks for the answer :)
Nice! This will come in handy! Great work! :) [editline]25th June 2015[/editline] I thought is was " instead of a ' resource.AddWorkshop("ID")
This is WorkshopDL not FastDL
thanks mate, could we get the source? It'd be nice to automate this
[QUOTE=LukeDell;48047566]Nice! This will come in handy! Great work! :) [editline]25th June 2015[/editline] I thought is was " instead of a ' resource.AddWorkshop("ID")[/QUOTE] I think both work out fine but I'm not 100% sure
[QUOTE=KrazyHD;48048688]I think both work out fine but I'm not 100% sure[/QUOTE] Both works, in lua local Var = 'this is' and local Var2 = " my val" will parse local Final = Var .. Var2 'this is my val' [editline]25th June 2015[/editline] [QUOTE=Ylsid;48048143]thanks mate, could we get the source? It'd be nice to automate this[/QUOTE] ? Define automate... [url]http://melonservers.com/MelonLibrary/wsdl.php?id=#######[/url]
[QUOTE=L0rdTyler;48049428]Both works, in lua local Var = 'this is' and local Var2 = " my val" will parse local Final = Var .. Var2 'this is my val' [editline]25th June 2015[/editline] ? Define automate... [url]http://melonservers.com/MelonLibrary/wsdl.php?id=#######[/url][/QUOTE] 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 [CODE]resource.AddWorkshop("akdklaksf") --2pro gun addon[/CODE] so we can see what addon it is, but this is super cool.
[QUOTE=LittleBigBug;48054395]You should add a comment right after the [CODE]resource.AddWorkshop("akdklaksf") --2pro gun addon[/CODE] so we can see what addon it is, but this is super cool.[/QUOTE] 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. [url]https://greasyfork.org/en/scripts/10710-fastdl-fetcher[/url] Don't look at the code on a full stomach, you might finish reading it with an empty one and a smelly keyboard.
[QUOTE=HDG_MrDeeJayy;48081080]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. [url]https://greasyfork.org/en/scripts/10710-fastdl-fetcher[/url] Don't look at the code on a full stomach, you might finish reading it with an empty one and a smelly keyboard.[/QUOTE] Heh, you think thats a mess? My code is awful.
Link down :( Awesome.
[QUOTE=Artiik;48916167]Link down :( Awesome.[/QUOTE] Fixed, changed my servers listing page from the index of MelonLibrary to servers, which wsdl was hosted inside. New link added on thread.
[QUOTE=L0rdTyler;48918734]Fixed, changed my servers listing page from the index of MelonLibrary to servers, which wsdl was hosted inside. New link added on thread.[/QUOTE] Could you release this please? EDIT: [url]https://gyazo.com/4ef76eb9920cbc075719851fd15c9447[/url]
[QUOTE=Segecos;48922377]Could you release this please? EDIT: [url]https://gyazo.com/4ef76eb9920cbc075719851fd15c9447[/url][/QUOTE] The website is working perfectly fine for me
[QUOTE=Harbu;48922515]The website is working perfectly fine for me[/QUOTE] I'm getting that error too though
When you click next change the bold text to /[B]servers[/B]/ [url]http://melonservers.com/[/url][B]MelonLibrary[/B]/wsdl.php?id=467266127 [QUOTE=L0rdTyler;48918734]Fixed, [B]changed my servers listing page from the index of MelonLibrary to servers[/B], which wsdl was hosted inside. New link added on thread.[/QUOTE]
[QUOTE=L0rdTyler;48918734]Fixed, changed my servers listing page from the index of MelonLibrary to servers, which wsdl was hosted inside. New link added on thread.[/QUOTE] Omg i love you. Thanks, Lord.
Nfo has this too, in case this link went down. [url]http://www.configcreator.com/[/url]
[QUOTE=SirWolfie;48928882]Nfo has this too, in case this link went down. [url]http://www.configcreator.com/[/url][/QUOTE] Only for FastDL. Not to be a hypocrite but this is WorkshopDL, not FastDL.
[QUOTE=Unknown Gamer;48946570]Only for FastDL. Not to be a hypocrite but this is WorkshopDL, not FastDL.[/QUOTE] [url]http://www.configcreator.com/create/gmod/resources.lua[/url] First box. Outputs them with titles too
[QUOTE=Chimpanzee;48948017][url]http://www.configcreator.com/create/gmod/resources.lua[/url] First box. Outputs them with titles too[/QUOTE] Opps. Forgot about that. I haven't used it in a while since I haven't added much to my FastDL.
You should release the code/files just incase your website goes down in the future!
[QUOTE=XxLMM13xXx;48971916]You should release the code/files just incase your website goes down in the future![/QUOTE] It would be a shame if his site went down, I would love to see his code tho D:
Website is down, fuck. xD
[code] <?php $file = file_get_contents("http://steamcommunity.com/sharedfiles/filedetails/?id=563033331"); $muster = '<a href="http:\/\/steamcommunity.com\/sharedfiles\/filedetails\/\?id=([0-9]+)">'; preg_match_all($muster, $file, $match); $arr = array_unique(array_values($match[1])); sort($arr); foreach($arr as $val) { print $val . "<br/>"; } ?> [/code] It prints out the list of items, that way if someone wants the expression they can use it. EDIT: You will have the collections id added to the list from this. Do remember to remove it.
Sorry, you need to Log In to post a reply to this thread.