trembon / switch-library-manager

Complete solution to manage, organize and keep your local switch backup game library up to date . Cross platform, supports all game formats.
MIT License
79 stars 5 forks source link

Request: Auto export CSV on load (maybe with command line param) #15

Closed Corgano closed 7 months ago

Corgano commented 8 months ago

I'm looking for an AUTOMATED way to have SLM output the .csv files for the issues, dlc, and updates page to issues.csv, DLC.csv, and updates.csv automatically. It would be amazing if it could output these automatically after loading, or have a way to run it with a command line parameter like -csv and have it load, output these, and then close.

trembon commented 8 months ago

guess it would need to extend the console version in some way to make the most sense not sure what the cleanest way will be as the app is not currently mixing settings.json variables and command line parameters

Corgano commented 8 months ago

For the console version, i was just doing a bat file steam-library-manager.exe >> somefile.txt and parsing that Either way, having an --export-csv flag to run the script, and automatically creating issues.csv, missing.csv, update.csv would be fantastic

Corgano commented 8 months ago

I tried downloading the source to add the feature myself, but I can't get it to build properly :(

trembon commented 8 months ago

@Corgano the config is set up to build windows, linux and mac currently and if your environment has problem building for one of these targets you might get errors if you look in the file src/bundler.json you will see definitions for these three, so while you are building something you can just remove the two definitions that are not relevant for your system

hope this will get you going

trembon commented 7 months ago

@Corgano i added a first version of this that is available if you download the build artifact from the build "rework console parameters and add export to csv option (#26)" under Actions here on GitHub

Corgano commented 7 months ago

guess it would need to extend the console version in some way to make the most sense not sure what the cleanest way will be as the app is not currently mixing settings.json variables and command line parameters

I think I misread this the first time I responded. You could have a new command line config= that if defined then it completely ignores command line settings and uses the config. That way you don't break existing workflows.

Optionally if you have config= set and other command line options set that the config covers, then throw an error and exit. Opportunity to inform user the logic uses config file or command line params, not both.

trembon commented 7 months ago

so if i understand you correctly, you see the use of a flag (like --use-config) to ignore command line flags? wouldnt it be easier to just to skip adding the command line flags instead? or do i missunderstand this?

either way, not really related to the export as csv function would be better handled in its own issue, so the issues can be closed when done and not grow with more functions

Corgano commented 7 months ago

Perfectly fair. Honestly I'd be fine with it just always using the Config file if it exists / creating it if it does not. Same way the program functions when run as a GUI.

trembon commented 7 months ago

it does this already when running in console mode, but previously some of these command line flags already existed for some reason to override the settings values and i dont know the reason behind that

maybe one solution could be to skip these and add a parameter to select which configuration file to use instead and have profiles that way instead

Corgano commented 7 months ago

That would work fine.

The only workflow I can think of where you would want to use a config file with command line parameters to override is if you had multiple different folders, but you wanted to re-use the same formatting, settings, ignore list for all of them, you could have the settings file have the common settings, but pass a parameter to override the folder for each different folder you want to process. Then you could like have a batch file run the command line version, for multiple folders, using the same core config.

I don't know if this is how it works currently, but both (command line overwrites config file settings) and (command line option specifies separate config files) are entirely valid options. The latter is probably more flexible and a bit cleaner to use ex specifying a command line parameter to override a list of ignored title IDs is likely messier than using a command line parameter to specify a separate config file to use with the different titleid list

On Tue, Apr 9, 2024, 3:17 p.m. trembon @.***> wrote:

it does this already when running in console mode, but previously some of these command line flags already existed for some reason to override the settings values and i dont know the reason behind that

maybe one solution could be to skip these and add a parameter to select which configuration file to use instead and have profiles that way instead

— Reply to this email directly, view it on GitHub https://github.com/trembon/switch-library-manager/issues/15#issuecomment-2046067074, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGSARMGNOCDVJUQHZV2ETLY4RLH3AVCNFSM6AAAAABEP3I6AGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBWGA3DOMBXGQ . You are receiving this because you modified the open/close state.Message ID: @.***>