{"id":50478682,"url":"https://github.com/ikuradon/nos2md","last_synced_at":"2026-06-01T15:32:00.887Z","repository":{"id":350152335,"uuid":"1149824944","full_name":"ikuradon/nos2md","owner":"ikuradon","description":"Nostr kind:1 events to Markdown converter","archived":false,"fork":false,"pushed_at":"2026-02-04T23:46:35.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-05T20:46:06.906Z","etag":null,"topics":["deno","markdown","nostr","obsidian"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ikuradon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-04T15:09:02.000Z","updated_at":"2026-02-05T00:06:48.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ikuradon/nos2md","commit_stats":null,"previous_names":["ikuradon/nos2md"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ikuradon/nos2md","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikuradon%2Fnos2md","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikuradon%2Fnos2md/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikuradon%2Fnos2md/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikuradon%2Fnos2md/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ikuradon","download_url":"https://codeload.github.com/ikuradon/nos2md/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikuradon%2Fnos2md/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33782314,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-01T02:00:06.963Z","response_time":115,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deno","markdown","nostr","obsidian"],"created_at":"2026-06-01T15:31:59.932Z","updated_at":"2026-06-01T15:32:00.882Z","avatar_url":"https://github.com/ikuradon.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nos2md\n\nFetch your Nostr text notes (kind:1) and export them as daily Markdown files — perfect for Obsidian.\n\nNostrのテキストノート（kind:1）を取得して、日単位のMarkdownファイルに出力するツールです。Obsidianとの連携に最適。\n\n## Features / 機能\n\n- 📡 Fetch kind:1 events from multiple relays / 複数リレーからkind:1イベントを取得\n- 📅 Group notes by day / 日単位でノートをグループ化\n- 🎨 Customizable output via [Eta](https://eta.js.org/) templates / Etaテンプレートで出力を自由にカスタマイズ\n- 🔗 Auto-generated nevent links / neventリンクを自動生成\n- ⚙️ All settings in a single config file / 設定ファイル1つで管理\n\n## Requirements / 必要なもの\n\n- [Deno](https://deno.com/) v2+\n\n## Quick Start / クイックスタート\n\n### 1. Clone \u0026 configure / クローン＆設定\n\n```bash\ngit clone https://github.com/yourname/nos2md.git\ncd nos2md\n```\n\nCopy the sample config and edit it:\n\nサンプル設定をコピーして編集してください：\n\n```bash\ncp config.sample.json config.json\n```\n\nEdit `config.json` with your settings:\n\n`config.json` を編集してください：\n\n```json\n{\n  \"relays\": [\n    \"wss://relay.damus.io\",\n    \"wss://nos.lol\",\n    \"wss://yabu.me\"\n  ],\n  \"npub\": \"npub1your...pubkey\",\n  \"outputDir\": \"./output\",\n  \"timezone\": \"Asia/Tokyo\",\n  \"daysBack\": 7,\n  \"templateDir\": \"./templates\",\n  \"templateFile\": \"daily\",\n  \"linkPrefix\": \"https://njump.me/\"\n}\n```\n\n### 2. Run / 実行\n\n```bash\ndeno task start\n```\n\nOr with a custom config path / 設定ファイルのパスを指定する場合：\n\n```bash\ndeno task start -- --config /path/to/config.json\n```\n\n### 3. Output / 出力\n\nDaily Markdown files will be generated in your `outputDir`:\n\n`outputDir` に日単位のMarkdownファイルが生成されます：\n\n```\noutput/\n├── 2026-01-29.md\n├── 2026-01-30.md\n├── 2026-01-31.md\n├── 2026-02-01.md\n├── 2026-02-02.md\n├── 2026-02-03.md\n└── 2026-02-04.md\n```\n\n## Config Reference / 設定リファレンス\n\n| Key | Type | Default | Description |\n|-----|------|---------|-------------|\n| `relays` | `string[]` | *(required)* | Relay URLs / リレーURL一覧 |\n| `npub` | `string` | *(required)* | Your npub / 取得対象のnpub |\n| `outputDir` | `string` | `\"./output\"` | Output directory (supports `{{YYYY}}`, `{{MM}}`, `{{DD}}`, `{{date}}` placeholders) / 出力先ディレクトリ（テンプレート変数対応） |\n| `timezone` | `string` | `\"Asia/Tokyo\"` | Timezone for date grouping / 日付グループ化のタイムゾーン |\n| `daysBack` | `number` | `7` | Number of days to fetch / 取得する日数 |\n| `templateDir` | `string` | `\"./templates\"` | Template directory / テンプレートディレクトリ |\n| `templateFile` | `string` | `\"daily\"` | Template file name (without `.eta`) / テンプレートファイル名（`.eta`なし） |\n| `linkPrefix` | `string` | `\"https://njump.me/\"` | URL prefix for note links / ノートリンクのURLプレフィックス |\n\n## Templates / テンプレート\n\nnos2md uses [Eta](https://eta.js.org/) as its template engine. Edit `templates/daily.eta` to customize the output.\n\nnos2mdは [Eta](https://eta.js.org/) テンプレートエンジンを使用しています。`templates/daily.eta` を編集して出力をカスタマイズできます。\n\n### Available Variables / 使用可能な変数\n\n**Top level / トップレベル:**\n\n| Variable | Description |\n|----------|-------------|\n| `it.date` | Date string (YYYY-MM-DD) / 日付文字列 |\n| `it.events` | Array of events / イベント配列 |\n| `it.npub` | Configured npub / 設定されたnpub |\n| `it.timezone` | Configured timezone / 設定されたタイムゾーン |\n\n**Each event (`ev`) / 各イベント:**\n\n| Variable | Description |\n|----------|-------------|\n| `ev.time` | Formatted time (HH:MM) / フォーマット済み時刻 |\n| `ev.content` | Note content / ノート本文 |\n| `ev.noteId` | note1... encoded ID / note1... エンコードID |\n| `ev.nevent` | nevent encoded ID (with relay hints) / neventエンコードID（リレーヒント付き） |\n| `ev.link` | Full link (linkPrefix + nevent) / 完全なリンク |\n| `ev.id` | Raw hex event ID / 生のhexイベントID |\n| `ev.pubkey` | Author's hex pubkey / 投稿者のhex公開鍵 |\n| `ev.created_at` | Unix timestamp / Unixタイムスタンプ |\n| `ev.tags` | Event tags array / イベントタグ配列 |\n\n### Example Template / テンプレート例\n\n```eta\n# Nostr Notes - \u003c%= it.date %\u003e\n\n\u003e \u003c%= it.events.length %\u003e notes\n\n---\n\n\u003c% for (const ev of it.events) { %\u003e\n### \u003c%= ev.time %\u003e\n\n\u003c%= ev.content %\u003e\n\n\u003e [\u003c%= ev.nevent.slice(0, 24) %\u003e...](\u003c%= ev.link %\u003e)\n\n---\n\n\u003c% } %\u003e\n```\n\n## Use with Obsidian / Obsidianで使う\n\nSet `outputDir` to a folder inside your Obsidian vault. You can use template placeholders to match your Daily Notes folder structure:\n\n`outputDir` にObsidian vaultのフォルダを指定してください。テンプレート変数を使ってDaily Notesのフォルダ構造に合わせられます：\n\n```json\n{\n  \"outputDir\": \"/path/to/your/vault/Nostr/{{YYYY}}/{{MM}}\"\n}\n```\n\n**Available placeholders / 使用可能なプレースホルダー:**\n\n| Placeholder | Example | Description |\n|-------------|---------|-------------|\n| `{{YYYY}}` | `2026` | Year / 年 |\n| `{{MM}}` | `02` | Month (zero-padded) / 月（ゼロ埋め） |\n| `{{DD}}` | `04` | Day (zero-padded) / 日（ゼロ埋め） |\n| `{{date}}` | `2026-02-04` | Full date / 日付 |\n\n**Example structures / フォルダ構造の例:**\n\n```\n# Monthly folders / 月単位\n\"outputDir\": \"./vault/Nostr/{{YYYY}}/{{MM}}\"\n→ vault/Nostr/2026/02/2026-02-04.md\n\n# Year-Month folders / 年月フォルダ\n\"outputDir\": \"./vault/Nostr/{{YYYY}}-{{MM}}\"\n→ vault/Nostr/2026-02/2026-02-04.md\n\n# Flat / フラット\n\"outputDir\": \"./vault/Nostr\"\n→ vault/Nostr/2026-02-04.md\n```\n\nThe daily files will appear as notes in Obsidian. You can also use Obsidian's Daily Notes plugin alongside these files.\n\n日単位のファイルがObsidian上にノートとして表示されます。ObsidianのDaily Notesプラグインと組み合わせて使うこともできます。\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fikuradon%2Fnos2md","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fikuradon%2Fnos2md","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fikuradon%2Fnos2md/lists"}