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

feat: implement the nostr protocol #2946

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

github-tijlxyz
Copy link

@github-tijlxyz github-tijlxyz commented Nov 17, 2024

Hello,
The nostr protocol is a open protocol that can be used to publish articles. You can find more information about the nostr protocol at github.com/nostr-protocol/nostr . This pull request tries to implement nostr's long-form content (NIP-23) into the miniflux feeds.

This PR implements:

  • The user can input a nostr: user identifier link (it supports dns based links (NIP05) and bech 32 encoded links (NIP19) nprofile or npub.
  • The server can load the nostr profile and profile picture, and the server can laod nostr posts
  • The markdown parser parses nostr links using goldmark-nostr

below is me trying to explain what I have done to implement nostr into miniflux.

I started the base implementation from the internal/reader/handler/handler.go file, in which I added sections to the CreateFeed and RefreshFeed functions. I tried to integrate as best as possible with your code but I know this is probably not the right way to do it, I am happy to hear your opinion about how to best structure this with the existing miniflux code.

In addition to that:

  • To execute nostr actions I'm using the widely used go-nostr library.
  • I made a new nostr.go file and folder, which houses the nostr miniflux implementation.
  • The subscription finding code is implemented from here
  • The icon fetching code is implemented from here

Thank you

miniflux-showcase-final.mp4

Do you follow the guidelines?

@jvoisin
Copy link
Collaborator

jvoisin commented Dec 1, 2024

I'm not convinced that adding a nostr client to miniflux is a good idea: adding support for nostr sounds like a first step towards adding support for twitter, bluesky, pinterest, mastodon, …

@github-tijlxyz
Copy link
Author

Of course implementing nostr is a pretty big change compared to other simple sites and things. But nostr is a very open protocol with I think lots of potential, and viewing it in this format along other services would be great.

And, note that we are only implementing nip23 which is the specification for long form content. NOT the twitter-style content.

@asilentdreamer
Copy link

I'm not convinced that adding a nostr client to miniflux is a good idea: adding support for nostr sounds like a first step towards adding support for twitter, bluesky, pinterest, mastodon, …

While I don't use nostr and have no opinions on this PR, bluesky and mastodon offer rss feeds for every user. Nostr is probably one of the few platforms that are open but don't offer rss feeds which probably is not possible due to their architecture.

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

Successfully merging this pull request may close these issues.

3 participants