.TH idecctl 1 "March 12, 2023" "version 0.0.1" "OpenIDEC" .SH NAME idecctl - idec db tool .SH SYNOPSIS .B idecctl [options] command [arguments] .SH DESCRIPTION .B idecctl can be used to fetch messages from another node and maintaince database. .SH OPTIONS .TP .B FETCH MESSAGES .B idecctl [options] .B fetch [uri] [echolist] .nf -db db by default (db.idx \- genetated index) -lim= fetch mode, if omitted full sync will be performed if needed if n > 0 - last n messages synced if n < 0 - adaptive fetching with step n will be performed -f do not check last message, perform sync even it is not needed echolist is the file with echonames (can has : splitted columns, like list.txt) or '-' to load it from stdin If echolist is omitted, fetcher will try to get all echos. It uses list.txt extension of IDEC if target node supports it. .fi .TP .B CREATE INDEX .B idecctl index .nf Index file (db.idx by default) is created when needed. If you want force to recreate it, use: idecctl index .fi .TP .B STORE BUNDLE INTO DB .B idecctl [options] .B store [DB] .nf You can merge records from DB to db with store command. -db db to store/merge in db - is file with bundles or '-' for stdin. DB is just msgid:message bundles in base64 stored in text file. .fi .TP .B SHOW MESSAGES .nf Select messages: idecctl [options] select [slice] slice is the start:limit Messages are identificated by unique message ids (MsgId). It is the first column in bundle: : Show selected message: idecctl [options] get Search message: idecctl [options] search [echo] .B options: -from -- from user -to -- to user -t -- only topics (w/o repto) -db -- db by default (db.idx - genetated index) -v -- show message text, not only MsgId .fi .TP .B ADD USER (POINT) idecctl [-u pointfile] useradd .nf By default, pointfile is points.txt .fi .TP .B ATTENTION! by default, a new user is added blocked, set 'locked/no' in points.txt to unlock .TP .B BLACKLIST MSG ./ii-tool [-db db] blacklist .nf Blacklist is just new record with same id but spectial status. .fi .SH EXAMPLES .TP Get database from remote node and store to ./db idecctl fetch http://hugeping.tk .TP Fetch messages echo "std.club:this comment will be omitted" | idecctl fetch http://127.0.0.1:8080 - .TP get last message idecctl select std.club -1:1 .TP get first 10 messages idecctl select std.club 0:10 .TP To show last 5 messages adressed to selected user (sort ids by date with sort command) idecctl [options] -to select "" | idecctl sort | tail -n5 | idecctl -v sort .TP Show and print last message to Peter idecctl -v -to Peter "" -1:1 .SH SEE ALSO openidec(1), idecd(1), idecgmi(1) .SH AUTHOR hugeping ( gl00my (at) mail.ru )