Updated my Nostr Event parser POC. Now extracts events, relays, bech-32 encoded nostr: entities.

If you want to get an idea of how much data a single fairly short event can parse into.. it’s worth a look. It’s kind of like an AST for Nostr events - that ideally can be used by rendering engines or whatever.

May look at adding #[0]​ ‘s NDK to optionally query pubkeys/events for more info.

https://github.com/blakejakopovic/nostr_event_parser

Reply to this note

Please Login to reply.

Discussion

I haven’t been able to look at it yet (been packing yesterday and flying today) but want to have a look; is this a renderer of nostr events that UIs would use? Or does it parse rendered html into nostr events?

I’m basically trying to write a standard Nostr event decomposition capability that extracts out all the data into a standard object. Some information is missing or requires queries/requests - like a url content-type, or root event author, etc. That can be enabled/triggered on demand.

Ideally it can be used for more complex rendering of events too. I added a basic html output field that‘a basically find and replace/wrap a tag. I’d like to see if others want to share the approach before I try lock anything down.