https://github.com/gapmiss/hackernews-comments
Obsidian.md plugin to fetch and save Hacker News comments as markdown notes in your vault.
https://github.com/gapmiss/hackernews-comments
hacker-news obsidian obsidian-md obsidian-plugin
Last synced: 2 months ago
JSON representation
Obsidian.md plugin to fetch and save Hacker News comments as markdown notes in your vault.
- Host: GitHub
- URL: https://github.com/gapmiss/hackernews-comments
- Owner: gapmiss
- License: mit
- Created: 2025-05-20T01:50:10.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-10-05T21:09:30.000Z (9 months ago)
- Last Synced: 2025-10-05T23:23:52.606Z (9 months ago)
- Topics: hacker-news, obsidian, obsidian-md, obsidian-plugin
- Language: TypeScript
- Homepage:
- Size: 65.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Hacker News Comments
An Obsidian plugin that fetches and saves Hacker News comments as Markdown notes.
## Features
- Fetch comments from any Hacker News post
- Threaded comment formatting with proper indentation
- Metadata included: post title, original URL, comment count
- Customizable note filenames using template variables
- Optional enhanced links for usernames and timestamps
- Automatic HTML-to-Markdown conversion
## How to use
1. Click the Hacker News icon in the ribbon or use the "Fetch Hacker News Comments" command
2. Enter a valid Hacker News URL (e.g., https://news.ycombinator.com/item?id=12345678)
3. The plugin will fetch the comments and create a new note in your vault
## Settings
### Enhanced links
Convert usernames and timestamps to clickable links pointing to Hacker News profiles and specific comments.
### Timestamp format
Customize the date format for comment timestamps using moment.js formatting tokens. Default: `YYYY-MM-DD, hh:mm:ss`
### Open note automatically
Automatically open newly created notes in the editor.
### Wrap HTML tags in backticks
Wrap HTML tags in comment content with backticks to preserve code examples and prevent HTML rendering.
### Filename template
Customize note filenames using template variables. Default: `HN - {{title}} - {{date}}`
Available variables:
- `{{title}}` - Post title
- `{{post-id}}` - Post ID
- `{{date}}` - Current date (YYYY-MM-DD)
- `{{time}}` - Current time (HH-MM-SS)
- `{{datetime}}` - Date and time (YYYY-MM-DD-HH-MM-SS)
- `{{source}}` - Source hostname or "Hacker News"
## Example filename templates
- `HN - {{title}} - {{date}}`
- `Hacker News {{post-id}} - {{title}}`
- `{{date}} - {{source}} - {{title}}`
## Technical notes
The plugin uses the Hacker News API as the primary data source with HTML parsing as a fallback. All network requests use Obsidian's native API to bypass CORS restrictions.
Content is sanitized during HTML-to-Markdown conversion to prevent script injection and ensure safe rendering.