Skip to content

output rss plugin: add and document options, emit enclosures, default encoding to UTF-8#2324

Merged
paranoidi merged 6 commits intoFlexget:developfrom
radfish:PR--out-rss-options
Feb 4, 2019
Merged

output rss plugin: add and document options, emit enclosures, default encoding to UTF-8#2324
paranoidi merged 6 commits intoFlexget:developfrom
radfish:PR--out-rss-options

Conversation

@radfish
Copy link
Copy Markdown
Contributor

@radfish radfish commented Feb 4, 2019

Motivation for changes:

Features and improvements to the RSS output plugin.

Detailed changes:

  • Document the title option for entry titles
  • Add rsstitle and rssdesc (to complement rsslink) options to set RSS feed properties
  • Emit "enclosure" tags along with the entries for podcast apps to work
  • Make timestamping optional (and default to no) to not change the file unnecessarily
  • Take published date from input entry when available
  • Change the default encoding to UTF-8 because Python strings are UTF-8 by default and the XML generator does not do any transcoding, so with current default encoding, the generated XML is invalid (unless the user transcodes to this default encoding or switches the encoding to the non-default UTF-8).

Addressed issues:

  • Encoding issue (see above)

Config usage if relevant (new plugin or updated schema):

make_rss:
   rsslink: http://example.com
   rsstitle: Feed from Flexget
   timestamp: yes

Log and/or tests output (preferably both):

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><title>The Flexget RSS Feed</title>
<link>http://my.server.net/series.rss</link>
<description>Episodes about Flexget.</description>
<generator>PyRSS2Gen-1.1.0</generator>
<docs>http://blogs.law.harvard.edu/tech/rss</docs>

Useful when need the generated file to be exactly the same if the
entries did not change.
It will be specified if the entry comes from the input RSS plugin.
In Python 3 all strings are in UTF-8, and the RSS XML generator does not
transcode. So, if we let the RSS XML be generated with the default
encoding that is not UTF-8 from entries that use default strings
(UTF-8), then the generated XML will be broken, and browsers that parse
it will report invalid characters.
@paranoidi
Copy link
Copy Markdown
Member

Looking good! Please update the wiki page after the merge.

@paranoidi paranoidi merged commit c934fa3 into Flexget:develop Feb 4, 2019
@radfish
Copy link
Copy Markdown
Contributor Author

radfish commented Feb 5, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants