dmdm / feedgenerator-py3k Goto Github PK
View Code? Open in Web Editor NEWPort of feedgenerator to Python 3
License: BSD 3-Clause "New" or "Revised" License
Port of feedgenerator to Python 3
License: BSD 3-Clause "New" or "Revised" License
Though theoretically this code is new-style BSD like Django, there is no COPYING file, so this is effectively nonfree. I would really like to package this for Guix, but this is a showstopper at the moment for us...
@dmdm
Thanks for the standalone package.
Would you be willing to upgrade to the 1.9 version?
Specifically there is a missing feature in the current version which is related to the differences in between published
and updated
. And I need it for getpelican/pelican#1937
Or do you prefer to have a pull request?
I'm upgrading the FreeBSD port for py-feedgenerator from 1.2.1 -> 1.5, and it seems setup.py currently points test_suite to a nonexistent tests module. The following patch points it to the existing tests_feedgenerator module to make it function via python setup.py test.
Also, zip_safe=False helps us OS packagers and porters by ensuring the egg gets installed unzipped, so i've included that too.
Feel free to rename the module if you prefer that approach (A module named 'tests' is pretty common for ease of discovery)
--- ./setup.py.orig 2013-01-11 11:56:38.000000000 +1100
+++ ./setup.py 2013-05-19 14:41:39.961240204 +1000
@@ -32,7 +32,7 @@
KEYWORDS = "feed atom rss".split(' ')
VERSION = '1.5'
-TEST_SUITE = 'tests'
+TEST_SUITE = 'tests_feedgenerator'
REQUIRES = ['pytz', 'six']
@@ -52,4 +52,5 @@
keywords=KEYWORDS,
url=URL,
classifiers=CLASSIFIERS,
+ zip_safe=False,
)
I came to this error through pelican but I can reproduce it by the test suite:
$ nosetests
ERROR: test_001_string_results (tests_feedgenerator.test_feedgenerator.TestFeedGenerator)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/fabian/dev/feedgenerator-py3k/tests_feedgenerator/test_feedgenerator.py", line 69, in test_001_string_results
result = feed.writeString(ENCODING)
File "/Users/fabian/dev/feedgenerator-py3k/feedgenerator/django/utils/feedgenerator.py", line 188, in writeString
self.write(s, encoding)
File "/Users/fabian/dev/feedgenerator-py3k/feedgenerator/django/utils/feedgenerator.py", line 215, in write
handler.startElement("rss", self.rss_attributes())
File "/Users/fabian/dev/feedgenerator-py3k/feedgenerator/django/utils/xmlutils.py", line 19, in startElement
self._write('<' + name)
AttributeError: SimplerXMLGenerator instance has no attribute '_write'
----------------------------------------------------------------------
Ran 5 tests in 0.052s
FAILED (errors=1)
FAIL
Hi there,
Firstly, thanks for writing this library -- I see that it's used in a ton of places in the Python world, so +1 for that.
Secondly, I'd like to see if you'd consider renaming the lastBuildDate
RSS field to pubDate
.
I've been looking around the internet at various RSS clients / services, and it appears that almost none of them recognize the lastBuildDate
field that is outputted by feedgenerator.
MailChimp (the largest email campaign site) doesn't recognize lastBuildDate
, which causes numerous problems setting up RSS -> Email campaigns (see this support page for examples: http://kb.mailchimp.com/article/ive-posted-new-information-to-my-rss-feed-but-no-campaigns-have-been-sent/
I propose renaming the lastBuildDate
field to pubDate
, this way support will be largely fixed in a number of RSS clients / RSS services out there.
Thoughts?
Tags such as <script>
and <video>
may not be appropriate for post content in feeds, potentially causing validation problems for feed readers. Perhaps we should use the lxml Cleaner class (see: kill_tags
attribute) to remove these tags โ and the content within โ before adding the summary/description element to the feed entry.
@dmdm: What do you think?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.