Skip to content

SW_ConfigCmdLine

Rolf Obrecht edited this page Aug 22, 2022 · 21 revisions

Configuration by Command Line Arguments

telex.py as the main routine of piTelex can be called with a bunch of cmdline arguments. These are primarily meant for temporary overriding or generation of the main configuration file, which defaults to telex.json. Your final configuration should be represented by this file, so that specifying command line arguments should be obsolete, except perhaps -c to specify the correct config file (this could be necessary e.g. if you plan to run more than one instance of pitelex from the same account).

Below is a list of all command line parameters together with a short explanation, as well as a link to further corresponding documentation.

Please don't get angry if the docs for your favourite topic aren't yet finished; it's all work in progress, but we are trying to get better :-)

piTelex Arguments

Teletype interfaces

arg
short
arg
long
Description default See also
-G --RPiTW39 enable GPIO on RPi
with TW39 teletype
false RPiTTY
-C --RPiCtrl enable RPi button controls and LEDs false RPiCtrl
-X --terminal set serial terminal device (8-bit ASCII) none Terminal
-Y <TTY> --tty <TTY> use CH340 USB adapter
with teletype w/o dialling
none CH340TTY
-W <TTY> --ttyTW39 <TTY> use CH340 USB adapter
with TW39 teletype (pulse dial)
none CH340TTY
-M <TTY> --ttyTW39 <TTY> use CH340 USB adapter
with TWM teletype (keypad dial)
none CH340TTY
-V <TTY> --ttyV10 <TTY> use CH340 USB adapter
with V.10 teletype (FS220,FS200)
none CH340TTY
-E --audioED1000 enable USB sound card
with ED1000 teletype
false ED1000
--noscreen disable screen I/O true Screen

Gateways to the Outside World

arg
short
arg
long
Description default See also
-I <port> --iTelex <port> enable i-Telex client (and server if <port> > 0) -1 iTelexClient
iTelexServer
-N <path> --news <path> enable newsticker (news in folder <path>) none News
-T <twa> --twitter <twa> enable twitter client (access details in , see docs none Twitter
-C <chan> --IRC <chan> enable IRC Client with channel <chan> none IRC
-R <templ> --REST <templ> enable REST client with Template <templ> none REST

Further options

arg
short
arg
long
Description default See also
-Z --eliza enable Eliza chat bot false Eliza
-A --archive enable archive module false Archive
-S --shellcmd enable dictionary of shellcommands false ConfigFile
-L <file> --log <file> Log all incoming and outgoing characters to <file> none Log
-d <level> --debug <level> turn on debugging at<level> 0 deprecated
-c <file> --config <file> set name of central confguration file ./telex.json ConfigFile
-k <id> --id <id> set machine id ("Kennungsgeber")
leave empty to use Hardware ID
none ConfigFile
--id-fallback use software id (set with -k)
in case of hardware failure
false ConfigFile
--errorlogpath <path> specify path of errlog directory ./
-q --quiet disable status messages to stdout true
-s --save write actual config to configfile false

With the arguments above only a subset of program and module properties can be set!

Use args to choose the base type of interface and gateway with default properties. With adding the arg -s all (default) properties are written to file telex.json.

telex.json can (and probably must) be fine-tuned by editing it by hand with a text editor of your choice. With a fine-tuned config-file the cmdline args are not longer needed. At next time start the program telex.py without any args - unless you want to temporarily add/overwrite a feature. Final configuration should be saved in telex.jsonor whatever name you prefer for the config-file.

Clone this wiki locally