README: add more details about installation
[jan-pona-mute.git] / README.md
1 Jan Pona Mute
2 =============
3
4 The name is Toki Pona and means "many friends".
5
6 This is a very simple command line client for Diaspora that helps me
7 deal 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
13 It's *very* limited but it's helping me get started using the
14 [diaspy](https://github.com/marekjm/diaspy) Python library.
15
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
27 Installation
28 ------------
29
30 We need the [diaspy](https://github.com/marekjm/diaspy) library.
31
32 ```text
33 $ git clone https://github.com/marekjm/diaspy.git
34 $ cd diaspy
35 $ pip3 install .
36 ```
37
38 This gives me version 0.6.0. When I use `pip3 install diaspy` I get
39 version 0.3.0 and that doesn't work. 🤷
40
41 You need to download this program as well, obviously.
42
43 ```text
44 $ git clone https://alexschroeder.ch/cgit/jan-pona-mute
45 ```
46
47 With that done, you should be able to run it:
48
49 ```text
50 $ python3 jan-pona-mute/jan-pona-mute.py
51 ```
52
53 Quickstart
54 ----------
55
56 ```text
57 $ python3 jan-pona-mute.py
58 Welcome to Diaspora! Use the intro command for a quick introduction.
59 Pager set: /usr/bin/fold
60 > account kensanata@pluspora.com
61 Username and pod set: kensanata@pluspora.com
62 > password *secret*
63 Password set
64 > login
65 Setting up a connection...
66 Logging in...
67 > notifications
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...
73 Enter a number to select the notification.
74 > 1
75 2019-08-13T19:40:17.000Z Joe Doe has liked your post I've started writing...
76 Loading...
77
78 I've started writing a Diaspora client for the command line. It's called Jan Pona
79 Mute which means as much as "many friends" in English. It's written in Python and
80 doesn't do much.
81 > comments
82 There are no comments on the selected post.
83 > comment This is me leaving a comment.
84 Comment posted
85 > comments
86
87 1. 2019-08-13T20:04:35.000Z Alex Schroeder
88
89 Alex Schroeder (e3bd7110b2ee013620f200505608f9fe): This is me leaving a comment.
90 > quit
91 Be safe!
92 ```
93
94 Next Step
95 ---------
96
97 Use the `save` command to save the login information (including the
98 password!) to an init file.
99
100 The init files searched are:
101
102 1. `~/.config/jan-pona-mute/login`
103 2. `~/.jan-pona-mute.d/login`
104 3. `~/.jan-pona-mute`
105
106 If one of them exists while starting up, that's the file that gets
107 written. If none exists, the first one is going to be created by the
108 `save` command.
109
110 Any further commands you put into the file are simple executed as if
111 you were to type them every time you start the program. A simple
112 change would be to add `notifications` as a command to the end of the
113 file.
114
115 Notes
116 -----
117
118 One thing I care about is editing comments with my favourite editor
119 and previewing them. This works really well if you have
120 [mdcat](https://github.com/lunaryorn/mdcat) as it renders Markdown.
121 Here's the workflow:
122
123 1. check notifications
124 2. pick a post
125 3. show latest comments
126 4. compose a note
127 5. preview note
128 6. leave a comment with that note
129
130 This is what it looks like, assuming your editor is `ed`:
131
132 ```text
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
141 a
142 OK, I like this. Thanks!
143 .
144 w
145 25
146 q
147 1. nice
148 Use 'edit' to create a note.
149 > preview 1
150 OK, I like this. Thanks!
151 > comment 1
152 ```
153
154 Reference
155 ---------
156
157 So much is still in flux. Please use the `help` command to learn more.
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
178 referring to, or to choose a post from your home stream; this is
179 what then allows you to use **comments** to show the comments to
180 that post; use **comments 3** to see the last 3 items
181
182 * use **comment** to post a comment, use **post** to write a new post;
183 if you use a number instead of a writing a text, the number refers
184 to a note (see below)
185
186 * use **undo** to delete a comment or post after writing it; use
187 **delete comment** or **delete post** to delete them at a later date
188
189 * use **edit** and a filename to write a note; use **notes** to list
190 your notes; use **preview** to show a note; use **delete note** to
191 delete a note
192
193 * use **editor** to set your favourite editor (or set the EDITOR
194 environment variable); use **pager** to set your favourite page (or
195 set the PAGER environment variable); consider installing
196 [mdcat](https://github.com/lunaryorn/mdcat) and using it as your pager
197
198 * use **info** to review your settings
199
200 * use **quit** to end the program