I’ve written a proof of concept Nostr Event Parser in typescript that ideally can be used universally by others to parse event content into html, or just extract metadata that can be used to render html however you like.
If anyone’s keen to use this, let me know. I think having a general purpose Nostr event parsing library is valuable. I’m not entirely sure how best to handle some of the performance critical parts, however I’m sure we can find a way.
## Features
* Extract hashtags (and convert to html a tags)
* Extract mentions (and convert to html a tags)
* Extract urls (fetch content-type, preview metadata, and convert to html a tags)
* Custom URL handlers
## Future
* Refactor into a library
* Query relays for mention pubkey kind0 metadata (possible caching)
* Root event and reply event lookup (with optional pubkey lookup)
* Handle different event kinds
* Support for NIP-27 - Text Note References
* Ideally more information on image urls like dimentions