Expand README.md with detailed examples for the NIP-B0 webmark command

This commit is contained in:
sepehr-safari 2025-04-30 16:37:53 +03:30
parent 113b3debb7
commit ddd137cd95
1 changed files with 23 additions and 0 deletions

View File

@ -288,6 +288,29 @@ cashuA1psxqyry8...
~> nak blossom --server aegis.utxo.one download acc8ea43d4e6b706f68b249144364f446854b7f63ba1927371831c05dcf0256c -o downloaded.png
```
### create a NIP-B0 web bookmark (kind: 39701) with optional title, tags, and published_at timestamp
```shell
# Basic usage with just URL and content
~> nak webmark https://example.com/blog/post -c "A great blog post about Nostr"
{"kind":39701,"id":"36d88cf5fcc449f2390a424907023eda7a74278120eebab8d02797cd92e7e29c","pubkey":"79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","created_at":1699485669,"tags":[["d","example.com/blog/post"]],"content":"A great blog post about Nostr","sig":"68e71a192e8abcf8582a222434ac823ecc50607450ebe8cc4c145eb047794cc382dc3f888ce879d2f404f5ba6085a47601360a0fa2dd4b50d317bd0c6197c2c2"}
# With title and tags
~> nak webmark --title "Example Blog" --tag nostr --tag blog https://example.com/blog/post -c "A great blog post about Nostr"
{"kind":39701,"id":"19aba166dcf354bf5ef64f4afe69ada1eb851495001ee05e07d393ee8c8ea179","pubkey":"2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","created_at":1699485669,"tags":[["d","example.com/blog/post"],["title","Example Blog"],["t","nostr"],["t","blog"]],"content":"A great blog post about Nostr","sig":"cf452def4a68341c897c3fc96fa34dc6895a5b8cc266d4c041bcdf758ec992ec5adb8b0179e98552aaaf9450526a26d7e62e413b15b1c57e0cfc8db6b29215d7"}
# With published_at timestamp
~> nak webmark --published-at 1738863000 https://example.com/blog/post -c "A great blog post about Nostr"
{"kind":39701,"id":"19aba166dcf354bf5ef64f4afe69ada1eb851495001ee05e07d393ee8c8ea179","pubkey":"2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","created_at":1699485669,"tags":[["d","example.com/blog/post"],["published_at","1738863000"]],"content":"A great blog post about Nostr","sig":"cf452def4a68341c897c3fc96fa34dc6895a5b8cc266d4c041bcdf758ec992ec5adb8b0179e98552aaaf9450526a26d7e62e413b15b1c57e0cfc8db6b29215d7"}
# With all options
~> nak webmark --title "Example Blog" --tag nostr --tag blog --published-at 1738863000 https://example.com/blog/post -c "A great blog post about Nostr"
{"kind":39701,"id":"19aba166dcf354bf5ef64f4afe69ada1eb851495001ee05e07d393ee8c8ea179","pubkey":"2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","created_at":1699485669,"tags":[["d","example.com/blog/post"],["title","Example Blog"],["t","nostr"],["t","blog"],["published_at","1738863000"]],"content":"A great blog post about Nostr","sig":"cf452def4a68341c897c3fc96fa34dc6895a5b8cc266d4c041bcdf758ec992ec5adb8b0179e98552aaaf9450526a26d7e62e413b15b1c57e0cfc8db6b29215d7"}
# Publish to specific relays
~> nak webmark --title "Example Blog" --tag nostr --tag blog https://example.com/blog/post -c "A great blog post about Nostr" wss://relay1.example.com wss://relay2.example.com
```
## contributing to this repository
Use NIP-34 to send your patches to `naddr1qqpkucttqy28wumn8ghj7un9d3shjtnwdaehgu3wvfnsz9nhwden5te0wfjkccte9ehx7um5wghxyctwvsq3gamnwvaz7tmjv4kxz7fwv3sk6atn9e5k7q3q80cvv07tjdrrgpa0j7j7tmnyl2yr6yr7l8j4s3evf6u64th6gkwsxpqqqpmej2wctpn`.