The tool is still in WIP. Minimally, I have this left to do before I consider it stable:
6. DOING: Implement actions update in storage as manifest upload happens
7. Implement "storage resume-actions" (tentative syntax) command
8. Add "number of games" flag to "storage resume-actions" and "storage apply" commands
9. Implement "manifest generate-patchfile" (tentative syntax) Command
10. Implement "storage apply-patchfile" (tentative syntax) command
11. Add more documentation
12. Write unit tests pipeline
13. Write functional tests pipeline
The actions update is so that you don't have to start from scratch if an error happens (ex: gog returns an error on one of the downloads). It will also enable scenarios like "ok, I have 1000 games in my manifest, but please, only download the next 5 for now".
The patchfile notion is so that you can get a fixed list of new games and updates at a specific point in time and potentially apply it multiple times afterwards (useful for testing as GOG removes new/updated flags from games once you get the detailed view, though there might be other interesting use cases for it, if you have multiple redundant stores for example).
Timboli: I tried the excellent program by Magnitus, and alas the gog-cookies.dat file isn't acceptable, so with a little help from Magnitus, I had to manually get them from my browser Inspect page in Brave (Chrome Clone) - Network -> Headers section, from an entry with cookie in the name. Just grabbed the two required entries and saved them to a text file called 'Cookie.txt', then referenced that with his command-line.
brouer: If you have Firefox logged into GOG, you can use
this script to extract all GOG related cookies
(didn't bother finding out which were actually needed) into gog-cookies.dat format.
I'll look into supporting that format as well if its easier.
Ultimately, long term, I would like to attempt loading the login form and using something like webview (
https://github.com/webview/webview) to inject a bit of js that sends back to the client the credentials that it needs. I'll see how doable it is.
Alternatively, I could also build a separate smaller utility in electron just to handle the login part and generate a file from it.
Either way, I consider handling the login flaky enough that I think the most low tech solution of copying cookie values in a text file should always be supported as a fallback.
Timboli: I am very impressed so far.
I have noticed no MD5 values are listed in Game details, so hope that is on the todo list ... and maybe a Verify option.
Unfortunately, the gog api doesn't seem to provide checksums so checksums are not available when the manifest is initially generated.
Checksums are computed and the manifest is updated with them when you download files into the storage (ie, "gogcli storage apply"). There isn't much additional overhead there as I leverage the same download stream both to compute the checksum and to store the file when using the filesystem and for s3 stores, you get the md5 checksum "for free".
There is a commmand to verify that the checkum of files match the manifest once the files are into storage (ie, "gogcli storage verify"). This handles validating that the stored files are valid relative to the download stream you initially got from GOG.
I'll probably add another command to verify that the checksums in a manifest file match what is downloaded in the gog api (something like "gogcli manifest verify") although that will involve having to redownload the files for the sole purpose of validating the checksum (and so will be expensive). That will validate that something didn't go wrong in transit from GOG's website (a much rarer, but not impossible occurence).
Timboli: I just checked a browser download URL in my GOG game library, and if you take '
https://www.gog.com' off the front, it is identical to what is in the game details ... so that is handy.
There is also a "gogcli gog-api download-url-path" command that takes the relative url and downloads the file (I used it for troubleshooting file download, although I imagine that someone who likes scripting might do something with that on top of the client).