-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extract feed and item images from more places (#220)
- Loading branch information
Showing
13 changed files
with
240 additions
and
12 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
22 changes: 22 additions & 0 deletions
22
testdata/extensions/media/feed_image_-_rss_channel_media.json
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,22 @@ | ||
{ | ||
"feedType": "rss", | ||
"feedVersion": "0.91", | ||
"image": { | ||
"url": "http://example.com/channel.png" | ||
}, | ||
"extensions": { | ||
"media": { | ||
"content": [ | ||
{ | ||
"name": "content", | ||
"attrs": { | ||
"url": "http://example.com/channel.png", | ||
"medium": "image" | ||
}, | ||
"children": {} | ||
} | ||
] | ||
} | ||
}, | ||
"items": [] | ||
} |
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,8 @@ | ||
<!-- | ||
Description: channel image | ||
--> | ||
<rss version="0.91"> | ||
<channel> | ||
<media:content url="http://example.com/channel.png" medium="image"></media:content> | ||
</channel> | ||
</rss> |
39 changes: 39 additions & 0 deletions
39
testdata/extensions/media/feed_item_image_-_rss_channel_item_media.json
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,39 @@ | ||
{ | ||
"items": [ | ||
{ | ||
"title": "rss item image from media content", | ||
"image": { | ||
"url": "https://example.com/blog-open.png", | ||
"title": "" | ||
}, | ||
"extensions": { | ||
"media": { | ||
"content": [ | ||
{ | ||
"name": "content", | ||
"value": "", | ||
"attrs": { | ||
"medium": "image", | ||
"url": "https://example.com/blog-open.png" | ||
}, | ||
"children": { | ||
"title": [ | ||
{ | ||
"name": "title", | ||
"value": "blog-open", | ||
"attrs": { | ||
"type": "html" | ||
}, | ||
"children": {} | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
], | ||
"feedType": "rss", | ||
"feedVersion": "2.0" | ||
} |
13 changes: 13 additions & 0 deletions
13
testdata/extensions/media/feed_item_image_-_rss_channel_item_media.xml
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,13 @@ | ||
<!-- | ||
Description: rss item image from media content | ||
--> | ||
<rss version="2.0"> | ||
<channel> | ||
<item> | ||
<title>rss item image from media content</title> | ||
<media:content url="https://example.com/blog-open.png" medium="image"> | ||
<media:title type="html">blog-open</media:title> | ||
</media:content> | ||
</item> | ||
</channel> | ||
</rss> |
9 changes: 9 additions & 0 deletions
9
testdata/translator/rss/feed_image_-_rss_channel_description.json
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,9 @@ | ||
{ | ||
"feedType": "rss", | ||
"feedVersion": "0.91", | ||
"description": "<img src=\"http://example.com/description.png\">", | ||
"image": { | ||
"url": "http://example.com/description.png" | ||
}, | ||
"items": [] | ||
} |
8 changes: 8 additions & 0 deletions
8
testdata/translator/rss/feed_image_-_rss_channel_description.xml
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,8 @@ | ||
<!-- | ||
Description: channel image | ||
--> | ||
<rss version="0.91"> | ||
<channel> | ||
<description><![CDATA[<img src="http://example.com/description.png">]]></description> | ||
</channel> | ||
</rss> |
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
12 changes: 12 additions & 0 deletions
12
testdata/translator/rss/feed_item_image_-_rss_channel_item_content.json
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,12 @@ | ||
{ | ||
"feedType": "rss", | ||
"feedVersion": "0.91", | ||
"items": [ | ||
{ | ||
"image": { | ||
"url": "http://example.com/content.png" | ||
}, | ||
"content": "<img src=\"http://example.com/content.png\">" | ||
} | ||
] | ||
} |
10 changes: 10 additions & 0 deletions
10
testdata/translator/rss/feed_item_image_-_rss_channel_item_content.xml
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,10 @@ | ||
<!-- | ||
Description: item image from content | ||
--> | ||
<rss version="0.91"> | ||
<channel> | ||
<item> | ||
<content><![CDATA[<img src="http://example.com/content.png">]]></content> | ||
</item> | ||
</channel> | ||
</rss> |
12 changes: 12 additions & 0 deletions
12
testdata/translator/rss/feed_item_image_-_rss_channel_item_description.json
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,12 @@ | ||
{ | ||
"feedType": "rss", | ||
"feedVersion": "0.91", | ||
"items": [ | ||
{ | ||
"image": { | ||
"url": "http://example.com/description.png" | ||
}, | ||
"description": "<img src=\"http://example.com/description.png\">" | ||
} | ||
] | ||
} |
10 changes: 10 additions & 0 deletions
10
testdata/translator/rss/feed_item_image_-_rss_channel_item_description.xml
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,10 @@ | ||
<!-- | ||
Description: item image from description | ||
--> | ||
<rss version="0.91"> | ||
<channel> | ||
<item> | ||
<description><![CDATA[<img src="http://example.com/description.png">]]></description> | ||
</item> | ||
</channel> | ||
</rss> |
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