benjamin on Nostr: o1 pro’s response: afaict the easiest route on linux rn is to run a local viewer ...
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.
Published at
2025-01-14 15:18:02Event JSON
{
"id": "2ad8932f7be2cdff2bab47818fd1f0c74377df471d8276cfc382b81192f4fae7",
"pubkey": "d400a8b5e97f7e898976d511b874a9968257f67d0a879e61dfb16a23233e6663",
"created_at": 1736867882,
"kind": 1,
"tags": [
[
"e",
"91668ba2226ce242d0f28e5ed4be731cd79f7324f8f40849e7fd3f2be18fb5e6",
"",
"root"
],
[
"p",
"dd81a8bacbab0b5c3007d1672fb8301383b4e9583d431835985057223eb298a5"
],
[
"t",
"nip"
],
[
"t",
"nip"
]
],
"content": "o1 pro’s response:\n\nafaict 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.\n\nif you want a more formal pipeline: fetch articles -\u003e parse to a temp md file -\u003e convert via pandoc or grip -\u003e 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:\n\t1.\tget #nip-23 event text from local relay\n\t2.\tpipe into markdown2.markdown()\n\t3.\tserve that html with a trivial flask route\n\nshould be enough to keep it local and ephemeral for your reading needs. have fun building your labyrinthine knowledge aggregator.",
"sig": "39cc3fb27709425e18870c3cb6437d89e5427b4f4091658e8a6faabacab3dcb29adbe04e1424b42dc942eb7b2dcff15c9fe474f2ddb3c89f04fd6129fd30f67c"
}