Skip to content

CLI mode

optyfr edited this page Sep 30, 2019 · 8 revisions

features:

  • mostly all operations from standalone version are handled
  • works with headless java on headless machines (or from ssh, tty, ...)
  • need a lot less memory (typically divided by 2)
  • substitution using system environment variable or java system properties, notation is $name or ${name} like with sh or bash
  • 3 working modes : interactive, file, standard input

usage: java -jar JRomManagerCLI-2.2.0.jar [args]
alternative usage: java -cp JRomManager.jar jrm.JRomManagerCLI [args]
args:
 -f,--file Input file
 -i,--interactive Interactive shell
 If no args, take commands from standard input (or pipe)

commands:
cd: Change current profile directory
pwd: Show current profile directory
set: Get or set a property variable for substitution later
ls, list, dir: List current profile directory
rm, del: rm [-r] file_or_directory
 Remove a file or a directory, if flag -r or --recursive it will delete non empty directory recursively
md, mkdir: md,mkdir [-p] new_directory
 create a new directory (and all its parents if -p is set)
quiet: set quiet mode (mostly no outputs except errors and warnings)
verbose: restore verbose mode after a quiet
prefs, env: List all prefs (no arg), or show a specific pref (1 arg), or set a pref (2 args)
load: Load a profile
settings, set: List all profile settings (no arg), show a specific profile setting (1 arg), or set a profile setting (2 args)
scan: Start a scan (profile must be loaded)
scanresult, scanresults: Show scan result
fix: Start to fix (after a scan)
dirupdater, dirupd8r: dirupdater subcmd [args]
 Query, configure, and start dirupdater batch processor

  • lssrc: list source dirs
  • lssdr: list dat/dest pairs
  • clearsrc: Clear src dirs
  • clearsdr: Clear dat/dir pairs
  • addsrc: Add source dir to scan
  • addsdr: Add dat/dir pair to process
  • start: Start dirupdater processor
  • presets: dirupdater presets [zero_based_index preset_name]
     show presets or set preset to a SDR profile
  • settings: dirupdater settings zero_based_index [key [value]]
     show setting(s) or set a setting from a SDR profile
  • help, ?: This help

torrentchecker, trntchk: trntchk subcmd [args]
 Query, configure, start torrentcheck batch processor

  • lssdr: List all source/destination/result (SDR)
  • clearsdr: Clear SDR list
  • addsdr: trntchk addsdr source_dat_or_datdir destination_dir
     add a source/destination (SDR)
  • start: trntchk start zero_based_index [-m checkmode] [-u] [-w] [-a]
     Start torrentcheck process
     use -m to change the checkmode from FILESIZE to FILENAME or SHA1
     use -u to remove unknown files
     use -w to remove wrong sized files (at least FILESIZE mode is required otherwise it will be ignored)
     use -a to autodetect archived folders
  • help, ?: This help

compressor, compress: compress -c compressor [-f|--force] file_or_directory
 Compress a file or complete folder using ZIP, TZIP, SEVENZIP compressor format
exit, quit, bye: Exit program
help, ?: Show this help