123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207 |
- <!DOCTYPE HTML>
- <html lang="ru-RU">
- <head>
- <meta charset="utf-8" />
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta name="keywords" content="">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
- <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
- <link rel="stylesheet" type="text/css" href="retro.css">
- <title>diclipy doc</title>
- </head>
- <body>
- <h1 id="diclipy---cli-python-script-for-postingreadingcommenting-on-diaspora-pod-written-around-diaspydiaspy-api"><a href="https://notabug.org/uzver/diclipy">diclipy</a> - CLI python script for posting/reading/commenting on <a href="http://diasporafoundation.org">Diaspora*</a> pod written around <a href="https://github.com/marekjm/diaspy">Diaspy</a> API</h1>
- <h2 id="dependencies">Dependencies:</h2>
- <ul>
- <li>python3</li>
- <li><a href="https://github.com/marekjm/diaspy">diaspy</a></li>
- <li><a href="https://github.com/marekjm/clap">clap</a></li>
- </ul>
- <h2 id="usage">Usage:</h2>
- <p>Run <code>diclipy -h</code> for help.</p>
- <p>Config folder: ~/.diclipy</p>
- <p>Doc.: <a href="http://pythonhosted.org/diclipy" class="uri">http://pythonhosted.org/diclipy</a></p>
- <h2 id="install">Install:</h2>
- <p><code>pip3 install diclipy</code></p>
- <h2><font color="red">If you get errors,<br> install from git:</font></h2>
- <h3 id="clap">clap:</h3>
- <ol style="list-style-type: decimal">
- <li>download and unpack <a href="https://github.com/marekjm/clap/archive/refs/heads/devel.zip">clap</a> or clone <a href="https://github.com/marekjm/clap">repo</a></li>
- <li><code>cd</code> to <code>clap</code> folder</li>
- <li><code>pip3 install .</code></li>
- </ol>
- <h3 id="diaspy">diaspy:</h3>
- <ol style="list-style-type: decimal">
- <li>download and unpack <a href="https://github.com/marekjm/diaspy/archive/refs/heads/master.zip">diaspy</a> or clone <a href="https://github.com/marekjm/diaspy">repo</a></li>
- <li><code>cd</code> to <code>diaspy</code> folder</li>
- <li><code>pip3 install .</code></li>
- </ol>
- <h3 id="diclipy">diclipy:</h3>
- <ol style="list-style-type: decimal">
- <li>download and unpack <a href="https://notabug.org/uzver/diclipy/archive/master.zip">diclipy</a> or clone <a href="https://notabug.org/uzver/diclipy">repo</a> (<a href="https://github.com/Flashwalker/diclipy">mirror</a>)</li>
- <li><code>cd</code> to folder</li>
- <li><code>pip3 install .</code></li>
- </ol>
- <h2 id="help">Help:</h2>
- <pre><code>SYNTAX:
- diclipy [OPTIONS ...] [COMMAND [COMMAND OPTIONS ...]]
- OPTIONS:
- -h, --help - Display this help.
- -v, --verbose - Be verbose.
- -d, --debug - Print a lot of debug scrap
- (WARNING: password too!).
- -V, --version - Display version information.
- -C, --component <str> - Which component's version to display:
- ui, backend|diaspy, clap.
- -Q, --quiet - Be quiet.
- LOGIN OPTIONS:
- -H, --handle HANDLE - Diaspora* handle (USER@POD) (overrides config)
- (not load saved password).
- -P, --password PASSWORD - Specify password.
- -p, --proto <str> - Protocol to use (default: 'https').
- -s, --save-auth - Store auth data as plain json file
- (~/.diclipy/auth.json).
- -S, --set-default - Set default handle (requires: --handle|-H)
- (~/.diclipy/defhandle.json).
- -L, --load-auth - Load saved password associated with handle
- being used (default).
- -D, --use-default - Use default handle (default)
- (if not set you'll be asked for login data).
- EXAMPLES:
- Save auth to file & set default handle:
- diclipy -sS [...]
- or:
- diclipy -sSH USER@POD [...]
- or:
- diclipy -sSH USER@POD -P PASSWORD [...]
- or save only password:
- diclipy -s [...]
- or only set default handle:
- diclipy -S [...]
- Load saved password & use default handle (default):
- diclipy -LD [...]
- Show version:
- diclipy -V -C ui
- diclipy -v -V -C backend
- diclipy -vVC clap
- COMMAND:
- post - operations with posts.
- notifs - operations with notifications.
- COMMAND OPTIONS:
- `post` command options:
- -m, --message "MESSAGE" - Send post with given message
- (conflicts: --read, --reshare)
- if "MESSAGE" = "-" then read data from stdin.
- -A, --aspect ID - Aspect ID to send post to (default: "public")
- ("public", "all", or aspect ID number)
- you can find aspect numeric value at your
- Diaspora contacts page in aspects links list
- e.g.: for 'https://POD/contacts?a_id=1234567'
- aspect ID is: '1234567'.
- -i, --image "PATH" - Attach image to post.
- -r, --read - Read post of given ID (conflicts: --message).
- -a, --also-comments - Read also post comments (requires: --read).
- -R, --reshare - Reshare post of given ID
- (conflicts: --message).
- -c, --comment "COMMENT" - Comment the post of given ID
- (conflicts: --message)
- if "COMMENT" = "-" read from stdin.
- -l, --like - Like the post of given ID
- (conflicts: --message).
- -I, --id ID - Supplies post ID
- (for: --read, --reshare, --comment, --like).
- -s, --stdin - Read data from --message|--comment arg
- and + system standart input
- (requires: --message|--comment).
- `notifs` (notifications) command options:
- -l, --last - Check your unread notifications.
- -U, --unread-only - Display only unread notifications.
- -r, --read - Mark listed notifications as read
- (by default notifications are not marked).
- -p, --page N - Print N-th page of notifications.
- -P, --per-page N - Print N notifications per page.
- EXAMPLES:
- SEND THE POST:
- diclipy post -m "MESSAGE"
- diclipy -H USER@POD -P PASSWORD post -m "MESSAGE"
- diclipy post -A ASPECT_ID -m "MESSAGE"
- diclipy post -m "MESSAGE WITH
- LINE BREAKS,
- PIC & TAGS
- ![](PICTURE.JPG)
- #TAG1 #TAG2 #TAG3"
- SEND THE POST FROM SYSTEM STDIN:
- diclipy post -m -
- ... TYPE MESSAGE (multiline acceptably) & PRESS: Ctrl+d
- diclipy post -sm ''
- ... TYPE MESSAGE & PRESS: Ctrl+d
- echo "It's a post through pipe!" | diclipy post -m -
- diclipy post -m - <<<"It's a stdin post again! Whoo!"
- diclipy post -m - <<EOF
- It's a stdin post
- with line breaks!
- Yay!
- EOF
- READ THE POST OF GIVEN ID:
- diclipy post -rI ID
- READ THE POST OF GIVEN ID + COMMENTS:
- diclipy post -raI ID
- RESHARE THE POST OF GIVEN ID:
- diclipy post -RI ID
- LIKE THE POST OF GIVEN ID:
- diclipy post -lI ID
- COMMENTING POST OF GIVEN ID:
- diclipy post -I ID -c "COMMENT"
- diclipy post -I ID -c "COMMENT WITH
- LINE
- BREAKS"
- COMMENTING POST OF GIVEN ID FROM SYSTEM STDIN:
- diclipy post -I ID -c -
- ... TYPE COMMENT & PRESS: Ctrl+d
- diclipy post -I ID -sc ''
- ... TYPE COMMENT & PRESS: Ctrl+d
- echo "It's a comment through pipe!" | diclipy post -I ID -c -
- BE VERBOSE:
- diclipy -v post -I ID -c - <<<"It's stdin again!"
- diclipy -v post -I ID -c - <<EOF
- It's a
- multiline
- stdin
- comment!
- EOF
- READ YOUR UNREAD NOTIFICATIONS:
- READ LAST:
- diclipy notifs --last
- diclipy notifs -l
- READ LAST 20 PER PAGE:
- diclipy notifs --last --per-page 20
- diclipy notifs --page 2 --per-page 20
- diclipy notifs -p 2 -P 20
- --
- diacli: Copyright Marek Marecki (c) 2013 https://github.com/marekjm/diacli
- This is free software published under GNU GPL v3 license
- or any later version of this license.
- diclipy: Copyleft uzver(at)protonmail.ch (ɔ) 2022 - till the end of the Universe.</code></pre>
- </body>
- </html>
|