Skip to content

Commit 1905c30

Browse files
committed
up
1 parent ec7882a commit 1905c30

2 files changed

Lines changed: 232 additions & 0 deletions

File tree

feedtxt.specs/README.md

Lines changed: 208 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,208 @@
1+
2+
{% include header.html %}
3+
4+
<!--
5+
change github.html to header.html - why? why not?
6+
-->
7+
8+
# Feed.TXT - A Free Feeds Format in Plain Text w/ Structured Meta Data
9+
10+
11+
What's Feed.TXT? Let's start with an example from the JSON Feed spec:
12+
13+
```json
14+
{
15+
"version": "https://jsonfeed.org/version/1",
16+
"title": "My Example Feed",
17+
"home_page_url": "https://example.org/",
18+
"feed_url": "https://example.org/feed.json",
19+
"items": [
20+
{
21+
"id": "2",
22+
"content_text": "This is a second item.",
23+
"url": "https://example.org/second-item"
24+
},
25+
{
26+
"id": "1",
27+
"content_html": "<p>Hello, world!</p>",
28+
"url": "https://example.org/initial-post"
29+
}
30+
]
31+
}
32+
```
33+
34+
Simple, isn't it? Let's try just text:
35+
36+
```
37+
|>>>
38+
title: My Example Feed
39+
home_page_url: https://example.org/
40+
feed_url: https://example.org/feed.txt
41+
</>
42+
id: 2
43+
url: https://example.org/second-item
44+
---
45+
This is a second item.
46+
</>
47+
id: 1
48+
url: https://example.org/initial-post
49+
---
50+
Hello, world!
51+
<<<|
52+
```
53+
54+
Are you serious, really? Let's try another example from the JSON Feed spec:
55+
56+
```json
57+
{
58+
"version": "https://jsonfeed.org/version/1",
59+
"user_comment": "This is a podcast feed. You can add this feed to your podcast client using the following URL: http://therecord.co/feed.json",
60+
"title": "The Record",
61+
"home_page_url": "http://therecord.co/",
62+
"feed_url": "http://therecord.co/feed.json",
63+
"items": [
64+
{
65+
"id": "http://therecord.co/chris-parrish",
66+
"title": "Special #1 - Chris Parrish",
67+
"url": "http://therecord.co/chris-parrish",
68+
"content_text": "Chris has worked at Adobe and as a founder of Rogue Sheep, which won an Apple Design Award for Postage. Chris’s new company is Aged & Distilled with Guy English — which shipped Napkin, a Mac app for visual collaboration. Chris is also the co-host of The Record. He lives on Bainbridge Island, a quick ferry ride from Seattle.",
69+
"content_html": "Chris has worked at <a href=\"http://adobe.com/\">Adobe</a> and as a founder of Rogue Sheep, which won an Apple Design Award for Postage. Chris’s new company is Aged & Distilled with Guy English — which shipped <a href=\"http://aged-and-distilled.com/napkin/\">Napkin</a>, a Mac app for visual collaboration. Chris is also the co-host of The Record. He lives on <a href=\"http://www.ci.bainbridge-isl.wa.us/\">Bainbridge Island</a>, a quick ferry ride from Seattle.",
70+
"summary": "Brent interviews Chris Parrish, co-host of The Record and one-half of Aged & Distilled.",
71+
"date_published": "2014-05-09T14:04:00-07:00",
72+
"attachments": [
73+
{
74+
"url": "http://therecord.co/downloads/The-Record-sp1e1-ChrisParrish.m4a",
75+
"mime_type": "audio/x-m4a",
76+
"size_in_bytes": 89970236,
77+
"duration_in_seconds": 6629
78+
}
79+
]
80+
}
81+
]
82+
}
83+
```
84+
85+
Yes, the world's 1st podcasting feed in plain text ;-) Let's try:
86+
87+
```
88+
|>>>
89+
comment: This is a podcast feed. You can add this feed to your podcast client using the following URL: http://therecord.co/feed.json
90+
title: The Record
91+
home_page_url: http://therecord.co/
92+
feed_url: http://therecord.co/feed.txt
93+
</>
94+
id: http://therecord.co/chris-parrish
95+
title: Special #1 - Chris Parrish
96+
url: http://therecord.co/chris-parrish
97+
summary: Brent interviews Chris Parrish, co-host of The Record and one-half of Aged & Distilled.
98+
published: 2014-05-09T14:04:00-07:00
99+
attachments:
100+
- url: http://therecord.co/downloads/The-Record-sp1e1-ChrisParrish.m4a
101+
mime_type: audio/x-m4a
102+
size_in_bytes: 89970236
103+
duration_in_seconds: 6629
104+
---
105+
Chris has worked at [Adobe][1] and as a founder of Rogue Sheep, which won an Apple Design Award for Postage.
106+
Chris's new company is Aged & Distilled with Guy English — which shipped [Napkin](2),
107+
a Mac app for visual collaboration. Chris is also the co-host of The Record.
108+
He lives on [Bainbridge Island][3], a quick ferry ride from Seattle.
109+
110+
[1]: http://adobe.com/
111+
[2]: http://aged-and-distilled.com/napkin/
112+
[3]: http://www.ci.bainbridge-isl.wa.us/
113+
<<<|
114+
```
115+
116+
117+
## Spec(ification) - How does it work?
118+
119+
A Feed.txt starts with a meta data block for the feed in YAML format
120+
followed by a list of items. Items start with a meta data block followed by the text
121+
using the markdown formatting conventions for structured text (headings, lists, tables, etc.) and
122+
hyperlinks. That's it.
123+
124+
125+
### Dividers - Begin / Next / End
126+
127+
Use `|>>>` to begin a Feed.txt feed. Note you use three or more `>>>` open brackets e.g.
128+
`|>>>>>>>>>>>>` also works.
129+
130+
Use `<<<|` to end a Feed.txt feed. Again note you can use three or more `<<<` closing brackets e.g.
131+
`<<<<<<<|` also works.
132+
133+
Use `</>` to break up items. That's it.
134+
135+
136+
137+
138+
## Use JSON / JSON5 / HJSON / SON for Strucutured Meta Data - |{ }|
139+
140+
As an alternative you can use human JSON for meta data blocks. Let's try:
141+
142+
```
143+
|{
144+
title: "My Example Feed"
145+
home_page_url: "https://example.org/"
146+
feed_url: "https://example.org/feed.txt"
147+
}/{
148+
id: "2"
149+
url: "https://example.org/second-item"
150+
}
151+
This is a second item.
152+
}/{
153+
id: "1"
154+
url: "https://example.org/initial-post"
155+
}
156+
Hello, world!
157+
}|
158+
```
159+
160+
Are you joking? Don't, like the more human JSON style. Let's retry in "classic" JSON:
161+
162+
```
163+
|{
164+
"title": "My Example Feed",
165+
"home_page_url": "https://example.org/",
166+
"feed_url": "https://example.org/feed.txt"
167+
}/{
168+
"id": "2",
169+
"url": "https://example.org/second-item"
170+
}
171+
This is a second item.
172+
}/{
173+
"id": "1",
174+
"url": "https://example.org/initial-post"
175+
}
176+
Hello, world!
177+
}|
178+
```
179+
180+
### Dividers - Begin / Next / End (JSON Edition)
181+
182+
Change `|>>>` to `|{` to begin a Feed.txt feed. Note you use one or more `{` open curly brackets e.g. `|{%raw%}{{{{{%endraw%}` also works.
183+
184+
Change `<<<|` to `}|` to end a Feed.txt feed. Again note you can use one or more `}` closing brackets e.g. `{%raw%}}}}}{%endraw%}|` also works.
185+
186+
Change `</>` to `}/{` to break up items. That's it.
187+
188+
189+
Sorry, there's no XML alternative ;-)
190+
191+
192+
## License
193+
194+
The Feed.TXT format and conventions are dedicated to the public domain.
195+
Use it as you please with no restrictions whatsoever.
196+
197+
## Questions? Comments?
198+
199+
Send them along to the [wwwmake mailing list/forum](http://groups.google.com/group/wwwmake). Thanks.
200+
201+
202+
<!-- todo: move footer to layouts -->
203+
204+
Brought to you by [Manuscripts](https://github.com/manuscripts) and friends. You might also like [Bib.TXT](http://bibtxt.github.io) ;-).
205+
206+
207+
208+
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<div style="margin-top: 12px !important;">
2+
<a href="https://github.com/feedtxt">Feed.TXT @ GitHub</a>
3+
</div>
4+
5+
<!--
6+
try adding github star button
7+
-->
8+
9+
<!--
10+
<a class="github-button" href="https://github.com/feedtxt/feedtxt.github.io"
11+
data-icon="octicon-star"
12+
data-count-href="/feedtxt/feedtxt.github.io/stargazers"
13+
data-count-api="/repos/feedtxt/feedtxt.github.io#stargazers_count"
14+
data-count-aria-label="stargazers on GitHub"
15+
aria-label="Star feedtxt/feedtxt.github.io on GitHub">Star</a>
16+
-->
17+
18+
<!-- GitHub Buttons
19+
Place this tag right after the last button or just before your close body tag.
20+
see https://buttons.github.io
21+
-->
22+
<!--
23+
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
24+
-->

0 commit comments

Comments
 (0)