-
Notifications
You must be signed in to change notification settings - Fork 21
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
Create missing basic elements with "Insert" #110
Comments
That would be linked to #92. Simple problem: I don't know how to do this properly. Nokogiri does not have an API to create an XML element at a random position via an xpath. At least I did not see a proper solution. So the code would devolve to something like: Split the xpath at Do you see a better solution? |
Doesn't .add_next_sibling work with XPath results? If it does, what about following this logic:
I think it's a good idea to hardcode the accepted tags to prevent abuse or random errors. That's why I said "basic elements" in the title of this issue. |
Note: I just deleted a comment where I understood your suggestion wrong. Your idea to limit it to specific items could make this work. There is no reason not to have them in our output feed anyway. Could be automated whenever a RSS feed is generated. I dislike that it's not a general solution, but it should solve the reported usecase. |
This was actually going to be my next suggestion. If the What about using the date as a placeholder title in case there's no title? With #71, it'd be even easier to customize each title afterwards. If there's no date either, maybe the link. Elements like categories, if appended automatically, should be empty by default. |
See this example: https://www.pipes.digital/pipe/E9D7p4qj
If you set the
insert
block to target/rss/channel/item/description
, it successfully replaces the existing description.However, if you target
/rss/channel/item/title
, nothing happens, since the post has notitle
tag yet.The text was updated successfully, but these errors were encountered: