Currently I settle for now that oiyshTerminal tools set will be mainly in python. So It's. Work in progress. Learning more about deb stats what is going on process of installation / removing. This is eeee easy when all is going good but when there a error appiear then it's up heel. Today I'm trying to simplify process of [ pre | post ][ ins | rm]
Currently
$ otdmTools.py -h
$ otdmTools.py -h
. . o o O O oiyshTerminal - tools O O o o . .ver 0.14-1920
configuration file loading from [/data/data/com.termux/files/home/.otdm/config.json]...
chkClipBoard .... ..... loading: 78
Help.
You can run it:
otdmTools.py 'JSONstr'
Usage: otdmTools.py -testCurl 1
Usage: otdmTools.py -testCurl 1
Will run test of config files, connection to grafana, node-red.
Can run like all commands with -debug 1 to debug.
Table:
src what dir dest status
g ds i file *
nr flows i file *
g ds i strInp TODO
g ds rm *
Usege: otdmTools.py -import grafana -impW ds -iFile /tmp/dsMysql-ot.json -file ./log1.log
Import to grafana datasource from file "/tmp/dsMysql-ot.json" and
result of a operation will be in ./log1.log. U can use "--" as a output
to get it as a strout.
Usage: otdmTools.py -debug 1 -rm "grafana" -rmW "ds" -by "EtRiTNkgk"
Delete datasource with uid "EtRiTNkgk" from grafana / datasources.
Return 0 if all correct. 1 if error.
args:
-testExit 11 - exit app with code 11
-return0 1 - test. exeIt returns 0 it imitate that it not detect argument
-testConfLoad 1 - test. loads config file or test loadconfig function
-testEcho "abc" - test. echos as print "abc"
args from args array:
-v - Prints version of oiyshTerminal - tools. now is ver: 0.14-1920
-debug - debuging enable disable by 1 or 0
-testDialog - Test of dialog function.
-forceHost - owerrits host ip address
-addNote - It use .otdm/cliper.json
-lastNote - [n] Returns last notes. n = 1 by def.
-tasks - [pathTo.otdm_file] Run tasks list from array list of tasks.
-mkInjFil - It convert reagular export json files to injection ready.
[grafana-ds|node-flow] - possible arguments for now.
-if [inFile] - path to input file with json
-of [outFile] - path to output file with injection ready json
-injToJ "{}" - inject/overrites keys and vals to main export file.
-extract - [gdsInjRes] Set what to decode then different aproche will be taken to the file source.
-if [pathto.json] - path to file to work with.
-mkbp - Make backups. Have some options.
what to backup?
[gds|gdsuid|gdsid|gdsname|gdhs|gdhuid|gdhid|gdhname]
g - for grafana
or
[flows|fid|fname]
for Node-red
[*] to make all and seperate.
-by - if not (s) then value of what to backup
-rm - Will remove something.. depends on arguments.
-rm - remowe in what? [node-red|grafana]
-rmW - remowe what?
if node-red [flow]
if grafana [ds,dash]
-by - it's in:
if node-red by id of a flow
if grafana uid
-
-export - Export data from [grafana|node-red]
args need to set!
-file "path" - to storage. If set to "--" will print.
-expW "ds" - export what?
if export is to grafana select:[ds|dsByName|hsByUid|dashs|dashByName|dashByUid]
if export is to node-red select:[flow|flows]
-import - iport data from file to [grafana|node-red]
args need to set!
-iFile - file path to json to work with
-iStr - string / json input to work with this or -iFile
-impW - import what?
if importing is to grafana select:[ds|dashs]
if importing is to node-red select:[flow]
-testCurl - test curl get to grafana and node-red.
-testEcho2 - test. it\'s a test function to echo from acts arry.
-testAll - Run all test defined in test section.
. . o o O O oiyshTerminal - tools O O o o . . END ver 0.14-1920
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.