Closed GiuseppeChillemi closed 4 years ago
There's no need for user to modify the script itself, you just need to edit links.txt using switches and links entered together. Switches change default global settings until they are modified again in links.txt. Bundle titles are ignored so something like this would work for pdf only downloads:
Cloud Computing Basics: A Self-Teaching Introduction https://www.humblebundle.com/downloads?key=XXXXXXXXXXXXXXXX
This would change limitation to pdf only unless modified again below. It would download pdf files for titles which has them and first label of titles which are missing them. If you want to skip all titles which don't have pdf label, you'd have to use %strict too.
%strict Cloud Computing Basics: A Self-Teaching Introduction https://www.humblebundle.com/downloads?key=XXXXXXXXXXXXXXXX
For all other combinations check the README.md file.
I suggest changing the readme to something like the following text as I have totally missed global switches working:
1) Removing bullets from the examples.
2) Change the text to something like this:
Switches must be used inside links.txt file. They can be appended to the end of a single link as follow and they will work for that single bundle, then default (previous?) working will return.
(example of a link.txt file)
https://www.humblebundle.com/downloads?key=XXXXXXXXXXXXXXXX#pdf https://www.humblebundle.com/downloads?key=XXXXXXXXXXXXXXXX#pdf,epub,mp3
Global switches could be used before a list of bundle links. Those switches will be valid for the remaining of the list until another switch changes that specific working.
(example of a link.txt file)
https://www.humblebundle.com/downloads?key=XXXXXXXXXXXXXXXX
https://www.humblebundle.com/downloads?key=XXXXXXXXXXXXXXXX
(the last switch reverts everything to the default value and the script will return to downloading all versions)
...
Yeah, I'll definitely remove bullet points from that and make it more clear. Thanks
For people unfamiliar with powershell it is not clear where to put global switches: powershell CLI ? Bat file ? .ps1 script ?