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