JRomManager icon indicating copy to clipboard operation
JRomManager copied to clipboard

CLI wiki needs description of command arguments

Open cplr opened this issue 2 years ago • 2 comments

I've been struggling with the CLI and understanding its usage. For my use-case, I am using it on a synology server (over SSH). My first hurdle was finding the CLI jar, which if you download JRomManager-2.5.1.zip, and then run:

java -cp JRomManager.jar jrm.JRomManagerCLI -I

you get an error that says it cannot find the JRomManagerCLI class. Is there supposed to be JRomManagerCLI.jar on the releases page?

So, I tried extracting jrommanager-2.5.1-1.x86_64.rpm onto the device and I was able to get at JRomManagerCLI.

From there, I started up the interactive mode. Through pure brute force I was able to deduce that you simply pass in a path to load to start a profile. OK:

jrm> load "/location/of/DATfile.dat"

from there I am trying to configure the other settings, but if I try to list the settings by using the command settings I get nothing printed out. I can't seem to get a list of all the available settings.

I'm just not sure where to go from here.

cplr avatar Feb 25 '22 23:02 cplr

Indeed wiki is not up to date and incomplete... and help command is not enough detailed

Since 2.5.0 the right alternative command is java -cp JRomManager.jar jrm.cli.JRomManagerCLI -i

Settings and Prefs only show current values that were set before, so if you start a new profile, there no settings at all, and I admit that you can't guess what's the name of the setting/pref and what's the default value for a given setting/pref CLI version was made just before web server version and most headless devices started to use immediately the server version, so until now I was not sure that anybody already tried that CLI version, I may be wrong here too...

Conclusion : I'll keep that issue open to remember to fix that for version 3.0, but keep in mind that I need to finish javafx gui first and it may still require a few months for that

In the mean time you will find a list of settings/prefs (all mixed unfortunately) in SettingsEnum.java. For the default values... well you will have to open the gui version to see what's is shown when starting with a new profile Hope this help

optyfr avatar Feb 26 '22 13:02 optyfr

That is a big help, thanks! Yeah, I was searching through the code trying to find where the settings were defined to find their names.

It sounds like it might be a good idea to set up a profile ahead of time with the GUI and then use the CLI to use it at this point, which for my purposes I think is ok.

Thank you for your efforts!

cplr avatar Feb 26 '22 14:02 cplr