First, I know already that this doesn't work. But I wanted to get what code I have up and then start some discussions on how to fix my errors.
The goal of this is to replace my existing rss_ogg plugin with something that's generic for any audio format, and any number of them. As such, its a TaskMultiplier plugin, not a Task plugin.
I used my initial rss_ogg plugin as a base, and then compared it to the gzip plugin to sort out how to do the task multiplication.
I know I have (at least) two distinct issues going on here with the code, and I'm sure its based on me not fully understanding something or other.
Firstly, this error seems to indicate that despite trying to register all the various paths with site.register_path_handler(), they don't seem to be found
WARNING: Nikola: Unknown path request of kind: rss_mp3
WARNING: Nikola: Unknown path request of kind: rss_mp3
WARNING: Nikola: Unknown path request of kind: rss_ogg
WARNING: Nikola: Unknown path request of kind: rss_ogg
Second, it seems like the process() method on this is being called considerably more often than I'd expected, which I believe is the culprit behind eventually getting this error
ERROR: Nikola: doit.exceptions.InvalidTask: Task generation 'post_render' has duplicated definition of 'post_render_podcast_rss:sitemap'
What I think I'm missing/misunderstanding is
1) how to correctly register a variable number of paths, constructed from those variables
2) where in the processing this plugin is being invoked, and how to limit that to where it needs to be (at the point where RSS feeds would normally be generated)
First, I know already that this doesn't work. But I wanted to get what code I have up and then start some discussions on how to fix my errors.
The goal of this is to replace my existing
rss_ogg
plugin with something that's generic for any audio format, and any number of them. As such, its aTaskMultiplier
plugin, not aTask
plugin.I used my initial
rss_ogg
plugin as a base, and then compared it to thegzip
plugin to sort out how to do the task multiplication.In its current state, when I run
nikola list
(from a demo site, with only the plugin needed changes made toconf.py
) I get pages of this error.I know I have (at least) two distinct issues going on here with the code, and I'm sure its based on me not fully understanding something or other.
Firstly, this error seems to indicate that despite trying to register all the various paths with
site.register_path_handler()
, they don't seem to be foundSecond, it seems like the
process()
method on this is being called considerably more often than I'd expected, which I believe is the culprit behind eventually getting this errorWhat I think I'm missing/misunderstanding is 1) how to correctly register a variable number of paths, constructed from those variables 2) where in the processing this plugin is being invoked, and how to limit that to where it needs to be (at the point where RSS feeds would normally be generated)