gdritter repos lektor / a6d6b07
doc clarification Getty Ritter 9 years ago
1 changed file(s) with 9 addition(s) and 16 deletion(s). Collapse all Expand all
11 # Lektor: A Standard for Feed Readers
22
3 **NOTE:** The entirety of this file is tentative, and subject to change
4 at any time.
5
6 There are two main tasks for a feed reader: _fetching_ and _viewing_.
7 These two tasks, in the `lektor` system, are split apart into different
8 components, mediated by a `lektor-dir` system. A `lektor-dir` contains
9 two kinds of information: information about feeds (sources of new
10 entries) and information about entries themselves.
11
123 # At A Glance
134
145 A given user has their own `lektor-dir`. A `lektor-dir` contains both
15 "feeds" and "entries". Two kinds of programs operate on `lektordir`s
6 "feeds" and "entries". Two kinds of programs operate on `lektor-dir`s
167 in two different capcities: a _fetcher_ produces entries for one or
178 more feeds, and a _viewer_ manages entries once produced and shows
189 them to some user. A given `lektor-dir` can have multiple fetchers
4132
4233 ## `lektor-feed`
4334
44 A given `feed` consists of at least a `name` (which is human-readable)
45 and an `id` which unambiguously identifies the `feed` (which is
46 a URI). Information about `feed`s is stored in the `src` directory
35 A given `feed` consists of at least a human-readable `name`
36 and a URI `id` which unambiguously identifies the `feed`.
37 Information about `feed`s is stored in the `src` directory
4738 inside a `lektor-dir`. Information about a given feed is stored inside
4839 `src/$hash`, where `$hash` is the SHA-1 hash of of the `feed`'s `id`.
4940
5344 RSS/Atom/ActivityStream feeds, this will generally be the URL at
5445 which the feed is hosted. For other things—for example, for
5546 services which may not have a web equivalent—it might instead be
56 a tag URI or some other opaque identifier.
47 a [tag URI](http://tools.ietf.org/html/rfc4151) or some other
48 opaque identifier.
5749 - `name`: The human-readable name of the feed. This is
58 produced by the fetcher and should not be changed by a viewer.
50 produced by the fetcher and should not be changed by a viewer,
51 even if a user wants to alias the name to something else.
5952
6053 Optional elements for a `feed` include:
6154
223216 # create entries every hour
224217 while true; do
225218 TIME=$(date '+%s')
226 ENTRY="$HASH/$TIME.$$.$HOST"
219 ENTRY="$HASH/$TIME.P$$.$HOST"
227220
228221 # if the file exists, wait two seconds and try again
229222 RETRY=0