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