Commit graph

45 commits

Author SHA1 Message Date
Lars Kiesow
0eb12f9133
Prevent XML Denial of Service Attacks
This patch prevents entity expansion for provided XML content to guard
against XML denial of service attacks like XML bomb or Billion laughs
attack.
2020-01-28 17:29:11 +01:00
Henry Walshaw
66f8bdb45e Fix errors from make test
One Python 2.7 error in the test (didn’t work for points)

Also fixed all the formatting errors raised by flake8
2019-07-29 10:24:02 +10:00
Henry Walshaw
b02278e536 Fix a really dumb formatting issue for the geom_interface
Use the old formatting tag instead of the new when creating geom text
from the geo_interface. Tests updated as well
2019-07-08 15:16:20 +10:00
Henry Walshaw
8cd50bf768 Add unit tests for simple GeoRSS
Also fix a couple of bugs that came up during testing - mostly making
sure that elevation, floor and radius are actually set as strings in
the XML
2019-07-08 14:58:21 +10:00
Henry Walshaw
8d413f576f Add a geom_from_geo_interface method for GeoRSS Entry
A standard way for different geometry libraries in Python to be
interoperable is a `__geo_interface__` for the geometry (see the
specification: https://gist.github.com/sgillies/2217756). This
includes the shapely library, geometries from QGIS, and geometries in
Esri's arcpy libraries for ArcGIS desktop and ArcGIS pro.

To make it easier to generate a georss entry a simple method which
does the conversion (of the supported geometries only) and sets the
appropriate geometry type.

This includes a custom error for the geometry being incompatible and a
custom warning for a polygon with interior holes. This is done to
store the geometries on the exception / warning if required for
debugging.
2019-07-08 13:38:39 +10:00
Henry Walshaw
642862bb2b Update simple GeoRSS to complete the specification
Originally the georss entry only contained a simple point
specification. Update to include:

- other geometries (line, polygon and box)
- additional properties (featuretypetag, relationshiptag, featurename)
- elevation (elev, floor)
- radius (radius)

This also includes basic type checking with a value error for the
elev, floor and radius tags.
2019-07-08 12:36:16 +10:00
Unit 193
9da6b17ca2 Fix a few typos.
deprected → deprecated
instanciate → instantiate
repostiory → repository
ressource → resource
2018-07-04 03:29:15 -04:00
Lars Kiesow
27e9cd0c9a
Fixed GeoRSS Extemsion
This patch fixes a few issues with pzll request #66 which adds supprt
for a simple GeoRSS extension.
2018-03-04 22:55:57 +01:00
Lars Kiesow
2d9e85d956 Merge branch 'bobbrez/add-simple-georss' of https://github.com/bobbrez/python-feedgen 2018-03-04 22:44:38 +01:00
Lars Kiesow
fccb05f151
Merge branch 'master' of https://github.com/EdwardBetts/python-feedgen 2018-03-04 20:16:01 +01:00
Lars Kiesow
9026316391
Use isort to sort import
…so that they all have the same structure.
2018-03-04 20:05:29 +01:00
Edward Betts
95d6fd3065 Correct spelling mistakes. 2018-03-04 09:52:55 +00:00
Bob Breznak
ae5759d133 Better format Geo and GeoEntry. Add test for Geo Extension 2017-09-12 15:50:05 -04:00
Bob Breznak
c0a1acc18c Add Simple GeoRSS support 2017-09-12 10:50:26 -04:00
Lars Kiesow
4a0a2663e9
Enable Multiple media:thumbnail Elements
As with media:content, there can be multiple media:thumbnail elements in
an item and in multiple groups. This patch adds the ability to do this
in the same manner as with the content.

Part of #58
2017-05-21 23:56:56 +02:00
Lars Kiesow
4970dab6d7
Enable Multiple media:content/media:group Elements
One item can have multiple media:content elements which may be located
in multiple media:group element to indicate that content is the same but
for the format.

This patch adds the ability to add multiple content elements and define
the group to which they go belong.

If no group is specified, all elements are located in a `default` group.

If the group is set to None, the content element is directly attached to
the item element.

Part of #58
2017-05-21 23:56:35 +02:00
Lars Kiesow
a7ae36cb4f
Remove redundant media from method name
Using `fe.media.media_content(…)` is quite redundant. iThis patch
changes the name to `fe.media.content(…)`. The same goes for the
thumbnail method.

Part of #58
2017-05-21 23:56:12 +02:00
Lars Kiesow
8487af298e
Add Media RSS to RSS
This patch adds the necessary RSS extension to ensure that added Media
RSS elements end up in the resulting RSS XML.

Part of #58
2017-05-21 23:55:49 +02:00
Lukas Rusak
ba5bbd2256
add new media entry extension 2017-03-28 13:22:27 -07:00
Lars Kiesow
8901310fa0
Added Torrent Tests
This patch adds tests for the torrent extension. It also fixes a minor
bug discovered by the new tests.

Signed-off-by: Lars Kiesow <lkiesow@uos.de>
2017-03-13 20:55:14 +01:00
Lars Kiesow
4314475bfb
Extended test Coverage
This patch extends the test coverage of the unit tests. It also enables
python-coverage and coveralls to track unit test coverage.

There are some additional minor issue fixed discovered during the test
creation.

Signed-off-by: Lars Kiesow <lkiesow@uos.de>
2017-02-05 22:03:02 +01:00
Lars Kiesow
444855a248
Flake8 Compatibility
This patch makes the feedgen flake8 compatible, fixing some minor issues
along the way. Most noticeable, this switches from tabs to spaces.

Signed-off-by: Lars Kiesow <lkiesow@uos.de>
2017-01-05 00:39:33 +01:00
Lars Kiesow
b4400146ea
Fixed Podcast Extension API incompatibility
This patch ensures the compatibility of setting categories for itunes
podcasts even though the new API now supports setting multiple
(sub-)categories.

It also fixes the docs and adjusts them to explicitly mark the old
syntax as deprecated.

Signed-off-by: Lars Kiesow <lkiesow@uos.de>
2016-09-04 18:56:30 +02:00
Lars Kiesow
3d8b9e304b Merge branch 'master' of https://github.com/xaxa/python-feedgen into itunes-category 2016-09-04 17:59:18 +02:00
raspbeguy
94eabab02d Fixed torrent, added test and doc 2016-05-24 23:56:32 +02:00
raspbeguy
6076574150 fixed torrent ext, but still not doing what we want 2016-05-24 17:45:38 +02:00
raspbeguy
2b597a6dee finished torrent ext 2016-05-24 15:48:18 +02:00
raspbeguy
6b7c44eeb3 Creation of torrent extention 2016-05-24 00:46:11 +02:00
xaxa
086d51c555 changes to support multiple itunes (sub)categories 2016-03-21 11:38:44 -03:00
Ken Sato
e4149d5c00 add syndication extension 2015-03-08 18:39:18 +09:00
Lars Kiesow
ae760d0463
Fixed some fields of the DC extension
Signed-off-by: Lars Kiesow <lkiesow@uos.de>
2014-07-20 22:19:17 +02:00
wltb
eab1f874f2 podcast: Update docstring, remove legacy x=x code 2014-05-12 19:04:55 +02:00
wltb
cddff68f37 dc: Centralize XML extension 2014-05-12 18:53:39 +02:00
Lars Kiesow
1d0d13fdc6
Fixed some typos 2014-05-11 20:24:48 +02:00
wltb
bf6b8af249 Feed Creation: Add a separate extension call for namespace stuff. Change extensions accordingly.
Entry creation: Entries create their own XML Element, which is put into the feed by the caller
2014-05-06 10:43:39 +02:00
wltb
b3fb2ba777 Implement action for items in the dc extension. 2014-04-21 17:54:38 +02:00
meteozond
d9b19f8536 Fixed podcast itunes image 2013-08-15 12:55:09 +04:00
Lars Kiesow
7981ce5884 dc: ready to use 2013-05-29 20:40:43 +02:00
Lars Kiesow
c9e07f3e0c renamed dc elements extension to dc 2013-05-29 13:55:53 +02:00
Lars Kiesow
c885652153 finished dc elements extension for feed 2013-05-29 13:54:54 +02:00
Lars Kiesow
095af7c57a Started working on Dublin Core Elements extension 2013-05-27 18:12:14 +02:00
Lars Kiesow
66689be7ff Proper initialization 2013-05-16 19:04:03 +02:00
Lars Kiesow
dd0d742e6d Fixed return type of base extension 2013-05-16 18:32:32 +02:00
Lars Kiesow
9df7e9dc48 Documentation for extension system 2013-05-05 20:36:35 +02:00
Lars Kiesow
840dc7e5b8 Added extension support and converted PodcastGenerator to extension 2013-05-05 18:17:44 +02:00