Add m shortcut
[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.
bfc18b3e 31
a5282113 32```text
b8a9d951
AS
33$ git clone https://github.com/marekjm/diaspy.git
34$ cd diaspy
35$ pip3 install .
bfc18b3e
AS
36```
37
1a00f4c0
AS
38This gives me version 0.6.0. When I use `pip3 install diaspy` I get
39version 0.3.0 and that doesn't work. 🤷
b8a9d951 40
16c43336
AS
41You need to download this program as well, obviously.
42
43```text
44$ git clone https://alexschroeder.ch/cgit/jan-pona-mute
45```
46
47With that done, you should be able to run it:
48
49```text
50$ python3 jan-pona-mute/jan-pona-mute.py
51```
52
bfc18b3e 53Quickstart
56a22d5e 54----------
bfc18b3e 55
a5282113 56```text
bfc18b3e
AS
57$ python3 jan-pona-mute.py
58Welcome to Diaspora! Use the intro command for a quick introduction.
59Pager set: /usr/bin/fold
60> account kensanata@pluspora.com
61Username and pod set: kensanata@pluspora.com
62> password *secret*
63Password set
64> login
1860d749
AS
65Setting up a connection...
66Logging in...
e1a5ba15 67> notifications
bfc18b3e
AS
68 1. 2019-08-13T19:40:17.000Z Joe Doe has liked your post I've started writing...
69 2. 2019-08-13T17:59:23.000Z Joe Doe commented on your post Please help me wi...
70 3. 2019-08-13T17:03:45.000Z Jane Doe has liked your post I've started writin...
71 4. 2019-08-13T15:02:50.000Z June Doe commented on your post I don't like Mon...
72 5. 2019-08-13T14:48:51.000Z John Doe liked your post Monday again! What am I...
73Enter a number to select the notification.
74> 1
752019-08-13T19:40:17.000Z Joe Doe has liked your post I've started writing...
76Loading...
77
78I've started writing a Diaspora client for the command line. It's called Jan Pona
79Mute which means as much as "many friends" in English. It's written in Python and
80doesn't do much.
81> comments
82There are no comments on the selected post.
83> comment This is me leaving a comment.
84Comment posted
85> comments
86
87 1. 2019-08-13T20:04:35.000Z Alex Schroeder
88
89Alex Schroeder (e3bd7110b2ee013620f200505608f9fe): This is me leaving a comment.
90> quit
91Be safe!
92```
93
94Next Step
95---------
96
97Use the `save` command to save the login information (including the
98password!) to an init file.
99
100The init files searched are:
101
1021. `~/.config/jan-pona-mute/login`
281401ba 1032. `~/.jan-pona-mute.d/login`
bfc18b3e
AS
1043. `~/.jan-pona-mute`
105
106If one of them exists while starting up, that's the file that gets
107written. If none exists, the first one is going to be created by the
108`save` command.
109
110Any further commands you put into the file are simple executed as if
e1a5ba15
AS
111you were to type them every time you start the program. A simple
112change would be to add `notifications` as a command to the end of the
113file.
bfc18b3e 114
8aac6bbd
AS
115Notes
116-----
117
118One thing I care about is editing comments with my favourite editor
1f585158
AS
119and previewing them. This works really well if you have
120[mdcat](https://github.com/lunaryorn/mdcat) as it renders Markdown.
121Here's the workflow:
8aac6bbd
AS
122
1231. check notifications
1242. pick a post
1253. show latest comments
1264. compose a note
1275. preview note
1286. leave a comment with that note
129
130This is what it looks like, assuming your editor is `ed`:
131
a5282113 132```text
8aac6bbd
AS
133> notifications
134...
135> 1
136...
137> comments
138...
139> note nice
140/home/alex/.config/jan-pona-mute/notes/nice: No such file or directory
141a
142OK, I like this. Thanks!
143.
144w
14525
146q
147 1. nice
148Use 'edit' to create a note.
149> preview 1
150OK, I like this. Thanks!
151> comment 1
152```
153
bfc18b3e
AS
154Reference
155---------
156
157So much is still in flux. Please use the `help` command to learn more.
1f585158
AS
158
159* use **intro** if you want to skip reading the rest of this list 😅
160
161* use **account**, **password**, and **login** to login into your
162 account; use **save** to store these three commands in your init
163 file
164
165* use **shortcuts** to show the current shortcuts; use **shortcut** to
166 define a new shortcut; these are good commands to add to your init
167 file (the **save** command won't do this for you)
168
169* use **notifications** to see the latest notifications, use
170 **notifications reload** to update the list; this is also a good
171 command to add to your init file
172
173* use **home** to see your home stream, use **home reload** to update
174 the list; use **home all** to see the full list; use **home 3** to
175 see the last 3 items
176
177* use **show** and a number to show the post a notification is
ca69dfcb
AS
178 referring to, or to choose a post from your home stream; use
179 **next** and **previous** to move from item to item; this is how you
180 select a post which allows you to use **comments** to show the
181 comments for that post; use **comments 3** to see the last 3 items
1f585158
AS
182
183* use **comment** to post a comment, use **post** to write a new post;
184 if you use a number instead of a writing a text, the number refers
185 to a note (see below)
186
187* use **undo** to delete a comment or post after writing it; use
188 **delete comment** or **delete post** to delete them at a later date
189
190* use **edit** and a filename to write a note; use **notes** to list
191 your notes; use **preview** to show a note; use **delete note** to
192 delete a note
193
194* use **editor** to set your favourite editor (or set the EDITOR
195 environment variable); use **pager** to set your favourite page (or
196 set the PAGER environment variable); consider installing
197 [mdcat](https://github.com/lunaryorn/mdcat) and using it as your pager
198
199* use **info** to review your settings
200
201* use **quit** to end the program