-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[feature] Support feed item images (#41)
* Add support for podcast-centered tags * Adding proper support for Enclosure and and Image tags, which didn't seem to generate properly (might have been a bug on my end but I'm not sure). * Enclosure.Length from string to int * Revert change from string to int for Enclosure length * Accidently changed err == to != for enclosure & author * Update README to reflect fork goals * List of tags to implement * fix RSS image when no Image is mentioned in the Feed * do not assume that a Link with a field Type is an Enclosure * expected tests * better handling of enclosures * fix package * Fixes as requested * Fix travis build error
- Loading branch information
Showing
7 changed files
with
66 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ var atomOutput = `<?xml version="1.0" encoding="UTF-8"?><feed xmlns="http://www. | |
<updated>2013-01-16T21:52:35-05:00</updated> | ||
<id>tag:jmoiron.net,2013-01-16:/blog/limiting-concurrency-in-go/</id> | ||
<content type="html">A discussion on controlled parallelism in golang</content> | ||
<link href="http://jmoiron.net/blog/limiting-concurrency-in-go/"></link> | ||
<link href="http://jmoiron.net/blog/limiting-concurrency-in-go/" rel="alternate"></link> | ||
<author> | ||
<name>Jason Moiron</name> | ||
<email>[email protected]</email> | ||
|
@@ -33,28 +33,30 @@ var atomOutput = `<?xml version="1.0" encoding="UTF-8"?><feed xmlns="http://www. | |
<updated>2013-01-16T21:52:35-05:00</updated> | ||
<id>tag:jmoiron.net,2013-01-16:/blog/logicless-template-redux/</id> | ||
<content type="html">More thoughts on logicless templates</content> | ||
<link href="http://jmoiron.net/blog/logicless-template-redux/"></link> | ||
<link href="http://jmoiron.net/blog/logicless-template-redux/" rel="alternate"></link> | ||
</entry> | ||
<entry> | ||
<title>Idiomatic Code Reuse in Go</title> | ||
<updated>2013-01-16T21:52:35-05:00</updated> | ||
<id>tag:jmoiron.net,2013-01-16:/blog/idiomatic-code-reuse-in-go/</id> | ||
<content type="html">How to use interfaces <em>effectively</em></content> | ||
<link href="http://jmoiron.net/blog/idiomatic-code-reuse-in-go/"></link> | ||
<link href="http://jmoiron.net/blog/idiomatic-code-reuse-in-go/" rel="alternate"></link> | ||
<link href="http://example.com/cover.jpg" rel="enclosure" type="image/jpg" length="123456"></link> | ||
</entry> | ||
<entry> | ||
<title>Never Gonna Give You Up Mp3</title> | ||
<updated>2013-01-16T21:52:35-05:00</updated> | ||
<id>tag:example.com,2013-01-16:/RickRoll.mp3</id> | ||
<content type="html">Never gonna give you up - Never gonna let you down.</content> | ||
<link href="http://example.com/RickRoll.mp3" rel="alternate"></link> | ||
<link href="http://example.com/RickRoll.mp3" rel="enclosure" type="audio/mpeg" length="123456"></link> | ||
</entry> | ||
<entry> | ||
<title>String formatting in Go</title> | ||
<updated>2013-01-16T21:52:35-05:00</updated> | ||
<id>tag:example.com,2013-01-16:/strings</id> | ||
<content type="html">How to use things like %s, %v, %d, etc.</content> | ||
<link href="http://example.com/strings"></link> | ||
<link href="http://example.com/strings" rel="alternate"></link> | ||
</entry> | ||
</feed>` | ||
|
||
|
@@ -83,6 +85,7 @@ var rssOutput = `<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"> | |
<title>Idiomatic Code Reuse in Go</title> | ||
<link>http://jmoiron.net/blog/idiomatic-code-reuse-in-go/</link> | ||
<description>How to use interfaces <em>effectively</em></description> | ||
<enclosure url="http://example.com/cover.jpg" length="123456" type="image/jpg"></enclosure> | ||
<pubDate>Wed, 16 Jan 2013 21:52:35 -0500</pubDate> | ||
</item> | ||
<item> | ||
|
@@ -132,6 +135,7 @@ var jsonOutput = `{ | |
"url": "http://jmoiron.net/blog/idiomatic-code-reuse-in-go/", | ||
"title": "Idiomatic Code Reuse in Go", | ||
"summary": "How to use interfaces \u003cem\u003eeffectively\u003c/em\u003e", | ||
"image": "http://example.com/cover.jpg", | ||
"date_published": "2013-01-16T21:52:35-05:00" | ||
}, | ||
{ | ||
|
@@ -186,11 +190,13 @@ func TestFeed(t *testing.T) { | |
Title: "Idiomatic Code Reuse in Go", | ||
Link: &Link{Href: "http://jmoiron.net/blog/idiomatic-code-reuse-in-go/"}, | ||
Description: "How to use interfaces <em>effectively</em>", | ||
Enclosure: &Enclosure{Url: "http://example.com/cover.jpg", Length: "123456", Type: "image/jpg"}, | ||
Created: now, | ||
}, | ||
{ | ||
Title: "Never Gonna Give You Up Mp3", | ||
Link: &Link{Href: "http://example.com/RickRoll.mp3", Length: "123456", Type: "audio/mpeg"}, | ||
Link: &Link{Href: "http://example.com/RickRoll.mp3"}, | ||
Enclosure: &Enclosure{Url: "http://example.com/RickRoll.mp3", Length: "123456", Type: "audio/mpeg"}, | ||
Description: "Never gonna give you up - Never gonna let you down.", | ||
Created: now, | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
[Full iTunes list](https://help.apple.com/itc/podcasts_connect/#/itcb54353390) | ||
|
||
[Example of ideal iTunes RSS feed](https://help.apple.com/itc/podcasts_connect/#/itcbaf351599) | ||
|
||
``` | ||
<itunes:author> | ||
<itunes:block> | ||
<itunes:catergory> | ||
<itunes:image> | ||
<itunes:duration> | ||
<itunes:explicit> | ||
<itunes:isClosedCaptioned> | ||
<itunes:order> | ||
<itunes:complete> | ||
<itunes:new-feed-url> | ||
<itunes:owner> | ||
<itunes:subtitle> | ||
<itunes:summary> | ||
<language> | ||
``` |
4b936b5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this enable functionality to add an image per item in feed?