tscraperc.5 - tscrape - twitter scraper (not working anymore) | |
git clone git://git.codemadness.org/tscrape | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
tscraperc.5 (2482B) | |
--- | |
1 .Dd March 20, 2020 | |
2 .Dt TSCRAPERC 5 | |
3 .Os | |
4 .Sh NAME | |
5 .Nm tscraperc | |
6 .Nd tscrape_update(1) configuration file | |
7 .Sh DESCRIPTION | |
8 .Nm | |
9 is the configuration file for | |
10 .Xr tscrape_update 1 . | |
11 .Sh VARIABLES | |
12 .Bl -tag -width Ds | |
13 .It Va tscrapepath | |
14 can be set for the directory to store the TAB-separated feed files. | |
15 The default is | |
16 .Pa $HOME/.tscrape/feeds . | |
17 .It Va maxjobs | |
18 can be used to change the amount of concurrent | |
19 .Fn feed | |
20 jobs. | |
21 The default is 8. | |
22 .El | |
23 .Sh FUNCTIONS | |
24 .Bl -tag -width Ds | |
25 .It Fn feeds | |
26 This function is the required "main" entry-point function called from | |
27 .Xr tscrape_update 1 . | |
28 .It Fn feed "name" "twittername" | |
29 Inside the | |
30 .Fn feeds | |
31 function feeds can be defined by calling the | |
32 .Fn feed | |
33 function, its arguments are: | |
34 .Bl -tag -width Ds | |
35 .It Fa name | |
36 Name of the feed, this is also used as the filename for the TAB-separated | |
37 feed file. | |
38 The feedname cannot contain '/' characters, they will be replaced with '… | |
39 .It Fa twittername | |
40 Name of Twitter account to fetch data from. | |
41 .El | |
42 .El | |
43 .Sh OVERRIDE FUNCTIONS | |
44 Because | |
45 .Xr tscrape_update 1 | |
46 is a shellscript each function can be overridden to change its behaviour, | |
47 notable functions are: | |
48 .Bl -tag -width Ds | |
49 .It Fn fetch "name" "twittername" "feedfile" | |
50 Fetch feed from url and writes data to stdout, its arguments are: | |
51 .Bl -tag -width Ds | |
52 .It Fa name | |
53 Specified name in configuration file (useful for logging). | |
54 .It Fa twittername | |
55 Name of Twitter account to fetch data from. | |
56 .It Fa feedfile | |
57 Used feedfile (useful for comparing modification times). | |
58 .El | |
59 .Pp | |
60 By default the tool | |
61 .Xr curl 1 | |
62 is used. | |
63 .It Fn filter "name" | |
64 Filter | |
65 .Xr tscrape 5 | |
66 data from stdin, write to stdout, its arguments are: | |
67 .Bl -tag -width Ds | |
68 .It Fa name | |
69 Feed name. | |
70 .El | |
71 .It Fn merge "name" "oldfile" "newfile" | |
72 Merge data of oldfile with newfile and writes it to stdout, its argument… | |
73 .Bl -tag -width Ds | |
74 .It Fa name | |
75 Feed name. | |
76 .It Fa oldfile | |
77 Old file. | |
78 .It Fa newfile | |
79 New file. | |
80 .El | |
81 .It Fn order "name" | |
82 Sort | |
83 .Xr tscrape 5 | |
84 data from stdin, write to stdout, its arguments are: | |
85 .Bl -tag -width Ds | |
86 .It Fa name | |
87 Feed name. | |
88 .El | |
89 .El | |
90 .Sh EXAMPLES | |
91 An example configuration file is included named tscraperc.example and al… | |
92 shown below: | |
93 .Bd -literal | |
94 #tscrapepath="$HOME/.tscrape/feeds" | |
95 | |
96 # list of feeds to fetch: | |
97 feeds() { | |
98 # feed <name> <twittername> | |
99 feed "Rich Felker" "richfelker" | |
100 feed "Internet of shit" "internetofshit" | |
101 feed "Donald Trump" "realdonaldtrump" | |
102 } | |
103 .Ed | |
104 .Sh SEE ALSO | |
105 .Xr curl 1 , | |
106 .Xr sh 1 , | |
107 .Xr tscrape_update 1 | |
108 .Sh AUTHORS | |
109 .An Hiltjo Posthuma Aq Mt [email protected] |