lkiesow / python-feedgen

Python module to generate ATOM feeds, RSS feeds and Podcasts.
https://feedgen.kiesow.be/
BSD 2-Clause "Simplified" License
723 stars 123 forks source link

allowing pluggable extensions #43

Closed jvanasco closed 8 years ago

jvanasco commented 8 years ago

The current Plugin system has a large fault - it will only load plugins from the feedgen/ext directory -- which means one must use a forked or patched version to support new feed or custom types.

The current system is too hardcoded to alter or replace, so I added in a second registry via register_extension that accepts Python classes and tracks them in a separate registry. The various calls to load_extension check to see if the namespaces were loaded via register_extension and calls the appropriate 'load_extension' or 'register_extension'