HELP.html 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. <!DOCTYPE HTML>
  2. <html lang="ru-RU">
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <meta name="keywords" content="">
  7. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  8. <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
  9. <link rel="stylesheet" type="text/css" href="retro.css">
  10. <title>diclipy doc</title>
  11. </head>
  12. <body>
  13. <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>
  14. <h2 id="dependencies">Dependencies:</h2>
  15. <ul>
  16. <li>python3</li>
  17. <li><a href="https://github.com/marekjm/diaspy">diaspy</a></li>
  18. <li><a href="https://github.com/marekjm/clap">clap</a></li>
  19. </ul>
  20. <h2 id="usage">Usage:</h2>
  21. <p>Run <code>diclipy -h</code> for help.</p>
  22. <p>Config folder: ~/.diclipy</p>
  23. <p>Doc.: <a href="http://pythonhosted.org/diclipy" class="uri">http://pythonhosted.org/diclipy</a></p>
  24. <h2 id="install">Install:</h2>
  25. <p><code>pip3 install diclipy</code></p>
  26. <h2><font color="red">If you get errors,<br> install from git:</font></h2>
  27. <h3 id="clap">clap:</h3>
  28. <ol style="list-style-type: decimal">
  29. <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>
  30. <li><code>cd</code> to <code>clap</code> folder</li>
  31. <li><code>pip3 install .</code></li>
  32. </ol>
  33. <h3 id="diaspy">diaspy:</h3>
  34. <ol style="list-style-type: decimal">
  35. <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>
  36. <li><code>cd</code> to <code>diaspy</code> folder</li>
  37. <li><code>pip3 install .</code></li>
  38. </ol>
  39. <h3 id="diclipy">diclipy:</h3>
  40. <ol style="list-style-type: decimal">
  41. <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>
  42. <li><code>cd</code> to folder</li>
  43. <li><code>pip3 install .</code></li>
  44. </ol>
  45. <h2 id="help">Help:</h2>
  46. <pre><code>SYNTAX:
  47. diclipy [OPTIONS ...] [COMMAND [COMMAND OPTIONS ...]]
  48. OPTIONS:
  49. -h, --help - Display this help.
  50. -v, --verbose - Be verbose.
  51. -d, --debug - Print a lot of debug scrap
  52. (WARNING: password too!).
  53. -V, --version - Display version information.
  54. -C, --component &lt;str&gt; - Which component&#39;s version to display:
  55. ui, backend|diaspy, clap.
  56. -Q, --quiet - Be quiet.
  57. LOGIN OPTIONS:
  58. -H, --handle HANDLE - Diaspora* handle (USER@POD) (overrides config)
  59. (not load saved password).
  60. -P, --password PASSWORD - Specify password.
  61. -p, --proto &lt;str&gt; - Protocol to use (default: &#39;https&#39;).
  62. -s, --save-auth - Store auth data as plain json file
  63. (~/.diclipy/auth.json).
  64. -S, --set-default - Set default handle (requires: --handle|-H)
  65. (~/.diclipy/defhandle.json).
  66. -L, --load-auth - Load saved password associated with handle
  67. being used (default).
  68. -D, --use-default - Use default handle (default)
  69. (if not set you&#39;ll be asked for login data).
  70. EXAMPLES:
  71. Save auth to file &amp; set default handle:
  72. diclipy -sS [...]
  73. or:
  74. diclipy -sSH USER@POD [...]
  75. or:
  76. diclipy -sSH USER@POD -P PASSWORD [...]
  77. or save only password:
  78. diclipy -s [...]
  79. or only set default handle:
  80. diclipy -S [...]
  81. Load saved password &amp; use default handle (default):
  82. diclipy -LD [...]
  83. Show version:
  84. diclipy -V -C ui
  85. diclipy -v -V -C backend
  86. diclipy -vVC clap
  87. COMMAND:
  88. post - operations with posts.
  89. notifs - operations with notifications.
  90. COMMAND OPTIONS:
  91. `post` command options:
  92. -m, --message &quot;MESSAGE&quot; - Send post with given message
  93. (conflicts: --read, --reshare)
  94. if &quot;MESSAGE&quot; = &quot;-&quot; then read data from stdin.
  95. -A, --aspect ID - Aspect ID to send post to (default: &quot;public&quot;)
  96. (&quot;public&quot;, &quot;all&quot;, or aspect ID number)
  97. you can find aspect numeric value at your
  98. Diaspora contacts page in aspects links list
  99. e.g.: for &#39;https://POD/contacts?a_id=1234567&#39;
  100. aspect ID is: &#39;1234567&#39;.
  101. -i, --image &quot;PATH&quot; - Attach image to post.
  102. -r, --read - Read post of given ID (conflicts: --message).
  103. -a, --also-comments - Read also post comments (requires: --read).
  104. -R, --reshare - Reshare post of given ID
  105. (conflicts: --message).
  106. -c, --comment &quot;COMMENT&quot; - Comment the post of given ID
  107. (conflicts: --message)
  108. if &quot;COMMENT&quot; = &quot;-&quot; read from stdin.
  109. -l, --like - Like the post of given ID
  110. (conflicts: --message).
  111. -I, --id ID - Supplies post ID
  112. (for: --read, --reshare, --comment, --like).
  113. -s, --stdin - Read data from --message|--comment arg
  114. and + system standart input
  115. (requires: --message|--comment).
  116. `notifs` (notifications) command options:
  117. -l, --last - Check your unread notifications.
  118. -U, --unread-only - Display only unread notifications.
  119. -r, --read - Mark listed notifications as read
  120. (by default notifications are not marked).
  121. -p, --page N - Print N-th page of notifications.
  122. -P, --per-page N - Print N notifications per page.
  123. EXAMPLES:
  124. SEND THE POST:
  125. diclipy post -m &quot;MESSAGE&quot;
  126. diclipy -H USER@POD -P PASSWORD post -m &quot;MESSAGE&quot;
  127. diclipy post -A ASPECT_ID -m &quot;MESSAGE&quot;
  128. diclipy post -m &quot;MESSAGE WITH
  129. LINE BREAKS,
  130. PIC &amp; TAGS
  131. ![](PICTURE.JPG)
  132. #TAG1 #TAG2 #TAG3&quot;
  133. SEND THE POST FROM SYSTEM STDIN:
  134. diclipy post -m -
  135. ... TYPE MESSAGE (multiline acceptably) &amp; PRESS: Ctrl+d
  136. diclipy post -sm &#39;&#39;
  137. ... TYPE MESSAGE &amp; PRESS: Ctrl+d
  138. echo &quot;It&#39;s a post through pipe!&quot; | diclipy post -m -
  139. diclipy post -m - &lt;&lt;&lt;&quot;It&#39;s a stdin post again! Whoo!&quot;
  140. diclipy post -m - &lt;&lt;EOF
  141. It&#39;s a stdin post
  142. with line breaks!
  143. Yay!
  144. EOF
  145. READ THE POST OF GIVEN ID:
  146. diclipy post -rI ID
  147. READ THE POST OF GIVEN ID + COMMENTS:
  148. diclipy post -raI ID
  149. RESHARE THE POST OF GIVEN ID:
  150. diclipy post -RI ID
  151. LIKE THE POST OF GIVEN ID:
  152. diclipy post -lI ID
  153. COMMENTING POST OF GIVEN ID:
  154. diclipy post -I ID -c &quot;COMMENT&quot;
  155. diclipy post -I ID -c &quot;COMMENT WITH
  156. LINE
  157. BREAKS&quot;
  158. COMMENTING POST OF GIVEN ID FROM SYSTEM STDIN:
  159. diclipy post -I ID -c -
  160. ... TYPE COMMENT &amp; PRESS: Ctrl+d
  161. diclipy post -I ID -sc &#39;&#39;
  162. ... TYPE COMMENT &amp; PRESS: Ctrl+d
  163. echo &quot;It&#39;s a comment through pipe!&quot; | diclipy post -I ID -c -
  164. BE VERBOSE:
  165. diclipy -v post -I ID -c - &lt;&lt;&lt;&quot;It&#39;s stdin again!&quot;
  166. diclipy -v post -I ID -c - &lt;&lt;EOF
  167. It&#39;s a
  168. multiline
  169. stdin
  170. comment!
  171. EOF
  172. READ YOUR UNREAD NOTIFICATIONS:
  173. READ LAST:
  174. diclipy notifs --last
  175. diclipy notifs -l
  176. READ LAST 20 PER PAGE:
  177. diclipy notifs --last --per-page 20
  178. diclipy notifs --page 2 --per-page 20
  179. diclipy notifs -p 2 -P 20
  180. --
  181. diacli: Copyright Marek Marecki (c) 2013 https://github.com/marekjm/diacli
  182. This is free software published under GNU GPL v3 license
  183. or any later version of this license.
  184. diclipy: Copyleft uzver(at)protonmail.ch (ɔ) 2022 - till the end of the Universe.</code></pre>
  185. </body>
  186. </html>