Commit | Line | Data |
---|---|---|
d6e4e60d AS |
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 | |
1a00f4c0 | 14 | [diaspy](https://github.com/marekjm/diaspy) Python library. |
bfc18b3e AS |
15 | |
16 | Installation | |
17 | ------------ | |
18 | ||
1a00f4c0 | 19 | We 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 |
27 | This gives me version 0.6.0. When I use `pip3 install diaspy` I get |
28 | version 0.3.0 and that doesn't work. 🤷 | |
b8a9d951 | 29 | |
bfc18b3e AS |
30 | Quickstart |
31 | ========== | |
32 | ||
a5282113 | 33 | ```text |
bfc18b3e AS |
34 | $ python3 jan-pona-mute.py |
35 | Welcome to Diaspora! Use the intro command for a quick introduction. | |
36 | Pager set: /usr/bin/fold | |
37 | > account kensanata@pluspora.com | |
38 | Username and pod set: kensanata@pluspora.com | |
39 | > password *secret* | |
40 | Password set | |
41 | > login | |
1860d749 AS |
42 | Setting up a connection... |
43 | Logging 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... | |
50 | Enter a number to select the notification. | |
51 | > 1 | |
52 | 2019-08-13T19:40:17.000Z Joe Doe has liked your post I've started writing... | |
53 | Loading... | |
54 | ||
55 | I've started writing a Diaspora client for the command line. It's called Jan Pona | |
56 | Mute which means as much as "many friends" in English. It's written in Python and | |
57 | doesn't do much. | |
58 | > comments | |
59 | There are no comments on the selected post. | |
60 | > comment This is me leaving a comment. | |
61 | Comment posted | |
62 | > comments | |
63 | ||
64 | 1. 2019-08-13T20:04:35.000Z Alex Schroeder | |
65 | ||
66 | Alex Schroeder (e3bd7110b2ee013620f200505608f9fe): This is me leaving a comment. | |
67 | > quit | |
68 | Be safe! | |
69 | ``` | |
70 | ||
71 | Next Step | |
72 | --------- | |
73 | ||
74 | Use the `save` command to save the login information (including the | |
75 | password!) to an init file. | |
76 | ||
77 | The init files searched are: | |
78 | ||
79 | 1. `~/.config/jan-pona-mute/login` | |
281401ba | 80 | 2. `~/.jan-pona-mute.d/login` |
bfc18b3e AS |
81 | 3. `~/.jan-pona-mute` |
82 | ||
83 | If one of them exists while starting up, that's the file that gets | |
84 | written. If none exists, the first one is going to be created by the | |
85 | `save` command. | |
86 | ||
87 | Any further commands you put into the file are simple executed as if | |
e1a5ba15 AS |
88 | you were to type them every time you start the program. A simple |
89 | change would be to add `notifications` as a command to the end of the | |
90 | file. | |
bfc18b3e | 91 | |
8aac6bbd AS |
92 | Notes |
93 | ----- | |
94 | ||
95 | One thing I care about is editing comments with my favourite editor | |
96 | and previewing them. This works really well if you have `mdcat` as it | |
97 | renders Markdown. Here's the workflow: | |
98 | ||
99 | 1. check notifications | |
100 | 2. pick a post | |
101 | 3. show latest comments | |
102 | 4. compose a note | |
103 | 5. preview note | |
104 | 6. leave a comment with that note | |
105 | ||
106 | This is what it looks like, assuming your editor is `ed`: | |
107 | ||
a5282113 | 108 | ```text |
8aac6bbd AS |
109 | > notifications |
110 | ... | |
111 | > 1 | |
112 | ... | |
113 | > comments | |
114 | ... | |
115 | > note nice | |
116 | /home/alex/.config/jan-pona-mute/notes/nice: No such file or directory | |
117 | a | |
118 | OK, I like this. Thanks! | |
119 | . | |
120 | w | |
121 | 25 | |
122 | q | |
123 | 1. nice | |
124 | Use 'edit' to create a note. | |
125 | > preview 1 | |
126 | OK, I like this. Thanks! | |
127 | > comment 1 | |
128 | ``` | |
129 | ||
bfc18b3e AS |
130 | Reference |
131 | --------- | |
132 | ||
133 | So much is still in flux. Please use the `help` command to learn more. |