-
Notifications
You must be signed in to change notification settings - Fork 0
/
HELP.html
207 lines (186 loc) · 8.85 KB
/
HELP.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
<!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>