mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-06 12:47:13 +02:00
* Split out oputil stuff into modules based on <command>
* oputil: better syntax * oputil: allow areaTag@storageTag for scan, e.g. oputil fb scan <args> retro_pc@some_specific_storage
This commit is contained in:
parent
d41fbf6911
commit
d0511d5d74
10 changed files with 725 additions and 553 deletions
55
core/oputil/oputil_help.js
Normal file
55
core/oputil/oputil_help.js
Normal file
|
@ -0,0 +1,55 @@
|
|||
/* jslint node: true */
|
||||
/* eslint-disable no-console */
|
||||
'use strict';
|
||||
|
||||
const getDefaultConfigPath = require('./oputil_common.js').getDefaultConfigPath;
|
||||
|
||||
exports.getHelpFor = getHelpFor;
|
||||
|
||||
const usageHelp = exports.USAGE_HELP = {
|
||||
General :
|
||||
`usage: optutil.js [--version] [--help]
|
||||
<command> [<args>]
|
||||
|
||||
global args:
|
||||
--config PATH : specify config path (${getDefaultConfigPath()})
|
||||
|
||||
where <command> is one of:
|
||||
user : user utilities
|
||||
config : config file management
|
||||
file-base
|
||||
fb : file base management
|
||||
|
||||
`,
|
||||
User :
|
||||
`usage: optutil.js user --user USERNAME <args>
|
||||
|
||||
valid args:
|
||||
--user USERNAME : specify username for further actions
|
||||
--password PASS : set new password
|
||||
--delete : delete user
|
||||
--activate : activate user
|
||||
--deactivate : deactivate user
|
||||
`,
|
||||
|
||||
Config :
|
||||
`usage: optutil.js config <args>
|
||||
|
||||
valid args:
|
||||
--new : generate a new/initial configuration
|
||||
`,
|
||||
FileBase :
|
||||
`usage: oputil.js file-base <action> [<args>] [<action_specific>]
|
||||
|
||||
where <action> is one of:
|
||||
scan <args> AREA_TAG : (re)scan area specified by AREA_TAG for new files
|
||||
multiple area tags can be specified in form of AREA_TAG1 AREA_TAG2 ...
|
||||
|
||||
valid scan <args>:
|
||||
--tags TAG1,TAG2,... : specify tag(s) to assign to discovered entries
|
||||
`
|
||||
};
|
||||
|
||||
function getHelpFor(command) {
|
||||
return usageHelp[command];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue