ayadn 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/CHANGELOG.md +232 -0
- data/CONTRIBUTORS.md +5 -0
- data/LICENSE.md +14 -0
- data/README.md +489 -0
- data/bin/ayadn +358 -0
- data/config.yml +35 -0
- data/lib/ayadn/adn_files.rb +84 -0
- data/lib/ayadn/api.rb +302 -0
- data/lib/ayadn/authorize.rb +29 -0
- data/lib/ayadn/client-http.rb +226 -0
- data/lib/ayadn/colors.rb +62 -0
- data/lib/ayadn/debug.rb +36 -0
- data/lib/ayadn/endpoints.rb +154 -0
- data/lib/ayadn/extend.rb +23 -0
- data/lib/ayadn/files.rb +184 -0
- data/lib/ayadn/get-api.rb +43 -0
- data/lib/ayadn/help.rb +149 -0
- data/lib/ayadn/list.rb +89 -0
- data/lib/ayadn/main.rb +536 -0
- data/lib/ayadn/pinboard.rb +37 -0
- data/lib/ayadn/post.rb +212 -0
- data/lib/ayadn/requires.rb +12 -0
- data/lib/ayadn/skip.rb +27 -0
- data/lib/ayadn/status.rb +166 -0
- data/lib/ayadn/tools.rb +204 -0
- data/lib/ayadn/user-stream.rb +91 -0
- data/lib/ayadn/view-channels.rb +119 -0
- data/lib/ayadn/view-interactions.rb +57 -0
- data/lib/ayadn/view-object.rb +193 -0
- data/lib/ayadn/view.rb +270 -0
- data/lib/ayadn.rb +24 -0
- data/lib/experiments.rb +109 -0
- metadata +110 -0
data/README.md
ADDED
@@ -0,0 +1,489 @@
|
|
1
|
+
AYADN
|
2
|
+
=====
|
3
|
+
|
4
|
+
[App.net](http://app.net) command-line client developed in Ruby.
|
5
|
+
|
6
|
+
- [FEATURES](#features)
|
7
|
+
- [TL;DR](#tl;dr)
|
8
|
+
- [IMPORTANT NOTE](#important-note)
|
9
|
+
- [INSTALL](#install)
|
10
|
+
- [HOW TO USE](#how-to-use)
|
11
|
+
- [Through the ruby interpreter](#through-the-ruby-interpreter)
|
12
|
+
- [As an executable in your path](#as-an-executable-in-your-path)
|
13
|
+
- [As a local executable](#as-a-local-executable)
|
14
|
+
- [If you made the symlink](#if-you-made-the-symlink)
|
15
|
+
- [With an alias](#with-an-alias)
|
16
|
+
- [LIST OF COMMANDS](#list-of-commands)
|
17
|
+
- [TIPS](#tips)
|
18
|
+
- [Username](#username)
|
19
|
+
- [Configuration](#configuration)
|
20
|
+
- [Skip specific posts](#skip-specific-posts)
|
21
|
+
- [Backup some data](#backup-some-data)
|
22
|
+
- [Post links](#post-links)
|
23
|
+
- [Reset pagination data](#reset-pagination-data)
|
24
|
+
- [Custom posts count](#custom-posts-count)
|
25
|
+
- [Running multiple accounts](#running-multiple-accounts)
|
26
|
+
- [Pinboard](#pinboard)
|
27
|
+
- ["me"](#me)
|
28
|
+
- [Shortcuts](#shortcuts)
|
29
|
+
- [Channels](#channels)
|
30
|
+
- [Just for fun](#just-for-fun)
|
31
|
+
- [HELP](#help)
|
32
|
+
- [Console](#console)
|
33
|
+
- [Database](#database)
|
34
|
+
- [GCC](#gcc)
|
35
|
+
- [CONTACT](#contact)
|
36
|
+
- [CREDITS](#credits)
|
37
|
+
- [Beta-testers](#beta-testers)
|
38
|
+
|
39
|
+
## FEATURES
|
40
|
+
|
41
|
+
- read/scroll your App.net stream
|
42
|
+
|
43
|
+
- write a post
|
44
|
+
|
45
|
+
- reply to a post
|
46
|
+
|
47
|
+
- read the conversation around a post
|
48
|
+
|
49
|
+
- star/unstar a post
|
50
|
+
|
51
|
+
- repost/unrepost a post
|
52
|
+
|
53
|
+
- quote a post
|
54
|
+
|
55
|
+
- send a private message
|
56
|
+
|
57
|
+
- read your private messages
|
58
|
+
|
59
|
+
- follow/unfollow a user
|
60
|
+
|
61
|
+
- ask if a user follows another one
|
62
|
+
|
63
|
+
- mute/unmute a user
|
64
|
+
|
65
|
+
- search posts for word(s)
|
66
|
+
|
67
|
+
- search posts with hashtag
|
68
|
+
|
69
|
+
- get informations on a post/user
|
70
|
+
|
71
|
+
- read/scroll posts from a user
|
72
|
+
|
73
|
+
- read/scroll posts mentioning a user
|
74
|
+
|
75
|
+
- read posts starred by a user
|
76
|
+
|
77
|
+
- see users who starred/reposted a post
|
78
|
+
|
79
|
+
- read/scroll other streams: "checkins", "global", "trending", "conversations"
|
80
|
+
|
81
|
+
- read a timeline of your interactions
|
82
|
+
|
83
|
+
- delete a post/message
|
84
|
+
|
85
|
+
- save/load a post locally
|
86
|
+
|
87
|
+
- backup/display your lists of followings, followers, muted users...
|
88
|
+
|
89
|
+
- create links with Markdown in your text
|
90
|
+
|
91
|
+
- skip posts from specific client (like IFTTT, PourOver, etc)
|
92
|
+
|
93
|
+
- skip posts containing specific #hashtag
|
94
|
+
|
95
|
+
- skip posts containing specific @username
|
96
|
+
|
97
|
+
- list, download, delete files from your ADN account
|
98
|
+
|
99
|
+
- change file attribute: public/private
|
100
|
+
|
101
|
+
- upload files to your ADN account *(no Windows support)*
|
102
|
+
|
103
|
+
- list your subscribed channels
|
104
|
+
|
105
|
+
- post to your subscribed channels
|
106
|
+
|
107
|
+
- save a post link to your Pinboard account
|
108
|
+
|
109
|
+
- post the current iTunes song with #nowplaying hashtag *(OS X only)*
|
110
|
+
|
111
|
+
- [and more!](https://github.com/ericdke/ayadn#list-of-commands)
|
112
|
+
|
113
|
+
*There's also a [landing page](http://ayadn-app.net) and, of course, the [blog](http://ayadn.re-app.net).*
|
114
|
+
|
115
|
+
## TL;DR
|
116
|
+
|
117
|
+
```
|
118
|
+
gem install ayadn
|
119
|
+
ayadn authorize
|
120
|
+
ayadn write 'Posting to App.net with Ruby!'
|
121
|
+
```
|
122
|
+
|
123
|
+
## IMPORTANT NOTE
|
124
|
+
|
125
|
+
Ayadn is currently in a transition process from beta to v1.
|
126
|
+
|
127
|
+
This beta version is now a Gem but lacks some features that worked before (no multi account, almost no configuration without manually editing the file in the installed Gem, etc).
|
128
|
+
|
129
|
+
The current "na" repository will become Ayadn v1 when ready, and will be complete (multi account, configuration with ayadn commands, fresh clean code, OSS rules compliant, etc).
|
130
|
+
|
131
|
+
## INSTALL
|
132
|
+
|
133
|
+
**Mac OS X, Linux = it just works.**
|
134
|
+
|
135
|
+
Ayadn is also compatible with Windows (install Ruby with Rubygems at [http://rubyinstaller.org](http://rubyinstaller.org)).
|
136
|
+
|
137
|
+
Just run gem install:
|
138
|
+
|
139
|
+
```
|
140
|
+
gem install ayadn
|
141
|
+
```
|
142
|
+
|
143
|
+
## HOW TO USE
|
144
|
+
|
145
|
+
You have to authorize Ayadn to use your App.net credentials.
|
146
|
+
|
147
|
+
*Just run Ayadn to start the process!*
|
148
|
+
|
149
|
+
**`ayadn` + optional action + optional target(s) + optional value(s)**
|
150
|
+
|
151
|
+
If you don't provide any option to Ayadn, your personnalized stream is displayed.
|
152
|
+
|
153
|
+
If you provide the `write` command without text, you will enter the compose message feature. *(recommended)*
|
154
|
+
|
155
|
+
By default, Ayadn displays only the new posts in the stream since your last visit.
|
156
|
+
|
157
|
+
## LIST OF COMMANDS
|
158
|
+
|
159
|
+
*Only the first lines include the `[PRESS ENTER KEY]` indication and a description for obvious readability reasons.*
|
160
|
+
|
161
|
+
```
|
162
|
+
ayadn [PRESS ENTER KEY] *to display the unified stream*
|
163
|
+
ayadn scroll [PRESS ENTER KEY] *to scroll the unified stream*
|
164
|
+
ayadn write [PRESS ENTER KEY] *to write your post*
|
165
|
+
ayadn write '@ericd Good morning Eric!' [PRESS ENTER KEY] *(prefer the previous method, safer)*
|
166
|
+
ayadn reply 18527205 [PRESS ENTER KEY] *to reply, then write your post*
|
167
|
+
ayadn pm @ericd [PRESS ENTER KEY] *to send a private message to @ericd*
|
168
|
+
ayadn global
|
169
|
+
ayadn scroll global
|
170
|
+
ayadn checkins
|
171
|
+
ayadn scroll checkins
|
172
|
+
ayadn trending
|
173
|
+
ayadn scroll trending
|
174
|
+
ayadn photos
|
175
|
+
ayadn scroll photos
|
176
|
+
ayadn conversations
|
177
|
+
ayadn scroll conversations
|
178
|
+
ayadn mentions @ericd
|
179
|
+
ayadn scroll mentions @ericd
|
180
|
+
ayadn posts @ericd
|
181
|
+
ayadn scroll posts @ericd
|
182
|
+
ayadn starred @ericd
|
183
|
+
ayadn starred 18527205
|
184
|
+
ayadn reposted 18527205
|
185
|
+
ayadn infos @ericd
|
186
|
+
ayadn infos 18527205
|
187
|
+
ayadn convo 15726105
|
188
|
+
ayadn tag nowplaying
|
189
|
+
ayadn follow @ericd
|
190
|
+
ayadn unfollow @ericd
|
191
|
+
ayadn mute @ayaio
|
192
|
+
ayadn unmute @ayaio
|
193
|
+
ayadn block @spammer
|
194
|
+
ayadn unblock @spammer
|
195
|
+
ayadn nowplaying
|
196
|
+
ayadn interactions
|
197
|
+
ayadn list files
|
198
|
+
ayadn list files all
|
199
|
+
ayadn download 286458
|
200
|
+
ayadn download 286458,286797
|
201
|
+
ayadn upload /path/to/kitten.jpg
|
202
|
+
ayadn private 286458
|
203
|
+
ayadn public 286458
|
204
|
+
ayadn delete-file 286458
|
205
|
+
ayadn search ruby
|
206
|
+
ayadn search ruby,json
|
207
|
+
ayadn channels
|
208
|
+
ayadn send 12345
|
209
|
+
ayadn messages 12345
|
210
|
+
ayadn messages 12345 all
|
211
|
+
ayadn star 18527205
|
212
|
+
ayadn unstar 18527205
|
213
|
+
ayadn repost 18527205
|
214
|
+
ayadn unrepost 18527205
|
215
|
+
ayadn quote 18527205
|
216
|
+
ayadn delete 12345678
|
217
|
+
ayadn delete-message 12345 23456789
|
218
|
+
ayadn list muted
|
219
|
+
ayadn list followings @ericd
|
220
|
+
ayadn list followers @ericd
|
221
|
+
ayadn backup muted
|
222
|
+
ayadn backup followings @ericd
|
223
|
+
ayadn backup followers @ericd
|
224
|
+
ayadn save 18527205
|
225
|
+
ayadn load 18527205
|
226
|
+
ayadn skip-source add IFTTT
|
227
|
+
ayadn skip-source remove IFTTT
|
228
|
+
ayadn skip-source show
|
229
|
+
ayadn skip-tag add sports
|
230
|
+
ayadn skip-tag remove sports
|
231
|
+
ayadn skip-tag show
|
232
|
+
ayadn skip-mention add username
|
233
|
+
ayadn skip-mention remove username
|
234
|
+
ayadn skip-mention show
|
235
|
+
ayadn pin 16864003 ruby,json
|
236
|
+
ayadn alias-channel 12345 channel_name
|
237
|
+
ayadn messages channel_name
|
238
|
+
ayadn list alias
|
239
|
+
ayadn unified 10
|
240
|
+
ayadn global 10
|
241
|
+
ayadn checkins 10
|
242
|
+
ayadn photos 10
|
243
|
+
ayadn trending 10
|
244
|
+
ayadn conversations 10
|
245
|
+
ayadn mentions @ericd 10
|
246
|
+
ayadn posts @ericd 10
|
247
|
+
ayadn starred @ericd 10
|
248
|
+
ayadn does @ericd follow @ayadn
|
249
|
+
ayadn reset pagination
|
250
|
+
ayadn list options
|
251
|
+
ayadn help
|
252
|
+
ayadn commands
|
253
|
+
ayadn webhelp
|
254
|
+
ayadn random
|
255
|
+
```
|
256
|
+
|
257
|
+
|
258
|
+
## TIPS
|
259
|
+
|
260
|
+
### Username (OBSOLETE, FIXED IN NEXT VERSION)
|
261
|
+
|
262
|
+
One thing I really recommend is to **fill in your username** in the `config.yml` file (without the "@").
|
263
|
+
|
264
|
+
Ayadn will then be able to perform a lot better and faster (less API calls, more colors, etc).
|
265
|
+
|
266
|
+
### Configuration (OBSOLETE, FIXED IN NEXT VERSION)
|
267
|
+
|
268
|
+
Unless you're planning on using [multiple accounts](https://github.com/ericdke/ayadn#running-multiple-accounts), you should then install the configuration file in the permanent Ayadn folder:
|
269
|
+
|
270
|
+
```
|
271
|
+
ayadn install config
|
272
|
+
```
|
273
|
+
|
274
|
+
Now you may safely edit your preferences in `%USERDIR%/ayadn/data/config.yml` without losing anything when updating Ayadn.
|
275
|
+
|
276
|
+
### Skip specific posts
|
277
|
+
|
278
|
+
You can make posts containing a specific *hashtag*, like "#sports", or from a specific *client*, like "IFTTT" disappear from your timeline.
|
279
|
+
|
280
|
+
It works with users too: although App.net has the *mute* feature, it doesn't prevent the muted user to appear in reposts or to see posts mentioning him/her. This command allows you to do it.
|
281
|
+
|
282
|
+
*ayadn skip-xxx add/remove target* to add/remove from the 'skipped' list.
|
283
|
+
|
284
|
+
- Skip posts from specific client:
|
285
|
+
|
286
|
+
`ayadn skip-source add IFTTT`
|
287
|
+
|
288
|
+
- Skip posts with specific hashtag:
|
289
|
+
|
290
|
+
`ayadn skip-tag add sports`
|
291
|
+
|
292
|
+
- Skip posts with mentioning specific user:
|
293
|
+
|
294
|
+
`ayadn skip-mention add username`
|
295
|
+
|
296
|
+
Change of mind?
|
297
|
+
|
298
|
+
`ayadn skip-source remove IFTTT`
|
299
|
+
`ayadn skip-tag remove sports`
|
300
|
+
`ayadn skip-mention remove username`
|
301
|
+
|
302
|
+
There's basically no verification with this feature, so be careful to not add misspelled or non-existent info.
|
303
|
+
|
304
|
+
### Backup some data
|
305
|
+
|
306
|
+
```
|
307
|
+
ayadn backup followings @ericd
|
308
|
+
ayadn backup followers @ericd
|
309
|
+
ayadn backup muted
|
310
|
+
```
|
311
|
+
|
312
|
+
A JSON file containing the username and real name of your followings/followers/muted will be saved in `%USERDIR%/ayadn/data/lists`.
|
313
|
+
|
314
|
+
The `muted` option only works for yourself (this is a normal limitation from the API).
|
315
|
+
|
316
|
+
### Post links
|
317
|
+
|
318
|
+
- Write/paste a simple link:
|
319
|
+
|
320
|
+
```
|
321
|
+
ayadn write 'Subscribe to the #Ayadn broadcast! https://app.net/c/2zqf'
|
322
|
+
```
|
323
|
+
|
324
|
+
- Write/paste a markdown link to embed the link:
|
325
|
+
|
326
|
+
```
|
327
|
+
ayadn write '[Subscribe](https://app.net/c/2zqf) to the #Ayadn broadcast!'
|
328
|
+
```
|
329
|
+
|
330
|
+
### Reset pagination data
|
331
|
+
|
332
|
+
If Ayadn shows you "No recent posts" but you still want to see the stream again, you have to reset the pagination data first.
|
333
|
+
|
334
|
+
```
|
335
|
+
ayadn reset
|
336
|
+
ayadn reset pagination unified
|
337
|
+
ayadn reset pagination mentions @ericd
|
338
|
+
ayadn reset pagination posts @ericd
|
339
|
+
(etc)
|
340
|
+
```
|
341
|
+
|
342
|
+
Without arguments: resets all your pagination data.
|
343
|
+
|
344
|
+
*Note: Ayadn doesn't use Stream Markers (stream syncing), and it's not a bug but a feature :p This is because Ayadn is meant as an independent tool that shouldn't interfere with other ADN clients.*
|
345
|
+
|
346
|
+
### Custom posts count
|
347
|
+
|
348
|
+
You can specify the number of posts retrieved with most streams:
|
349
|
+
|
350
|
+
```
|
351
|
+
ayadn unified 10
|
352
|
+
ayadn global 10
|
353
|
+
ayadn checkins 10
|
354
|
+
ayadn photos 10
|
355
|
+
ayadn trending 10
|
356
|
+
ayadn conversations 10
|
357
|
+
ayadn mentions @ericd 10
|
358
|
+
ayadn posts @ericd 10
|
359
|
+
ayadn starred @ericd 10
|
360
|
+
```
|
361
|
+
|
362
|
+
### Running multiple accounts (OBSOLETE, FIXED IN NEXT VERSION)
|
363
|
+
|
364
|
+
- main idea: one Ayadn folder per account
|
365
|
+
- change the name of the ayadn folder to @yourusername
|
366
|
+
- replace "me" in `config.yml` by your username (without "@")
|
367
|
+
- do `ayadn authorize` to force a new process (you may have to log off your browser (or delete cookies) first if you want to change accounts)
|
368
|
+
- don't ever run "ayadn install config" or Ayadn will ignore your multiple settings
|
369
|
+
|
370
|
+
### Pinboard
|
371
|
+
|
372
|
+
Export a post link + text + tags to Pinboard:
|
373
|
+
|
374
|
+
`ayadn pin 15723266 tag1,tag2`
|
375
|
+
|
376
|
+
### "me"
|
377
|
+
|
378
|
+
With some features you can replace `@username` by `me` if you want to check yourself:
|
379
|
+
|
380
|
+
```
|
381
|
+
ayadn mentions me
|
382
|
+
ayadn scroll mentions me
|
383
|
+
ayadn posts me
|
384
|
+
ayadn starred me
|
385
|
+
ayadn infos me
|
386
|
+
ayadn list followings me
|
387
|
+
(etc)
|
388
|
+
```
|
389
|
+
|
390
|
+
### Shortcuts
|
391
|
+
|
392
|
+
Some commands have shortcuts:
|
393
|
+
|
394
|
+
- write: w
|
395
|
+
- reply: r
|
396
|
+
- quote: q
|
397
|
+
- mentions: m
|
398
|
+
- posts: p
|
399
|
+
- channels: ch
|
400
|
+
- messages: msg
|
401
|
+
- infos: i
|
402
|
+
- convo: c
|
403
|
+
- tag: t
|
404
|
+
- search: s
|
405
|
+
- nowplaying: np
|
406
|
+
- help: h
|
407
|
+
|
408
|
+
Examples:
|
409
|
+
|
410
|
+
```
|
411
|
+
ayadn w
|
412
|
+
ayadn r 12345678
|
413
|
+
ayadn m @ericd
|
414
|
+
ayadn t ruby
|
415
|
+
ayadn np
|
416
|
+
```
|
417
|
+
|
418
|
+
*Other commands don't have a shortcut, reducing the risk of accidental manipulation.*
|
419
|
+
|
420
|
+
### Channels
|
421
|
+
|
422
|
+
You may display your channels with `ayadn channels` and read their messages with `ayadn messages 12345` with 12345 being the channel ID.
|
423
|
+
|
424
|
+
To ease the process, you can create aliases for channel IDs:
|
425
|
+
|
426
|
+
`ayadn alias-channel 12345 mychannel`
|
427
|
+
|
428
|
+
then read its messages with `ayadn messages mychannel`.
|
429
|
+
|
430
|
+
List your existing aliases with `ayadn list alias`.
|
431
|
+
|
432
|
+
Aliases are cumulable. If something goes awfully wrong, just trash the file: `%USERNAME%/ayadn/data/username/db/channels_alias.db`
|
433
|
+
|
434
|
+
### Just for fun
|
435
|
+
|
436
|
+
`ayadn random`
|
437
|
+
|
438
|
+
## HELP
|
439
|
+
|
440
|
+
### Console
|
441
|
+
|
442
|
+
Be aware of the way the console/terminal treats what you type.
|
443
|
+
|
444
|
+
When posting with `"double quotes"`, any special character will be interpreted!
|
445
|
+
|
446
|
+
So `"echo !"` becomes `"echo last command"`. You may not want to do that...
|
447
|
+
|
448
|
+
So you have to post with `'simple quotes'`, this way the console don't mess with your content.
|
449
|
+
|
450
|
+
The thing is, how do you then post a text *containing one ore more exclamation marks AND/OR one or more simple quotes?*
|
451
|
+
|
452
|
+
The answer is to post with *"double quotes"* but use `\`, the *antislash* character, before any exclamation mark:
|
453
|
+
|
454
|
+
```
|
455
|
+
ayadn write "Here's an escaped exclamation mark \! and a normal simple quote in the same text"
|
456
|
+
```
|
457
|
+
|
458
|
+
**My advice: to avoid any problems, post with the compose feature, that is to say without providing arguments:**
|
459
|
+
|
460
|
+
`ayadn write`
|
461
|
+
|
462
|
+
### Database
|
463
|
+
|
464
|
+
Ayadn keeps a database of the ids of all the users it sees (it reduces the number of API calls and speeds up the app.)
|
465
|
+
|
466
|
+
If you think that this file is causing problems to Ayadn or if it's simply getting too big, just trash it.
|
467
|
+
|
468
|
+
The file is: `%USERNAME%/ayadn/data/username/db/users.db`
|
469
|
+
|
470
|
+
## CONTACT
|
471
|
+
|
472
|
+
Contact me on ADN [(@ericd)](http://alpha.app.net/ericd) if you have questions, ideas, or... if you know Ruby and you want to help a newbie to code better. ;)
|
473
|
+
|
474
|
+
The handle for the app itself is [@ayadn](http://alpha.app.net/ayadn) and will be used for support, bug report, etc.
|
475
|
+
|
476
|
+
Don't bother with @ayaio or @aya_tests, they're bots.
|
477
|
+
|
478
|
+
## CREDITS
|
479
|
+
|
480
|
+
### Beta-testers
|
481
|
+
|
482
|
+
- Windows: [@ksniod](http://alpha.app.net/ksniod)
|
483
|
+
|
484
|
+
- Linux:
|
485
|
+
|
486
|
+
- [@martner_mala](http://alpha.app.net/martner_mala)
|
487
|
+
- [@nguarracino](http://alpha.app.net/nguarracino)
|
488
|
+
|
489
|
+
- OpenBSD: *(soon)*
|