Synchronet v3.17b-Win32 (install) has been released (Jan-2019).

New Synchronet YouTube channel

You can donate to the Synchronet project using PayPal.

Differences

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

Link to this comparison view

Next revision
Previous revision
module:exportcfg [2019/01/14 22:18]
digital man created
module:exportcfg [2019/02/15 03:16] (current)
digital man Added newly-supported file-* cfg types (prots, viewers, testers, etc.)
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 +        ​file-prots 
- xtrn-progs +        file-extrs 
- xtrn-events +        file-comps 
- xtrn-editors+        file-viewers 
 +        file-testers 
 +        file-dlevents 
 +        ​xtrn-secs 
 +        xtrn-progs 
 +        xtrn-events 
 +        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 55: Line 62:
 | ''​[[http://​synchro.net/​docs/​jsobjs.html#​file_area.lib_list_properties|file-libs]]'' ​           | File Libraries | | ''​[[http://​synchro.net/​docs/​jsobjs.html#​file_area.lib_list_properties|file-libs]]'' ​           | File Libraries |
 | ''​[[http://​synchro.net/​docs/​jsobjs.html#​file_area.lib_list.dir_list_properties|file-dirs]]'' ​  | File Directories | | ''​[[http://​synchro.net/​docs/​jsobjs.html#​file_area.lib_list.dir_list_properties|file-dirs]]'' ​  | File Directories |
 +| ''​file-prots'' ​                                                                                | File Transfer Protocols |
 +| ''​file-extrs'' ​                                                                                | File Extractors |
 +| ''​file-comps'' ​                                                                                | File Compressors |
 +| ''​file-viewers'' ​                                                                              | File Viewers |
 +| ''​file-testers'' ​                                                                              | File Testers |
 +| ''​file-dlevents'' ​                                                                             | File Download Events |
 | ''​[[http://​synchro.net/​docs/​jsobjs.html#​xtrn_area.sec_list_properties|xtrn-secs]]'' ​           | External Program Sections | | ''​[[http://​synchro.net/​docs/​jsobjs.html#​xtrn_area.sec_list_properties|xtrn-secs]]'' ​           | External Program Sections |
 | ''​[[http://​synchro.net/​docs/​jsobjs.html#​xtrn_area.sec_list.prog_list_properties|xtrn-progs]]''​ | External Programs (doors) | | ''​[[http://​synchro.net/​docs/​jsobjs.html#​xtrn_area.sec_list.prog_list_properties|xtrn-progs]]''​ | External Programs (doors) |
Line 64: Line 77:
 By default, ''​exportcfg.js''​ outputs **all** properties for **all** configured items of the chosen ''​cfg-type''​. By default, ''​exportcfg.js''​ outputs **all** properties for **all** configured items of the chosen ''​cfg-type''​.
  
-To chose 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 //​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:
Line 89: Line 107:
  
 === Values === === Values ===
-Configuration property values may be modified by included ​any of the following options on the command-line:​+Configuration property values may be modified by including ​any of the following options on the command-line:​
 ^ Option ​    ^ Default Value ^ Description ^ ^ Option ​    ^ Default Value ^ Description ^
 | ''​-quote''​ | ''​false'' ​    | Encode quotes and other special characters in property string values (via ''​JSON.stringify''​) | | ''​-quote''​ | ''​false'' ​    | Encode quotes and other special characters in property string values (via ''​JSON.stringify''​) |
Line 95: Line 113:
 | ''​-ascii''​ | ''​false'' ​    | Convert CP437 (extended-ASCII) characters in string values to ASCII equivalents | | ''​-ascii''​ | ''​false'' ​    | Convert CP437 (extended-ASCII) characters in string values to ASCII equivalents |
  
-Configuration property values may be modified on a per-property basis by included ​any of the following options on the command-line following a property specification:​+Configuration property values may be modified on a per-property basis by including ​any of the following options on the command-line following a property specification:​
 ^ Option ​    ^ Default Value ^ Description ^ ^ Option ​    ^ Default Value ^ Description ^
 | ''​-upper''​ | ''​false'' ​    | Convert strings to all upper-case letters | | ''​-upper''​ | ''​false'' ​    | Convert strings to all upper-case letters |

In Other Languages