Giter Site home page Giter Site logo

Comments (7)

Magnitus- avatar Magnitus- commented on May 13, 2024 1

The tool may or may not provide what you need here depending on what your exact needs are.

  1. If you just need to download some game files that you will throwaway afterwards

Once you have generated your full manifest, you can use the "gogcli manifest search" command to generate a sub-manifest with only the games and game files you need.

From there, you just need to specify a filesystem storage in a temporary folder and you'll be able to download what you need

  1. If you just want to update your backup what GOG.com indicates has changed

You can run "gogcli update generate" (fetches the list of updated games) + "gogcli storage download manifest" (fetches the manifest from your storage) + "gogcli manifest update --update=" (updates the manifest with the content of your update file) + "gogcli storage apply" (applies your modified manifest on your storage)

3, If you just want to update/add a specific game in your manifest

You can use the same list of commands as above, except that in the "gogcli manifest update" command, you'll use the following flags instead "gogcli manifest update --id=<id of first game you want to update/add> --id=<id of the second game you want to update/add> ..."

You can also mix it and use both an update file and an additional list of games to update/add.

  1. If you need to update specific files of specific games in your backup

That, I do not currently handle. I'd have to add additional flags for this in the "gogcli manifest update" command

btw, if memory serves, with the api endpoints that I use, the extras are easy to sort out (they are marked as extras with an indicator of what kind of extra it is). However, as far as I recall, the installers are a bit of a mess. Installers files are jumbled together with no clear indication of what are installer files and what are patches. That would be a tad more complicated to sort out as GOG.com didn't provide a deterministic convention to figure this out.

In the above case, should I go that far with the tool, I'd rather leave it as input to a human user or script as to how to sort out installers from patches (using patterns in the names for example) rather than hardcode in the tool a loose convention that may have exceptions (ex: maybe you want to say that all files that include the name "patch" are patches, but what happens that day some dev releases a game with the title "Patchman" ?).

from gogcli.

Magnitus- avatar Magnitus- commented on May 13, 2024 1

@TheDcoder Finally got around to writing a bit of architecture documentation: https://github.com/Magnitus-/gogcli/tree/main/architecture-documentation

It will not add absent functionality, but hopefully, it will assist in better leveraging the functionality that is there.

from gogcli.

Magnitus- avatar Magnitus- commented on May 13, 2024 1

I believe there is indeed no direct command currently to remove a game. You'd have to:

  • Run the command to get the manifest
  • Remove a game from the manifest
  • Apply the manifest

I guess it is simple enough to implement and if it facilitates integration with another tool, it seems like good value for low effort.

from gogcli.

TheDcoder avatar TheDcoder commented on May 13, 2024

Thanks for the cool mini-guide! I was mostly thinking about the first scenario (without the throwaway part), I don't really have the space to download ALL of my library, so I download games as I play them and archive them into my local storage.

It would be nice if there was a way to do that without having to use a sub-manifest... perhaps something basic could be implemented which will download a single game's installers and optionally its extras?

from gogcli.

Magnitus- avatar Magnitus- commented on May 13, 2024

The command line tool was always meant to provide more of a basic building-block composable kind of workflow so it is pretty low-level (conveniently, that decision does make it incredibly easy to troubleshoot many components of the tool in isolation).

I've tried to make it as un-opinionated as I can, though there has to be constraints there to keep the complexity of the implementation manageable (I've stuck to a "manifest as source of truth for your storage" declarative model), although applying the synchronization process between the manifest and storage in an incremental way is definitely feasible (technically, the "storage apply/resume" commands already allow you to apply your games to storage individually or in batches and it wouldn't be that far-fetched to extend the functionality to also partially apply individual games, selecting only certain files).

I've always meant for higher-level functionalities to be implemented on top of the lower-level commands using things like scripts, although I've also got a long term plans to implement a command for the tool that launches a server serving a RESTful api and provide a more user-friendly web dashboard (that would call the RESTful api) that allows you to manage your games.

For your particular use-case of only downloading one game at a time (the first time ever you download each game), it is already supported in the "storage apply/resume" commands though (just, not to the granularity where it will only download individual files in the game... if you want to only download certain kinds of files, this is currently only supported when you initially generate the manifest).

If you only want to download a certain game, you run the following the first time ever that you apply your manifest "gogcli storage apply --maximum=1 --preferred-ids=< id of your game > --concurrency=1 ...".

Subsequent times, you run "gogcli storage resume --maximum=1 --preferred-ids=< id of your game > --concurrency=1 ..."

If your partially applied manifest gets dated because gog updates stuff, I'll refer you to those instructions: https://github.com/Magnitus-/gogcli#updating-your-storage-with-gogcom-when-you-have-pending-actions

from gogcli.

Magnitus- avatar Magnitus- commented on May 13, 2024

I guess the documentation could benefit from a bit of an architectural overhead view to explain how the components fit together (GOG.com, storages, manifests, action files and update files). I'll add that to the doc.

I think most users will end up using a tool on top of this client and I already have the design in my head for my upcoming web dashboard user interfacer, but I guess DIYers who want to script something could use the clarification.

from gogcli.

fluflic avatar fluflic commented on May 13, 2024

I am using Playnite to manage my games library and want to integrate gogcli commands as in-app-actions for the following situations:

  1. add a single game to the backup
  2. remove a single game from the backup
  3. update backups of currently backuped games

1 and 3 should work somehow. But how can I remove a single game completely from the backup?
As I understand it, the trim funktion is only for patches. Or does it also work with the installer files?

If there is no solution to 2. at the moment, a function to delete a single game from the manifest/storage by stating its id would be great.

from gogcli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.