openidec

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

idecctl.1 (2874B)


      1 .TH idecctl 1  "March 12, 2023" "version 0.0.1" "OpenIDEC"
      2 .SH NAME
      3 idecctl - idec db tool
      4 .SH SYNOPSIS
      5 .B idecctl
      6 [options] command [arguments]
      7 .SH DESCRIPTION
      8 .B idecctl
      9 can be used to fetch messages from another node and maintaince database.
     10 .SH OPTIONS
     11 .TP
     12 .B FETCH MESSAGES
     13 .B idecctl
     14 [options]
     15 .B fetch
     16 [uri] [echolist]
     17 .nf
     18 
     19 -db <database>
     20   db by default (db.idx \- genetated index)
     21 
     22 -lim=<n>
     23   fetch mode, if omitted full sync will be performed if needed
     24   if n > 0 - last n messages synced
     25   if n < 0 - adaptive fetching with step n will be performed
     26 
     27 -f
     28   do not check last message, perform sync even it is not needed
     29 
     30 echolist is the file with echonames (can has : splitted columns, like list.txt)
     31 or '-' to load it from stdin
     32 
     33 If echolist is omitted, fetcher will try to get all echos.
     34 It uses list.txt extension of IDEC if target node supports it.
     35 .fi
     36 .TP
     37 .B CREATE INDEX
     38 .B idecctl
     39 index
     40 .nf
     41 Index file (db.idx by default) is created when needed.
     42 If you want force to recreate it, use: idecctl index
     43 .fi
     44 .TP
     45 .B STORE BUNDLE INTO DB
     46 .B idecctl
     47 [options]
     48 .B store
     49 [DB]
     50 .nf
     51 
     52 You can merge records from DB to db with store command.
     53 
     54 -db <database>
     55   db to store/merge in
     56   db - is file with bundles or '-' for stdin.
     57 
     58 DB is just msgid:message bundles in base64 stored in text file.
     59 .fi
     60 .TP
     61 .B SHOW MESSAGES
     62 .nf
     63 Select messages:
     64   idecctl [options] select <echo.name> [slice]
     65 
     66    slice is the start:limit
     67 
     68 Messages are identificated by unique message ids (MsgId).
     69 It is the first column in bundle: <msgid>:<message>
     70 
     71 Show selected message:
     72   idecctl [options] get <MsgId>
     73 
     74 Search message:
     75   idecctl [options] search <string> [echo]
     76 
     77 .B options:
     78   -from <user>   -- from user
     79   -to <user>     -- to user
     80   -t             -- only topics (w/o repto)
     81   -db <database> -- db by default (db.idx - genetated index)
     82   -v             -- show message text, not only MsgId
     83 
     84 .fi
     85 .TP
     86 .B ADD USER (POINT)
     87 idecctl [-u pointfile] useradd <name> <e-mail> <password>
     88 .nf
     89 
     90 By default, pointfile is points.txt
     91 .fi
     92 .TP 
     93 .B ATTENTION!
     94 by default, a new user is added blocked, set 'locked/no' in points.txt to unlock
     95 .TP
     96 .B BLACKLIST MSG
     97 ./ii-tool [-db db] blacklist <MsgId>
     98 .nf
     99 
    100 Blacklist is just new record with same id but spectial status.
    101 .fi
    102 .SH EXAMPLES
    103 .TP Get database from remote node and store to ./db
    104 idecctl fetch http://hugeping.tk
    105 .TP
    106 Fetch messages
    107 echo "std.club:this comment will be omitted" | idecctl fetch http://127.0.0.1:8080 -
    108 .TP
    109 get last message
    110 idecctl select std.club -1:1
    111 .TP
    112 get first 10 messages
    113 idecctl select std.club 0:10
    114 .TP
    115 To show last 5 messages adressed to selected user (sort ids by date with sort command)
    116 idecctl [options] -to <user> select "" | idecctl sort | tail -n5 | idecctl -v sort
    117 .TP
    118 Show and print last message to Peter
    119 idecctl -v -to Peter "" -1:1
    120 .SH SEE ALSO
    121 openidec(1), idecd(1), idecgmi(1)
    122 .SH AUTHOR
    123 hugeping ( gl00my (at) mail.ru )