Suggestion: custom feed tags #64

Closed
opened 2025-11-29 08:19:17 +00:00 by Sebastian_Berlin · 7 comments
Sebastian_Berlin commented 2025-11-29 08:19:17 +00:00 (Migrated from codeberg.org)

In rare cases choosing a custom and/or non-standard tag of a feed is required.

Example: A media library of public broadcasters in Germany uses for <link> the url to the mp4 media file. That's in general nice, but Mastodon etc. won't embed this as a video. Instead it's just the plain url (like here) without any preview picture (like with in an article) or playing-options (like in an embedded youtube-video).

But the feed (see link in the first paragraph) has luckily for every <item> the custom tag <websiteUrl> (like here), which is a link to the media page, where you can play the film. It would be a better alternative to the media file url in <link>, because in that situation Mastodon etc. handles the link like a normal article and it shows the title, teaser and a thumbnail.

That's just one of many examples where using a custom and non-default tag is necessary or at least more practical for a specific feed. Maybe you could take a look to build such feature.

In rare cases choosing a custom and/or non-standard tag of a feed is required. Example: [A media library of public broadcasters in Germany](https://mediathekviewweb.de/feed?query=Berlin&everywhere=true) uses for `<link>` the url to the mp4 media file. That's in general nice, but Mastodon etc. won't embed this as a video. Instead it's just the plain url ([like here](https://wdr-progressive.ard-mcdn.de/medp/ondemand/de/fsk0/339/3391961/3391961_64832098.mp4)) without any preview picture (like with in an article) or playing-options (like in an embedded youtube-video). But the feed (see link in the first paragraph) has luckily for every `<item>` the custom tag `<websiteUrl>` ([like here](https://www.ardmediathek.de/video/Y3JpZDovL3dkci5kZS9CZWl0cmFnLXNvcGhvcmEtYjBiNzI2N2YtZGU1ZS00ZjAwLWEyMWUtNjg0YTY5OTVmMGNi)), which is a link to the media page, where you can play the film. It would be a better alternative to the media file url in `<link>`, because in that situation Mastodon etc. handles the link like a _normal_ article and it shows the title, teaser and a thumbnail. That's just one of many examples where using a custom and non-default tag is necessary or at least more practical for a specific feed. Maybe you could take a look to build such feature.
marvin8 commented 2025-11-29 09:35:07 +00:00 (Migrated from codeberg.org)

I had a look at the two feeds you listed and I can't see a difference. Can you double check that the feed url A media library of public broadcasters in Germany in the second paragraph and that the feed this feed in the third paragraph are actually different?

I had a look at the two feeds you listed and I can't see a difference. Can you double check that the feed url ` A media library of public broadcasters in Germany` in the second paragraph and that the feed `this feed` in the third paragraph are actually different?
Sebastian_Berlin commented 2025-11-29 09:37:15 +00:00 (Migrated from codeberg.org)

It's the same feed, where every <item> has a <link> and a <websiteUrl>. (I updated the 1st sentence of the 3rd paragraph to make it more clear.)

It's the same feed, where every `<item>` has a `<link>` and a `<websiteUrl>`. (I updated the 1st sentence of the 3rd paragraph to make it more clear.)
marvin8 commented 2025-11-29 09:39:57 +00:00 (Migrated from codeberg.org)

Ok... I think I understand know. Let me have a look at this and I'll get back to you.

Ok... I think I understand know. Let me have a look at this and I'll get back to you.
Sebastian_Berlin commented 2025-11-29 09:50:58 +00:00 (Migrated from codeberg.org)

Thank you!

btw: Please take care that sometimes there are (even standard) tags, which are arrays and no simple strings.

Often used in categories, for example:

<Categories>
     <Category>CAT 1</Category>
     <Category>CAT 2</Category>
</Categories>

OR only

<Category>CAT 1</Category>
<Category>CAT 2</Category>

It will be tricky, even though arrays aren't often used, especially for custom tags.

Thank you! btw: Please take care that sometimes there are (even standard) tags, which are arrays and no simple strings. Often used in categories, for example: ``` <Categories> <Category>CAT 1</Category> <Category>CAT 2</Category> </Categories> ``` **OR** only ``` <Category>CAT 1</Category> <Category>CAT 2</Category> ``` It will be tricky, even though arrays aren't often used, especially for custom tags.
marvin8 commented 2026-02-13 08:02:13 +00:00 (Migrated from codeberg.org)

@Sebastian_Berlin I finally got around to having a crack at this. Just FYI I had an LLM agent (deepseek) help with this.

If you have a chance, have a look at PR #72 and give any feedback.

@Sebastian_Berlin I finally got around to having a crack at this. Just FYI I had an LLM agent (deepseek) help with this. If you have a chance, have a look at PR [#72](https://codeberg.org/marvinsmastodontools/feed2fedi/pulls/72) and give any feedback.
Sebastian_Berlin commented 2026-02-13 08:50:06 +00:00 (Migrated from codeberg.org)

@Sebastian_Berlin I finally got around to having a crack at this.

Awesome, thanks a lot! I look forward to the next release to check this. :)

> @Sebastian_Berlin I finally got around to having a crack at this. Awesome, thanks a lot! I look forward to the next release to check this. :)
marvin8 commented 2026-02-14 05:51:54 +00:00 (Migrated from codeberg.org)

Now implemented in release 3.5.0

Now implemented in release 3.5.0
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
marvin8/feed2fedi#64
No description provided.