It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
low rated
This is beautiful, this is worth installing Linux to use. I'm really impressed with it. The way it auto organizes everything. One feature I would like to see is that ability to download by tag I have a favorites tag if I could download everything with just that tag, that would be awesome.
low rated
How do you make this download multiple games from a selection or list?
avatar
Magmarock: This is beautiful, this is worth installing Linux to use. I'm really impressed with it. The way it auto organizes everything. One feature I would like to see is that ability to download by tag I have a favorites tag if I could download everything with just that tag, that would be awesome.
I'll see if I can make it use tags.
I guess I would only need to use the tag filtering when getting game list.
But then again this is GOG website/api we're talking about so it might not be so easy.
I'll try to implement this the next time I have some more time to work on the downloader.

avatar
Magmarock: How do you make this download multiple games from a selection or list?
--game option sets perl regex to filter the games
https://www.boost.org/doc/libs/1_77_0/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html

for example this would download every game beginning with 'a'
lgogdownloader --download --game '^a'

example using list of exact gamenames (tyrian 2000, beneath a steel sky and witcher 1)
lgogdownloader --download --game '^(tyrian_2000|beneath_a_steel_sky|the_witcher)$'
low rated
avatar
Magmarock: This is beautiful, this is worth installing Linux to use. I'm really impressed with it. The way it auto organizes everything. One feature I would like to see is that ability to download by tag I have a favorites tag if I could download everything with just that tag, that would be awesome.
avatar
Sude: I'll see if I can make it use tags.
I guess I would only need to use the tag filtering when getting game list.
But then again this is GOG website/api we're talking about so it might not be so easy.
I'll try to implement this the next time I have some more time to work on the downloader.

avatar
Magmarock: How do you make this download multiple games from a selection or list?
avatar
Sude: --game option sets perl regex to filter the games
https://www.boost.org/doc/libs/1_77_0/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html

for example this would download every game beginning with 'a'
lgogdownloader --download --game '^a'

example using list of exact gamenames (tyrian 2000, beneath a steel sky and witcher 1)
lgogdownloader --download --game '^(tyrian_2000|beneath_a_steel_sky|the_witcher)$'
Thank you but I know how to make it download games based on a letter. What I want to do is just download my favorites. I have them in a text documents. But when I copy and paste it, only the first game on the list gets downloaded while the others get ignored.
avatar
Magmarock: What I want to do is just download my favorites. I have them in a text documents. But when I copy and paste it, only the first game on the list gets downloaded while the others get ignored.
Just convert your list to a proper regular expression first. Here's what I use:

> cat ~/bin/mgonly
#!/bin/sh
echo -n '--game=^('
ls /mnt/gog | while read x; do
echo -n "|$x"
done | sed -e 's/|//;s/$/)$/'

Then, I download with e.g. lgogdownloader --download "$(mgonly)". Replace "ls /mnt/gog" with "cat favorites" or "echo 'game1
game2
...'".
low rated
avatar
Magmarock: What I want to do is just download my favorites. I have them in a text documents. But when I copy and paste it, only the first game on the list gets downloaded while the others get ignored.
avatar
darktjm: Just convert your list to a proper regular expression first. Here's what I use:

> cat ~/bin/mgonly
#!/bin/sh
echo -n '--game=^('
ls /mnt/gog | while read x; do
echo -n "|$x"
done | sed -e 's/|//;s/$/)$/'

Then, I download with e.g. lgogdownloader --download "$(mgonly)". Replace "ls /mnt/gog" with "cat favorites" or "echo 'game1
game2
...'".
Sorry I'm not experienced enough with bash to understand what you're trying to say. I did end up writing a script to download my favorites. For some reason it's downloading Deus Ex Invisible War even though it's not on the list.

Anyway here's what I wrote


#!/bin/bash

lgogdownloader --download --platform=w --exclude patches --directory '/media/fred/Video/Games' --game anvil_of_dawn
lgogdownloader --download --platform=w --exclude patches --directory '/media/fred/Video/Games' --game blasphemous
lgogdownloader --download --platform=w --exclude patches --directory '/media/fred/Video/Games' --game blood_omen_legacy_of_kain
lgogdownloader --download --platform=w --exclude patches --directory '/media/fred/Video/Games' --game candleman
lgogdownloader --download --platform=w --exclude patches --directory '/media/fred/Video/Games' --game control_ultimate_edition
avatar
Magmarock: Sorry I'm not experienced enough with bash to understand what you're trying to say. I did end up writing a script to download my favorites. For some reason it's downloading Deus Ex Invisible War even though it's not on the list.
The way to avoid unwanted games being included is to add ^ to the start of the pattern and $ to the end (in single quotes to avoid shell expansion). My mgonly script creates a single --game with all the games at once, so e.g. multiple threads work correctly. Anyway, without using the mgonly-like script, here's what you could use instead of your multiple commands:

lgogdownloader --download --platform=w --exclude patches --directory '/media/fred/Video/Games' --game '^(anvil_of_dawn|blasphemous|blood_omen_legacy_of_kain|candleman|control_ultimate_edition)$'

Vertical bars separate game names. ^ and $ at the beginning and end ensure that no similar names are included. The parentheses are to apply the ^ and $ to the entire list. The single quotes are to keep the special characters from being interpreted by the shell.

I'd place the "--platform=w --exclude patches --directory '/media/fred/Video/Games'" part into the config file (~/.config/lgogdownloader/config.cfg) so you don't have to give it on the command line every time.

The simple script I showed above could be used to make it easier to maintain the list (i.e., as a plain text file). You don't need to make it a separate script if you're using a script to execute lgogdownloader, anyway. For example, here's a script (I'll call it dl-list) that takes one argument: the name of a file containing game names:

#!/bin/sh
lgogdownloader --download --platform=w --exclude=patches --directory '/media/fred/Video/Games' --game="^($(while read x; do echo -n "|$x"; done <$1 | sed -e 's/|//'))\$"

Or, using slightly different commands:

#!/bin/sh
lgogdownloader --download --platform=w --exclude=patches --directory '/media/fred/Video/Games' --game="^($(tr \\n \| <$1 | sed -e 's/|$//'))\$"

Just make it executable (chmod +x dl-list) and either place it in your path or give the directory when executing. Create a plain text file containing your list of games, e.g. "favorites":

anvil_of_dawn
blasphemous
blood_omen_legacy_of_kain
candleman
control_ultimate_edition

Then download using:
./dl-list favorites

This executes exactly the same command as the first one I gave, except that it's easier to maintain the list.
low rated
avatar
Magmarock: Sorry I'm not experienced enough with bash to understand what you're trying to say. I did end up writing a script to download my favorites. For some reason it's downloading Deus Ex Invisible War even though it's not on the list.
avatar
darktjm: The way to avoid unwanted games being included is to add ^ to the start of the pattern and $ to the end (in single quotes to avoid shell expansion). My mgonly script creates a single --game with all the games at once, so e.g. multiple threads work correctly. Anyway, without using the mgonly-like script, here's what you could use instead of your multiple commands:

lgogdownloader --download --platform=w --exclude patches --directory '/media/fred/Video/Games' --game '^(anvil_of_dawn|blasphemous|blood_omen_legacy_of_kain|candleman|control_ultimate_edition)$'

Vertical bars separate game names. ^ and $ at the beginning and end ensure that no similar names are included. The parentheses are to apply the ^ and $ to the entire list. The single quotes are to keep the special characters from being interpreted by the shell.

I'd place the "--platform=w --exclude patches --directory '/media/fred/Video/Games'" part into the config file (~/.config/lgogdownloader/config.cfg) so you don't have to give it on the command line every time.

The simple script I showed above could be used to make it easier to maintain the list (i.e., as a plain text file). You don't need to make it a separate script if you're using a script to execute lgogdownloader, anyway. For example, here's a script (I'll call it dl-list) that takes one argument: the name of a file containing game names:

#!/bin/sh
lgogdownloader --download --platform=w --exclude=patches --directory '/media/fred/Video/Games' --game="^($(while read x; do echo -n "|$x"; done <$1 | sed -e 's/|//'))\$"

Or, using slightly different commands:

#!/bin/sh
lgogdownloader --download --platform=w --exclude=patches --directory '/media/fred/Video/Games' --game="^($(tr \\n \| <$1 | sed -e 's/|$//'))\$"

Just make it executable (chmod +x dl-list) and either place it in your path or give the directory when executing. Create a plain text file containing your list of games, e.g. "favorites":

anvil_of_dawn
blasphemous
blood_omen_legacy_of_kain
candleman
control_ultimate_edition

Then download using:
./dl-list favorites

This executes exactly the same command as the first one I gave, except that it's easier to maintain the list.
Thanks I might experiment with that. Bare in mind my favorites list is lot longer. I shorted in for the sake of the post. The full list is here.
https://www.dropbox.com/s/ahmk3vjj29hqjuk/Download_Faves.sh?dl=0
Post edited October 26, 2021 by Magmarock
avatar
Magmarock: Bare in mind my favorites list is lot longer.
All the more reason to keep the list as a plain text file rather than painstakingly creating a command list like you did. There should be no issues with modern shells and command-line argument lengths, if that's what you're worried about. I just successfully tried it with my full list of games, which amounts to an over 20,000 character command-line.

One thing to keep in mind, though, is that the scripts I showed assume there are no extra spaces, and UNIX-style end-of-line (i.e., no extra carriage returns like Windows uses). You can make it not care about such things by adjusting how it detects names. For example, the following version allows you to use spaces, tabs, carriage returns, and/or newlines to separate game names, and doesn't care how many:

#!/bin/sh
lgogdownloader --download --platform=w --exclude=patches --directory '/media/fred/Video/Games' --game="^($(tr -s '[:space:]' \| <$1|sed -e 's/^|//;s/|$//'))\$"

Or, more simply, since there is no such thing as a game with a blank name, and so excess vertical bars don't really need to be stripped:

#!/bin/sh
lgogdownloader --download --platform=w --exclude=patches --directory '/media/fred/Video/Games' --game="^($(tr -s '[:space:]' \| <$1))\$"
low rated
avatar
Magmarock: Bare in mind my favorites list is lot longer.
avatar
darktjm: All the more reason to keep the list as a plain text file rather than painstakingly creating a command list like you did. There should be no issues with modern shells and command-line argument lengths, if that's what you're worried about. I just successfully tried it with my full list of games, which amounts to an over 20,000 character command-line.

One thing to keep in mind, though, is that the scripts I showed assume there are no extra spaces, and UNIX-style end-of-line (i.e., no extra carriage returns like Windows uses). You can make it not care about such things by adjusting how it detects names. For example, the following version allows you to use spaces, tabs, carriage returns, and/or newlines to separate game names, and doesn't care how many:

#!/bin/sh
lgogdownloader --download --platform=w --exclude=patches --directory '/media/fred/Video/Games' --game="^($(tr -s '[:space:]' \| <$1|sed -e 's/^|//;s/|$//'))\$"

Or, more simply, since there is no such thing as a game with a blank name, and so excess vertical bars don't really need to be stripped:

#!/bin/sh
lgogdownloader --download --platform=w --exclude=patches --directory '/media/fred/Video/Games' --game="^($(tr -s '[:space:]' \| <$1))\$"
Could you perhaps link the script through dosbox. I'd like to take a look at it.
avatar
Magmarock: Could you perhaps link the script through dosbox. I'd like to take a look at it.
I'm not sure what you mean. I assume you mean dropbox? In any case, there are no scripts to show: everything is in the posts. Sorry, but I have nothing more to say on the matter, really.
low rated
avatar
Magmarock: Could you perhaps link the script through dosbox. I'd like to take a look at it.
avatar
darktjm: I'm not sure what you mean. I assume you mean dropbox? In any case, there are no scripts to show: everything is in the posts. Sorry, but I have nothing more to say on the matter, really.
opps yeah I meant dropbox. But thanks for your help. I think I prefer my script anyway. Once I downloaded my collection one of the games received an update. I was able to download just that game by copying pasting the line from my script

lgogdownloader --download --platform=w --exclude patches --directory '/media/fred/Video/Games' --game candleman

I tried

lgogdownloader --download --platform=w --exclude patches --directory '/media/fred/Video/Games' --game ^(deus_ex)$

and it worked.
Post edited October 26, 2021 by Magmarock
low rated
avatar
Sude: example using list of exact gamenames (tyrian 2000, beneath a steel sky and witcher 1)
lgogdownloader --download --game '^(tyrian_2000|beneath_a_steel_sky|the_witcher)$'
Hey, I wanted to talk to you more about this line here.

lgogdownloader --download --game '^(tyrian_2000|beneath_a_steel_sky|the_witcher)$'

Is there a more vertical way of writing that down?

To list all the game I want to download would take a while, one of the benefits of using the script I wrote here is that if you need to download just 1 game you simply just copy the line and paste it into terminal.

https://www.dropbox.com/s/ahmk3vjj29hqjuk/Download_Faves.sh?dl=0


As you can see there’s quite a lot there. It was no trouble creating this list. I simply copied and pasted the names of the games I wanted with a @ symbol like this

@ anvil_of_dawn
@ blasphemous
@ blood_omen_legacy_of_kain


and used “find and replace” to replace @ with the
lgogdownloader --download --platform=w --exclude patches --directory '/media/fred/Video/Games' --game

It only downloads games one at a time but hey it works. What do you think?
avatar
Sude: example using list of exact gamenames (tyrian 2000, beneath a steel sky and witcher 1)
lgogdownloader --download --game '^(tyrian_2000|beneath_a_steel_sky|the_witcher)$'
avatar
Magmarock: Hey, I wanted to talk to you more about this line here.

lgogdownloader --download --game '^(tyrian_2000|beneath_a_steel_sky|the_witcher)$'

Is there a more vertical way of writing that down?
Use backslash to escape the newline and split the string to multiple lines

lgogdownloader --download --game \
'^('\
'tyrian_2000'\
'|beneath_a_steel_sky'\
'|the_witcher'\
')$'
low rated
avatar
Magmarock: Hey, I wanted to talk to you more about this line here.

lgogdownloader --download --game '^(tyrian_2000|beneath_a_steel_sky|the_witcher)$'

Is there a more vertical way of writing that down?
avatar
Sude: Use backslash to escape the newline and split the string to multiple lines

lgogdownloader --download --game \
'^('\
'tyrian_2000'\
'|beneath_a_steel_sky'\
'|the_witcher'\
')$'
I tried backslashes but couldn't figure out the syntex. They looked like this

lgogdownloader --download --game '^('tyrian_2000 \
beneath_a_steel_sky| \
the_witcher| \
')$'