Open nvalexander opened 7 months ago
I do not have the a way to test this, but I believe a quick fix is to insert in nitter/src/views/rss.nimf, after the line
#result &= xmltree.escape(text)
the following:
#var maxLength = 130
#if result.len > maxLength:
# var cutoff = maxLength
# while cutoff > 0 and result[cutoff] notin {' ', '\n', '\t'}:
# dec(cutoff)
# if cutoff == 0:
# while cutoff < result.len and result[cutoff] notin {' ', '\n', '\t'}:
# inc(cutoff)
# result = result[0..cutoff-1]
#
I agree, and these very long posts definitely need to be trimmed, but it's not as simple as that. See #493 for an old related discussion.
Previously, users wanted to see the full post in the title, because they wanted to read the whole post from smartphone alerts. I don't think 10,000 characters, or whatever is the current limit, would still fit in the alert. In fact, I started this issue when my computer screen ran out of space.
Even a maxLength of 1000 would be better for me, when compared to the current setup.
I personally prefer the way that Mastodon integrated RSS. They don't include the "title" element in the articles and only make use of the "description", so you don't end up with a duplicate of the post in your RSS reader.
With the introduction of longer than 140 character posts, it may be the time to distinguish between title and description in the Atom feed. Currently, a thousand-character post leads, in Nitter, to a thousand-character title, which is not suitable for summary views.