nitter icon indicating copy to clipboard operation
nitter copied to clipboard

titles in RSS feed became too long after the 2023 massive increase in character limit

Open nvalexander opened this issue 2 years ago • 4 comments

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.

nvalexander avatar Nov 13 '23 09:11 nvalexander

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]
#

nvalexander avatar Nov 16 '23 07:11 nvalexander

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.

zedeus avatar Nov 16 '23 12:11 zedeus

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.

nvalexander avatar Nov 16 '23 12:11 nvalexander

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.

PhilC813 avatar Dec 13 '23 03:12 PhilC813