Hello,
as an alternative to JSON Feed I've put together Feed.TXT - a new
feed format in plain text with structured metadata in YAML and content
in HTML or Markdown.
Use the new feedtxt gem [1] to read / parse the new feed format for
publishing & sharing posts, articles, podcasts & more.
Try Feedtxt::Parser.parse() returning an array with a metadata hash
and items (w/ metadata hash and content).Example:
``` ruby
require 'feedtxt'
text =<<TXT
comment: "This is a podcast feed. You can add..."
title: "The Record"
home_page_url: "http://therecord.co/"
feed_url: "http://therecord.co/feed.txt"
</>
id: "http://therecord.co/chris-parrish"
title: "Special #1 - Chris Parrish"
url: "http://therecord.co/chris-parrish"
summary: "Brent interviews Chris Parrish, co-host of The Record and
one-half of Aged & Distilled."
published: 2014-05-09T14:04:00-07:00
attachments:
- url:
"http://therecord.co/downloads/The-Record-sp1e1-ChrisParrish.m4a"
mime_type: "audio/x-m4a"
size_in_bytes: 89970236
duration_in_seconds: 6629
···
---
Chris has worked at [Adobe][1] 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](2),
a Mac app for visual collaboration. Chris is also the co-host of The Record.
He lives on [Bainbridge Island][3], a quick ferry ride from Seattle.
[1]: http://adobe.com/
[2]: Napkin for OS X - Say it with a picture, skip the 1,000 words
[3]: http://www.ci.bainbridge-isl.wa.us/
<<<|
TXT
feed = Feedtxt::Parser.parse( text )
pp feed
resulting in:
``` ruby
\[\{"comment"=>"This is a podcast feed\. You can add\.\.\.",
"title"=>"The Record",
"home\_page\_url"=>"http://therecord.co/",
"feed\_url"=>"http://therecord.co/feed.txt"
\},
\[
\[\{"id"=>"http://therecord.co/chris-parrish",
"title"=>"Special \#1 \- Chris Parrish",
"url"=>"http://therecord.co/chris-parrish",
"summary"=>"Brent interviews Chris Parrish, co\-host of The Record and\.\.\.",
"published"=>2014\-05\-09 23:04:00 \+0200,
"attachments"=>
\[\{"url"=>"http://therecord.co/downloads/The-Record-sp1e1-ChrisParrish.m4a",
"mime\_type"=>"audio/x\-m4a",
"size\_in\_bytes"=>89970236,
"duration\_in\_seconds"=>6629\}\]
\},
"Chris has worked at \[Adobe\]\[1\] and as a founder of Rogue Sheep\.\.\."
\]
\]
\]
\`\`\`
Cheers\.
\[1\] https://github.com/feedtxt/feedtxt
</details>