New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Optionally read rss guid from the post #2675
Conversation
Sorry, but this has been rejected before in #2378. |
First, thank you for reviewing this pull request. But I strongly disagree with the reasons given in #2381.
I'm totally ok with leaving the derived permalink as the default; but since it's not actually a permalink (it changes if the post moves) it should be possible to specify something actually permanent if I want. |
Thanks for being willing to have the discussion! It's a pleasure to
contribute to Nikola!
…On Sun, Feb 19, 2017, 7:56 AM Chris Warrick ***@***.***> wrote:
@da2x <https://github.com/da2x>, @ralsina <https://github.com/ralsina>:
opinions welcome.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2675 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAVYVjN0bpJeQctMtCRQI8H5ZTwKMVuNks5reFgcgaJpZM4MFan5>
.
|
How about instead having the possibility to customize RSS/Atom feed generation? Like having a signal which passes the XML object, so that signal handler plugins can hook up to the signal and add stuff? That would allow to add such specific things without modifying Nikola core. |
Would such a signal handler plugin have access to the post? (I haven't made
a signal handler plugin before.)
If so, would that be a better way to handle the iTunes tags I'm adding in
#2674?
On Sun, Feb 19, 2017, 9:21 AM Felix Fontein <notifications@github.com> wrote:
How about instead having the possibility to customize RSS/Atom feed
generation? Like having a signal which passes the XML object, so that
signal handler plugins can hook up to the signal and add stuff? That would
allow to add such specific things without modifying Nikola core.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2675 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAVYVlJCxOZ3RhKYtxRe756WuAanUPYdks5reGv2gaJpZM4MFan5>
.
|
Depends a bit what the signal call passes as its arguments. Passing the XML object and the post list would be a good idea. (You can of course find the posts based on the generated XML, like by using the (There's also a different solution which doesn't require any support in Nikola core: you could monkey-patch the |
Right: by the time you monkey-patch the RSS function, you're no better than
implementing your own RSS feed in a plugin.
I've gotta say, though: parsing the posts back out of the generated feed
seems like the wrong thing; and I think you'd have to do that even if you
pass the posts to the signal handler, to know what part of the feed to
edit, right? Seems the opposite of the simplicity that is being argued for.
…On Sun, Feb 19, 2017, 9:40 AM Felix Fontein ***@***.***> wrote:
Depends a bit what the signal call passes as its arguments. Passing the
XML object and the post list would be a good idea. (You can of course find
the posts based on the generated XML, like by using the guid, but that's
kind of hacky.)
(There's also a different solution which doesn't require any support in
Nikola core: you could monkey-patch the Nikola object by replacing its
generic_rss_renderer method by your own function, which does whatever you
want. I wouldn't recommend doing that, though.)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2675 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAVYVjm9Ja1KZNMOTio8LJqT07mMqzXjks5reHCMgaJpZM4MFan5>
.
|
I fully agree. I think it makes sense to provide the signal handler with a list of pairs Regarding iTunes tags: that would only partially work, since you don't know in the signal handler whether this is a feed where |
(Signal handlers are well suited for changes which affect ALL feeds, not for specific ones.) |
Sigh. It's a valid issue. I suppose if the post has a guid metadata it could be used, defaulting to what is used now. If it breaks something else when used, you get to keep both pieces :-P The RSS/Atom generation is unwieldly, and it could be improved, but backwards compatibility is a must. If we change things the wrong way we'll make everyone flood the planets. |
While the discussion is happening, can I get the "duplicate" and "wontfix" labels removed from the PR? I'm happy to continue discussing the best way to do this, and learning about signal handlers is probably good; but those labels are vexing me. :) fwiw, I liked the idea of a signal handler that would receive |
I removed the labels. For your other question: I guess so, but I don't really know. I've never worked with the RSS feed code. |
So what's the current thinking? Does this need to become "enhance RSS feed generation to support signal handlers" or is the existing implementation path acceptable? |
The last time someone suggested this feature, it was opposed by the argument that most feed readers ignore the GUID anyway. Since we now have one very specific example where the ability to specify a GUID is crucial (iTunes podcasts), and this fix is very simple and doesn't add much complexity, I suggest the original concerns do not apply anymore. @ralsina, @da2x, @tritium21 (you three opposed the previous PR): do you agree to that? Or do you still have concerns against this? |
I’m for merging this as-is. |
Already merged, but because of the implementation of this version of the feature doesn't break history like the old one did, I have no objection to it. |
(I think the old implementation of this feature also didn't break anything. It added a function to |
I looked at the old implementation....at least the version of it I saw simply swapped the guid from the permalink to a metadata field. That broke stuff. I didn't check, just now, if that was changed in later versions, and I don't remember offhand. With a use case, and a non-breaking simple change, I cant see a problem |
I just looked in the commit referenced in the old PR: julianbrost@40ba642 That one only uses the GUID from metadata if it is specified there, and otherwise uses |
Fwiw, the implementation in #2378 looks better than mine / this PR to me. |
I'm working on enhancing Nikola to support publishing a podcast RSS feed. Most of this work is going into a "postcast" plugin I'm working on, and will submit or publish eventually; but some of what I'm trying to do requires support in Nikola itself.
This PR aims to support optional explicit (and, thus, static) GUIDs from posts, so that if I move where the podcast posts are they don't flood podcast apps with old episodes.
Other related PRs I'm working on:
I'd also be interested in direction for where and how to publish a plugin, when that's ready.