README: recommend my own diaspy repo
[jan-pona-mute.git] / README.md
CommitLineData
d6e4e60d
AS
1Jan Pona Mute
2=============
3
4The name is Toki Pona and means "many friends".
5
6This is a very simple command line client for Diaspora that helps me
7deal with my specific use-cases:
8
9- I want to check Diaspora for new comment on my threads
10- I want to leave new comments on my threads
11- I want to delete comments I left by mistake
12
13It's *very* limited but it's helping me get started using the
1a00f4c0 14[diaspy](https://github.com/marekjm/diaspy) Python library.
bfc18b3e 15
56a22d5e
AS
16<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-refresh-toc -->
17**Table of Contents**
18
19- [Installation](#installation)
20- [Quickstart](#quickstart)
21- [Next Step](#next-step)
22- [Notes](#notes)
23- [Reference](#reference)
24
25<!-- markdown-toc end -->
26
bfc18b3e
AS
27Installation
28------------
29
1a00f4c0 30We need the [diaspy](https://github.com/marekjm/diaspy) library.
8483021b
AS
31Sadly, I've run into a few issues and made some fixes. I contributed
32these back but just to be sure I recommend you install diaspy from my
33own repository. That's the one I use.
bfc18b3e 34
a5282113 35```text
8483021b 36$ git clone https://alexschroeder.ch/cgit/diaspy
b8a9d951
AS
37$ cd diaspy
38$ pip3 install .
bfc18b3e
AS
39```
40
8483021b
AS
41Note that using `pip3 install diaspy` gets me a much older revision
42and things won't work at all. 🤷
b8a9d951 43
8483021b 44You need to download `jan-pona-mute` as well, obviously:
16c43336
AS
45
46```text
47$ git clone https://alexschroeder.ch/cgit/jan-pona-mute
48```
49
50With that done, you should be able to run it:
51
52```text
53$ python3 jan-pona-mute/jan-pona-mute.py
54```
55
bfc18b3e 56Quickstart
56a22d5e 57----------
bfc18b3e 58
a5282113 59```text
bfc18b3e
AS
60$ python3 jan-pona-mute.py
61Welcome to Diaspora! Use the intro command for a quick introduction.
62Pager set: /usr/bin/fold
63> account kensanata@pluspora.com
64Username and pod set: kensanata@pluspora.com
65> password *secret*
66Password set
67> login
1860d749
AS
68Setting up a connection...
69Logging in...
e1a5ba15 70> notifications
bfc18b3e
AS
71 1. 2019-08-13T19:40:17.000Z Joe Doe has liked your post I've started writing...
72 2. 2019-08-13T17:59:23.000Z Joe Doe commented on your post Please help me wi...
73 3. 2019-08-13T17:03:45.000Z Jane Doe has liked your post I've started writin...
74 4. 2019-08-13T15:02:50.000Z June Doe commented on your post I don't like Mon...
75 5. 2019-08-13T14:48:51.000Z John Doe liked your post Monday again! What am I...
76Enter a number to select the notification.
77> 1
782019-08-13T19:40:17.000Z Joe Doe has liked your post I've started writing...
79Loading...
80
81I've started writing a Diaspora client for the command line. It's called Jan Pona
82Mute which means as much as "many friends" in English. It's written in Python and
83doesn't do much.
84> comments
85There are no comments on the selected post.
86> comment This is me leaving a comment.
87Comment posted
88> comments
89
90 1. 2019-08-13T20:04:35.000Z Alex Schroeder
91
92Alex Schroeder (e3bd7110b2ee013620f200505608f9fe): This is me leaving a comment.
93> quit
94Be safe!
95```
96
97Next Step
98---------
99
100Use the `save` command to save the login information (including the
101password!) to an init file.
102
103The init files searched are:
104
1051. `~/.config/jan-pona-mute/login`
281401ba 1062. `~/.jan-pona-mute.d/login`
bfc18b3e
AS
1073. `~/.jan-pona-mute`
108
109If one of them exists while starting up, that's the file that gets
110written. If none exists, the first one is going to be created by the
111`save` command.
112
113Any further commands you put into the file are simple executed as if
e1a5ba15
AS
114you were to type them every time you start the program. A simple
115change would be to add `notifications` as a command to the end of the
116file.
bfc18b3e 117
8aac6bbd
AS
118Notes
119-----
120
121One thing I care about is editing comments with my favourite editor
1f585158
AS
122and previewing them. This works really well if you have
123[mdcat](https://github.com/lunaryorn/mdcat) as it renders Markdown.
124Here's the workflow:
8aac6bbd
AS
125
1261. check notifications
1272. pick a post
1283. show latest comments
1294. compose a note
1305. preview note
1316. leave a comment with that note
132
133This is what it looks like, assuming your editor is `ed`:
134
a5282113 135```text
8aac6bbd
AS
136> notifications
137...
138> 1
139...
140> comments
141...
142> note nice
143/home/alex/.config/jan-pona-mute/notes/nice: No such file or directory
144a
145OK, I like this. Thanks!
146.
147w
14825
149q
150 1. nice
151Use 'edit' to create a note.
152> preview 1
153OK, I like this. Thanks!
154> comment 1
155```
156
bfc18b3e
AS
157Reference
158---------
159
160So much is still in flux. Please use the `help` command to learn more.
1f585158
AS
161
162* use **intro** if you want to skip reading the rest of this list 😅
163
164* use **account**, **password**, and **login** to login into your
165 account; use **save** to store these three commands in your init
166 file
167
168* use **shortcuts** to show the current shortcuts; use **shortcut** to
169 define a new shortcut; these are good commands to add to your init
170 file (the **save** command won't do this for you)
171
172* use **notifications** to see the latest notifications, use
173 **notifications reload** to update the list; this is also a good
174 command to add to your init file
175
176* use **home** to see your home stream, use **home reload** to update
177 the list; use **home all** to see the full list; use **home 3** to
178 see the last 3 items
179
180* use **show** and a number to show the post a notification is
ca69dfcb
AS
181 referring to, or to choose a post from your home stream; use
182 **next** and **previous** to move from item to item; this is how you
183 select a post which allows you to use **comments** to show the
184 comments for that post; use **comments 3** to see the last 3 items
1f585158
AS
185
186* use **comment** to post a comment, use **post** to write a new post;
187 if you use a number instead of a writing a text, the number refers
188 to a note (see below)
189
190* use **undo** to delete a comment or post after writing it; use
191 **delete comment** or **delete post** to delete them at a later date
192
193* use **edit** and a filename to write a note; use **notes** to list
194 your notes; use **preview** to show a note; use **delete note** to
195 delete a note
196
197* use **editor** to set your favourite editor (or set the EDITOR
198 environment variable); use **pager** to set your favourite page (or
199 set the PAGER environment variable); consider installing
200 [mdcat](https://github.com/lunaryorn/mdcat) and using it as your pager
201
202* use **info** to review your settings
203
204* use **quit** to end the program