summaryrefslogtreecommitdiff
path: root/sfeed_update.1
blob: 96d59047e6df350effc05171ebddd1abecfb85e0 (plain)
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
90
.Dd December 25, 2014
.Dt SFEED_UPDATE 1
.Os
.Sh NAME
.Nm sfeed_update
.Nd update feeds and merge with old feeds
.Sh SYNOPSIS
.Nm
.Op Ar configfile
.Sh DESCRIPTION
.Nm
updates feeds and merges the new data with the previous feeds. This is the file
$HOME/.sfeed/feeds by default.
.Sh OPTIONS
.Bl -tag -width 17n
.It Ar configfile
config file, if not specified uses the location $HOME/.sfeed/sfeedrc by default
see the
.Sx FILES READ
section for more information.
.El
.Sh TAB-SEPARATED FORMAT FIELDS
The items are saved in a TSV-like format except newlines, tabs and
backslash are escaped with \\ (\\n, \\t and \\\\). Carriage returns (\\r) are
removed.
.Pp
The order and format of the fields are:
.Bl -tag -width 17n
.It Ar item timestamp
string, UNIX timestamp in GMT+0
.It Ar item timestamp
string, date and time in the format: YYYY-mm-dd HH:MM:SS tzname[[+-][HHMM]]
.It Ar item title
string
.It Ar item link
string
.It Ar item content
string
.It Ar item content\-type
string, "html" or "plain"
.It Ar item id
string
.It Ar item author
string
.It Ar feed type
string, "rss" or "atom"
.El
.Sh EXTRA FIELDS
Extra fields added by sfeed_update:
.Bl -tag -width 17n
.It Ar feed name
string
.It Ar feed url
string
.It Ar item baseurl site
string
.El
.Sh FILES READ
.Bl -tag -width 17n
.It Ar sfeedrc
Config file, see the sfeedrc.example file for an example.
This file is evaluated as a shellscript in sfeed_update.
You can for example override the fetchfeed() function to
use wget, fetch or an other download program or you can
override the merge() function to change the merge logic.
The function feeds() is called to fetch the feeds. By
default the function feed() is executed as a parallel
job to speedup updating.
.El
.Sh FILES WRITTEN
.Bl -tag -width 17n
.It Ar feeds
Tab-separated format containing all feeds.
The sfeed_update script merges new items with this file.
.It Ar feeds.new
Temporary file used by sfeed_update to merge items.
.El
.Sh EXAMPLES
To update feeds and format the feeds file:
.Bd -literal
sfeed_update "configfile"
sfeed_plain < $HOME/.sfeed/feeds > $HOME/.sfeed/feeds.txt
sfeed_html < $HOME/.sfeed/feeds > $HOME/.sfeed/feeds.html
.Ed
.Sh SEE ALSO
.Xr sfeed_html 1 ,
.Xr sfeed_plain 1 ,
.Xr sh 1
.Sh AUTHORS
.An Hiltjo Posthuma Aq Mt hiltjo@codemadness.org