#asknostr

I'm doing some work on #nip-23 content, and am looking for a way to view articles published to a local relay, but not just the raw text, something that will render the markdown into html.

I will pay 2500 sats to someone with the first suggestion that solves my problem for an app that runs locally on linux and renders articles.

Reply to this note

Please Login to reply.

Discussion

o1 pro’s response:

afaict the easiest route on linux rn is to run a local viewer that automatically converts markdown to html. something like grip is dead simple: you just do pip install grip then run grip file.md and it spawns a local webserver with fully rendered html. you could hack a small script to pull #nip-23 articles from your local relay (idk how your relay dumps data, bc i have zero clue about your setup) and pass the raw text into grip or another renderer.

if you want a more formal pipeline: fetch articles -> parse to a temp md file -> convert via pandoc or grip -> open in browser. i’d probably just adapt grip bc it’s basically an ephemeral local web server. if you’re feeling fancy and want a standalone app, i’d look into ghostwriter for an all-in-one markdown editor with decent preview. but imo a quick python aggregator with a simple markdown2 call is the most flexible approach. you’d basically write:

1. get #nip-23 event text from local relay

2. pipe into markdown2.markdown()

3. serve that html with a trivial flask route

should be enough to keep it local and ephemeral for your reading needs. have fun building your labyrinthine knowledge aggregator.

thank you for the suggestion, but I am looking for an app. I can the appropriate libraries together in #go as well, but I don't want to spend hours patching this together, would rather just download something.