From 155d9a608bcd820b6f7d1b7997933ce721163c41 Mon Sep 17 00:00:00 2001 From: polv Date: Tue, 3 Feb 2026 13:24:27 +0700 Subject: [PATCH 1/3] add README --- README.md | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 00000000..b9553c0e --- /dev/null +++ b/README.md @@ -0,0 +1,95 @@ +# yt2press + +A tool to convert YouTube videos into press-ready markdown documents with timestamped screenshots. + +## How to Use + +### Step 1: Prepare Your Video + +Download or place a video file in the `/docs/public` directory. + +### Step 2: Create a Markdown File + +Create a markdown file in `/docs` directory. The filename should match the video filename with `[xxx]` removed. + +For example: +- Video file: `my-video[abc123].mp4` → Markdown file: `my-video.md` +- Video file: `presentation.mp4` → Markdown file: `presentation.md` + +The markdown file content can be: + +**Option A: YAML Frontmatter (for auto-generating timestamps)** +```yaml +--- +interval: 5 +dedup: true +--- + +Your content here... +``` + +- `interval`: (Optional) Interval in seconds to auto-generate timestamps +- `dedup`: (Optional) Set to `true` to remove similar screenshots (defaults to 0.005), or specify a custom threshold value + +**Option B: Manual Timestamps** +```markdown +--- +--- + +Content with timestamps... + +1:30 + +2:45 + +5:00 +``` + +Timestamps should be in `M:SS` or `MM:SS` format on their own line. They will be converted to timestamped screenshot references. + +### Step 3: Start the Development Server + +Run the following command in the project directory: + +```bash +pnpm run dev +``` + +This starts the VitePress development server and WebSocket server for communication. + +### Step 4: Use the Downloader Interface + +1. Open the VitePress website in your browser +2. Find the downloader component +3. Enter your video filename in the textbox +4. Press Enter or Submit + +The app will: +- Load the video +- Extract screenshots at specified timestamps +- Replace timestamp lines with embedded screenshot images +- Save the updated markdown file + +## Project Structure + +``` +docs/ # VitePress documentation root + .vitepress/ + theme/ + components/ + Downloader.vue # Vue component for the downloader interface + public/ # Video storage directory + *.md # Markdown files with content + [video-folder]/ # Screenshot folders (auto-generated) + *.png # Timestamped screenshots +server.js # WebSocket server for handling downloads +group-similar.js # Script for deduplicating similar screenshots +``` + +## Dependencies + +- Node.js and pnpm +- VitePress for static site generation +- WebSocket for real-time communication between browser and server +- gray-matter for parsing YAML frontmatter +- Sharp for image processing (screenshot manipulation) From aa46af52bd77e2e1d7df0c63827175e1d2477484 Mon Sep 17 00:00:00 2001 From: polv Date: Tue, 3 Feb 2026 13:30:12 +0700 Subject: [PATCH 2/3] display downloader options --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b9553c0e..c76664eb 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,14 @@ A tool to convert YouTube videos into press-ready markdown documents with timest ### Step 1: Prepare Your Video -Download or place a video file in the `/docs/public` directory. +Download or place a video file in the `/docs/public` directory. Several options are available for downloading YouTube videos: + +#### YouTube Downloader Options + +- **[yt-dlp](https://github.com/yt-dlp/yt-dlp)** - Command-line tool with extensive format/quality options +- **[Media Downloader](https://github.com/mhogomchungu/media-downloader)** - Desktop application with modern UI + +Choose any method to download your video and save it to `/docs/public` directory. ### Step 2: Create a Markdown File From e55f2dcc8a2db4aef336f4a2ee90720a0ddbfb86 Mon Sep 17 00:00:00 2001 From: polv Date: Tue, 3 Feb 2026 13:31:59 +0700 Subject: [PATCH 3/3] README interval required --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c76664eb..37a4be22 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ dedup: true Your content here... ``` -- `interval`: (Optional) Interval in seconds to auto-generate timestamps +- `interval`: Interval in seconds to auto-generate timestamps - `dedup`: (Optional) Set to `true` to remove similar screenshots (defaults to 0.005), or specify a custom threshold value **Option B: Manual Timestamps**