-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.txt
89 lines (53 loc) · 1.84 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
syntelos-twurl
Yet another "twurl", this one in C. A few vital twitter
curl operations for the benefit of shell scripts that do
twitter work.
The JSON data received from the twitter API is "condensed"
into an internal data table format. The internal data
table is displayed using "print" or filed using "write
<file>". The command line or console input shell performs
multiple operations.
The command line "app get <url> print" will show the
internal data table for that operation.
The command line "user get <url> valueof html" will
extract a result from the operation.
Configuration
The environment variable TWURL_STORE defines a directory
containing the following files.
api_key.txt
api_key_secret.txt
bearer_token.txt
The 'api' files must be created and configured manually.
The 'bearer' file may be subsequently created using 'twurl
update'.
Build
Run 'make'. Uses 'clang'.
Requires "libcurl".
http://curl.se/
Requires "libreadline" (Gnu Readline).
apt-get install libreadline-dev
Includes "json parser".
https://github.com/json-parser/json-parser
Usage
twurl -
Enter console input shell.
twurl user get <url>
Employ bearer token to fetch URL to internal data table.
twurl app get <url>
Employ api/consumer secret to fetch URL to internal data
table.
twurl update
Fetch new bearer token to TWURL_STORE
'bearer_token.txt'. Wipes the internal data table.
twurl delete <index>
Truncate element from internal data table.
twurl print
Write internal data table to console.
twurl write <file>
Write internal data table to file.
twurl data table
Structure data as table.
twurl data series
Structure data as series.
These operations can be chained together on the command
line, or entered serially on the console.