Skip to content
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

Include quoted tweet body in RSS #820

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

gil
Copy link

@gil gil commented Mar 29, 2023

Hey folks! This is my quick attempt of displaying quoted tweets on RSS results. As I've said, I don't know this codebase nor have worked with Nim before, so I'm sorry for any problems it may cause. So far, it's working well on my test instance and I like the results much more. This is how it looks:

Before

Screenshot of a tweet with a link to a quoted tweet on an RSS reader

After

Screenshot of a tweet with a quoted one being displayed on an RSS reader

Fixes #132

@woj-tek
Copy link

woj-tek commented Apr 25, 2023

@gil - it looks great, would be awesome to have it included :-)

Comment on lines +55 to +58
<hr/>
<p>Quoting: <a href="${urlPrefix}${quoteLink}">${cfg.hostname}${quoteLink}</a></p>
${renderRssTweet(get(tweet.quote), cfg)}
#end if
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me start by saying that this is the sole reason it's keeping me away from using Nitter's RSS feeds and I'm grateful you pointed in the right direction here. I hope this get's merged as soon as possible 🤞

My 2 cents here would be that this should use more semantically correct element:

Suggested change
<hr/>
<p>Quoting: <a href="${urlPrefix}${quoteLink}">${cfg.hostname}${quoteLink}</a></p>
${renderRssTweet(get(tweet.quote), cfg)}
#end if
<blockquote>
<p>
$renderRssTweet(get(tweet.quote), cfg)}
</p>
<footer>
— <cite><a href="${urlPrefix}${quoteLink}">${cfg.hostname}${quoteLink}</a></cite>
</footer>
</blockquote>

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestion! It looks much better than what I did. Sorry I didn't merge it before, I was busy and then Twitter started breaking Nitter. Let's see if things will get more stable soon and I'll go back to this!

@koszzz
Copy link

koszzz commented Sep 2, 2023

I need it, that's wonderful.

@koszzz
Copy link

koszzz commented Sep 2, 2023

I hope this get's merged

@gil
Copy link
Author

gil commented Sep 4, 2023

Yeah, me too @koszzz ! But at this point, I'm not even sure if Nitter will ever be stable again so that we can use it for RSS 😢

@untitaker
Copy link

this patch seems to work for my usecases and is now deployed on nitter.woodland.cafe

@thomas-333
Copy link

thomas-333 commented Mar 8, 2024

I appreciate this is a few months old now but this is something I'm very interested in as I use my local Nitter instance for rss.

When I try and apply manually and compile I'm getting an error:

/src/nitter/src/views/rss.nimf(57, 12) Error: type mismatch
Expression: $renderRssTweet
  [1] renderRssTweet: proc (tweet: Tweet, cfg: Config): string

If I try and apply automatically the diff fails, presumably the code has moved on since?

curl https://github.com/zedeus/nitter/commit/d2b858e5e32107e558b4cecff08f07e13b1b93e2.diff | git apply
error: patch failed: src/views/rss.nimf:54
error: src/views/rss.nimf: patch does not apply

I'm using the latest guest_accounts branch.

@gil
Copy link
Author

gil commented Mar 8, 2024

@thomas-333 yeah, I imagined that would happen eventually. But given that Nitter future is uncertain (wasn't it discontinued a few weeks ago?) and RSS was never the focus, I'm not sure if it's worth investing on this anymore.

You could probably check the current src/views/rss.nimf and try to replicate my changes, it's not that much.

@thomas-333
Copy link

thomas-333 commented Mar 8, 2024

Thanks for the reply @gil.

Nitter is working at least for now with real accounts which is fine for my personal use in generating rss feeds. I'm hoping it will continue it at least some form.

After more testing your original code works fine. The problem was with @ninboy changes.

$renderRssTweet(get(tweet.quote), cfg)} should be ${renderRssTweet(get(tweet.quote), cfg)}

and the #end if line should not have been deleted. This seems to be working.

Also I should say thanks for this. This makes rss feeds so much better :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Include quoted tweet body in RSS
6 participants