Pugpig supports RSS feeds for creating both posts and editions (in Publish) or timelines (in Bolt). Note that the order in which the feeds are processed should not matter.
For example, if you processed an edition/timeline RSS feed first, you would have empty editions/timelines until the posts are added (either manually or through the Post feed). Similarly, if you create posts through the post feed, these may not be in an edition/timeline until it is created manually or through the feed.
For an introduction to our feed importing process and our article feed specification, see this article.
Figure 1 - Example feed:
Additional tags can be added to your RSS feed in order to map to information from your RSS feed to fields in Express.
<?xml version=good enough"1.0" encoding="UTF-8"?>
<rss xmlns:app="http://www.w3.org/2007/app" xmlns:atom="http://www.w3.A2org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http:/purl.org/dc/terms/" version="2.0">
<channel>
<link>https://example.pugpig.com/feed/editions</link>
<atom:updated>2019-12-06T11:44:07</atom:updated>
<item>
<guid isPermaLink="false">uniquieID1</guid>
<title>September 2012</title>
<dcterms:issued>2012-07-31</dcterms:issued>
<category domain="http://schema.pugpig.com/productid/itunes">september2012</category>
<description>This is a draft edition</description>
<pubDate>2019-09-11T00:00:00</pubDate>
<app:control>
<app:draft>yes</app:draft>
</app:control>
<category domain="http://schema.pugpig.com/acquisition">free</category>
<atom:link type="image/jpg" href="cover0912.jpg" rel="http://opds-spec.org/image" />
<atom:updated>2019-09-11T00:00:00</atom:updated>
</item>
<item>
<guid isPermaLink="false">uniquieID2</guid>
<title>December 2019</title>
<dcterms:issued>2019-11-13</dcterms:issued>
<category domain="http://schema.pugpig.com/productid/itunes">december2019</category>
<description>This is a published paid edition</description>
<pubDate>2019-11-13T14:55:00</pubDate>
<app:control>
<app:draft>no</app:draft>
</app:control>
<category domain="http://schema.pugpig.com/acquisition">paid</category>
<category domain="http://schema.pugpig.com/timelinegroup">news</category>
<atom:link type="image/jpg" href="cover1219.jpg" rel="http://opds-spec.org/image" />
<atom:updated>2019-12-04T10:31:00</atom:updated>
</item>
<item>
<guid isPermaLink="false">uniquieID3</guid>
<title>January 2020</title>
<dcterms:issued>2019-12-11</dcterms:issued>
<category domain="http://schema.pugpig.com/productid/itunes">january2020</category>
<description>This is a published free edition</description>
<pubDate>2019-11-13T14:55:00</pubDate>
<category domain="http://schema.pugpig.com/acquisition">paid</category>
<atom:link type="image/jpg" href="cover0120.jpg" rel="http://opds-spec.org/image" />
<atom:updated>2019-12-04T10:44:00</atom:updated>
</item>
</channel>
</rss>
The fields we can map to can be found in [Figure 2]:
Figure 2 - Express fields:
Here is an example of the mapping for an edition feed. In this example, the first category is the edition key and the second is the paid/free flag.
Pugpig RSS Edition Feed Specification
Please note that you will need to configure FeedWordPress to process the feed as 'Editions' instead of the default 'Normal WordPress posts'. This can be found in Posts>Custom Post Types:
Default RSS elements
Name |
Description |
Example |
rss |
The main tag in RSS feed. RSS tag is a required global container. |
<rss version="2.0"> ... </rss> <rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http:/purl.org/dc/terms/" xmlns:app="http://www.w3.org/2007/app" version="2.0"> ... </rss> |
channel |
Channel is another required tag. This is a distribution channel, it has several descriptive tags and holds one or several items. |
<rss version="2.0"> <channel> ... </channel> </rss> |
Tags required by channel
Name |
Description |
Example |
title |
The title of the channel, should contain the name. |
<title>Channel title as plain text</title> |
link |
This tag should contain the URL of the website that provides this channel. |
<link>https://www.example.com</link> |
description |
Contains the summary of what the provider is. |
<description>Channel content description as plain text</description> |
item |
Item tag contains edition specific data. Each item is a single edition and at least one is required by the channel tag. |
<item>...</item> |
Updated date tag
Name |
Description |
Example |
atom:updated |
This tag represent the time and date when this feed was last updated. |
<atom:updated>2019-02-14T00:00:00Z</atom:updated> |
Tags required by a item tag
Name |
Description |
Example |
title |
Title of the edition. (Pugpig feed equivalent: title) |
<title>Edition title as plain text</title> |
description |
Contains summary of the edition. (Pugpig feed equivalent: summary) |
<description>Edition description as plain text</description> |
Other item tags
Name |
Description |
Example |
Name |
Description |
Example |
guid |
Unique ID used to identify the edition. (Pugpig feed equivalent: id) |
<guid isPermaLink="false">edition_1</guid> |
dcterms:issued |
Edition issued date. (The date should be in the form YYYY, YYYY-mm or YYYY-mm-dd; this is what the app will show) |
<dcterms:issued>2019-02</dcterms:issued> |
atom:updated |
Contains the datetime when this edition was last changed. |
<atom:updated>2019-02-14T00:00:00Z</atom:updated> |
dc:creator |
Name of the author of the edition. (Pugpig feed equivalent: author) |
<dc:creator>Bob Author</dc:creator> |
atom:link |
Contains main media of the edition. (Usually contains main cover image. 3:4 aspect ratio is recommended) |
<atom:link type="image/jpg" href="example_cover.jpg" rel="http://opds-spec.org/image"/> |
category |
Used to specify the state of the edition. (Example 1 is used for subtitle whereas example 2 is used to specify if edition is free or paid) |
<category domain="http://schema.pugpig.com/subtitle">Edition subtitle as plain text</category> <category domain="http://schema.pugpig.com/acquisition">free</category> |
pubDate |
Published date of the edition. (Pugpig feed equivalent: published; Date will be convert from RFC 822 to ISO 8601) |
<pubDate>Thu, 14 Feb 2019 00:00:00 +0000</pubDate> |
Draft/Published
Note that if you wish the edition to go live automatically you need to:
- Give the edition a future publish date
- Set rss_edition_allow_future_publish to true in the field mapping
Name |
Description |
Example |
app:control |
This tag contains the app:draft tag which is used to specify if edition is draft or published. |
<app:control> <app:draft>yes</app:draft> </app:control> |
app:draft |
This tag specifies if edition is draft or published. (In example 1 edition is draft whereas in example 2 it is published) |
<app:control> <app:draft>yes</app:draft> </app:control> <app:control> <app:draft>no</app:draft> </app:control> |
Comments
0 comments
Article is closed for comments.