Improvement of "none" (if feed tag is missing) #66

Closed
opened 2025-11-29 09:29:47 +00:00 by Sebastian_Berlin · 2 comments
Sebastian_Berlin commented 2025-11-29 09:29:47 +00:00 (Migrated from codeberg.org)

Maybe the None as a placeholder for the expected but not existing variable is misleading/confusing to readers.

It's first of all not language-sensitive und sometimes not publishing a post and/or (!) or a simple space or an empty string instead would be more useful. Examples to make it more clear:

  1. A post_template contains only {content_plaintext}, but if the tag <description> is empty or if it doesn't exist at all, posting an empty post (or even with None) doesn't make sense. In that case posting should be skipped.

  2. A post_template with {title}\\n\\n{content_plaintext} → The feed only contains <title>, but no <description> would currently result into

REAL TITLE

None

... but instead of None an empty string "" could be more useful.


I'm aware that this could be a bit complicated, because there a 3 or 4 conditions.

At least a self-defined variable for None would be helpful as a fallback. With that it's language-sensitive and you can also decide to remove the string using "".

Maybe the `None` as a [placeholder for the expected but not existing variable](https://codeberg.org/marvinsmastodontools/feed2fedi/issues/59) is misleading/confusing to readers. It's first of all **not language-sensitive** und sometimes **not publishing a post** and/or (!) or a simple space or an **empty string** instead would be more useful. Examples to make it more clear: 1. A `post_template` contains only `{content_plaintext}`, but if the tag `<description>` is empty or if it doesn't exist at all, posting an empty post (or even with `None`) doesn't make sense. In that case posting should be skipped. 2. A `post_template` with `{title}\\n\\n{content_plaintext}` → The feed only contains `<title>`, but no `<description>` would currently result into ``` REAL TITLE None ``` ... but instead of `None` an empty string `""` could be more useful. --- I'm aware that this could be a bit complicated, because there a 3 or 4 conditions. At least a self-defined variable for `None` would be helpful as a fallback. With that it's language-sensitive and you can also decide to remove the string using `""`.
marvin8 commented 2025-11-29 09:38:11 +00:00 (Migrated from codeberg.org)

Thanks for creating a separate issue.

I'll have to look into this more deeply... this is might be a bit complicated as you guessed.

Thanks for creating a separate issue. I'll have to look into this more deeply... this is might be a bit complicated as you guessed.
marvin8 commented 2025-12-18 00:24:36 +00:00 (Migrated from codeberg.org)

Fix in release 3.4.1

Fix in [release 3.4.1](https://codeberg.org/marvinsmastodontools/feed2fedi/releases/tag/3.4.1)
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#66
No description provided.