Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
module:exportcfg [2019/01/18 17:00] – [Filtering] typo digital manmodule:exportcfg [2019/01/19 20:38] – [Filtering] Added examples of the -inc and -exc option usage. digital man
Line 10: Line 10:
 <code> <code>
 usage: exportcfg.js <cfg-type> usage: exportcfg.js <cfg-type>
- [[-grp=<msg_area.grp.name | file_area.lib.name | xtrn_area.sec.code>] [...]] +        [[-grp=<msg_area.grp.name | file_area.lib.name | xtrn_area.sec.code>] [...]] 
- [-<option>[=<value>] [...]] +        [[-inc=<internal_code> | -exc=<internal_code>] [...]] 
- [[[property][=<printf-format> [-upper | -lower | -under]] [...]]+        [-<option>[=<value>] [...]] 
 +        [[[property][=<printf-format> [-upper | -lower | -under]] [...]]
         [[-ex=<property>] [...]]         [[-ex=<property>] [...]]
  
 cfg-types (choose one): cfg-types (choose one):
- msg-grps +        msg-grps 
- msg-subs +        msg-subs 
- file-libs +        file-libs 
- file-dirs +        file-dirs 
- xtrn-secs +        xtrn-secs 
- xtrn-progs +        xtrn-progs 
- xtrn-events +        xtrn-events 
- xtrn-editors+        xtrn-editors
  
 options: options:
- <option>     <default> +        <option>     <default> 
- -hdr         =false +        -hdr         =false 
- -ini         =false +        -ini         =false 
- -delim       ="\u0009" +        -delim       ="\u0009" 
- -term        ="" +        -term        ="" 
- -quote       =false +        -quote       =false 
- -strip       =false +        -strip       =false 
- -ascii       =false +        -ascii       =false 
- -quiet       =false +        -quiet       =false 
- -sort        =false +        -sort        =false 
- -json        =false +        -json        =false 
- (tip: use -json=4 for pretty JSON output) +        (tip: use -json=4 for pretty JSON output) 
- (tip: use -ini='\t%s = %s\n' for pretty .ini output)+        (tip: use -ini='\t%s = %s\n' for pretty .ini output)
  
 per-property options: per-property options:
- <option>     <default> +        <option>     <default> 
- -upper       =false +        -upper       =false 
- -lower       =false +        -lower       =false 
- -under       =false+        -under       =false
 </code> </code>
  
Line 65: Line 66:
  
 To choose which //groups// (Message Groups, File Libraries, or External Program Sections) from which to output configured items, use the ''-grp'' option. You can use the ''-grp'' option multiple times to specify multiple groups from which to output items. The groups of items will be output in their configured order (unless the ''-sort'' option is used), regardless of the order of the groups specified on the command-line. To choose which //groups// (Message Groups, File Libraries, or External Program Sections) from which to output configured items, use the ''-grp'' option. You can use the ''-grp'' option multiple times to specify multiple groups from which to output items. The groups of items will be output in their configured order (unless the ''-sort'' option is used), regardless of the order of the groups specified on the command-line.
-  jsexec msg-subs -grp main+  jsexec exportcfg.js msg-subs -grp main
  
 To chose which configuration //properties// to **include** in the output, pass one or more property names on the command-line (without any dashes). The properties may be specified in any order and their values will be output in the order given. To chose which configuration //properties// to **include** in the output, pass one or more property names on the command-line (without any dashes). The properties may be specified in any order and their values will be output in the order given.
-  jsexec msg-subs code name description+  jsexec exportcfg.js msg-subs code name description
      
 Alternatively, you can **exclude** specific properties from the output by specifying one or more property names with the ''-ex'' option. Alternatively, you can **exclude** specific properties from the output by specifying one or more property names with the ''-ex'' option.
-  jsexec msg-subs -ex=can_read -ex=can_post -ex=is_operator -ex=is_moderated -ex=scan_ptr -ex=scan_cfg -ex=last_read+  jsexec exportcfg.js msg-subs -ex=can_read -ex=can_post -ex=is_operator -ex=is_moderated -ex=scan_ptr -ex=scan_cfg -ex=last_read
  
 +By default, all //items// (objects) within the chosen configuration area are **included** in the output. To chose which items to include in the output, use the ''-inc'' option to specify the //internal code// of an item to include in the output. The ''-inc'' option may be used multiple times to specify multiple items to include.
 +  jsexec exportcfg.js msg-subs -inc=syncdata 
 +
 +To **exclude** specific configuration items (objects) from the output, you can use the ''-exc'' option. The ''-exc'' option may be used multiple times to specify multiple items to exclude from the output.
 +  jsexec exportcfg.js msg-subs -exc=syncdata 
 ==== Output format ==== ==== Output format ====
 ''exportcfg.js'' supports 3 primary flavors of text output: ''exportcfg.js'' supports 3 primary flavors of text output:
module/exportcfg.txt · Last modified: 2021/02/13 09:33 by mlong
Back to top
CC Attribution 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0