Skip to content

ITeachYouAI/BookMarkBrief

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

39 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

BrainBrief

Automatically sync your Twitter bookmarks to Google NotebookLM for AI-powered analysis.

πŸš€ Quick Start

# Run sync (extracts new bookmarks and uploads to NotebookLM)
npm run sync

# Or use Electron app with GUI
npm start

✨ Features

  • βœ… YouTube auto-transcription ⭐ - Videos from tweets automatically transcribed in NotebookLM
  • βœ… Incremental sync - Only extracts NEW bookmarks (6 seconds!)
  • βœ… Twitter Lists support - Multi-select lists, 24-hour filter
  • βœ… Smart duplicate detection - Never uploads the same bookmark twice
  • βœ… Rich content extraction - Threads, quoted tweets, images, PDFs (URLs)
  • βœ… t.co link expansion - Follows Twitter shortened URLs to real destinations
  • βœ… Automatic NotebookLM upload - Hands-free integration
  • βœ… Separate notebooks per list - Organized by topic
  • βœ… Clean minimal UI - Focus on core actions
  • βœ… Daily auto-sync - Set it and forget it
  • βœ… Local database - All your bookmarks stored in SQLite

πŸ“‹ Requirements

  • Node.js 16+
  • Twitter/X account with bookmarks
  • Google account for NotebookLM

πŸ› οΈ Installation

# Install dependencies
npm install

# First run (extracts all bookmarks)
npm run sync

πŸ’‘ Usage

Command Line (Recommended)

npm run sync

What it does:

  1. Opens Twitter in automated browser
  2. Extracts NEW bookmarks (incremental)
  3. Saves to local database
  4. Uploads to NotebookLM automatically
  5. Done in ~30 seconds!

Electron App

npm start

Features:

  • System tray icon
  • "Sync Bookmarks" button
  • "Sync Lists" button
  • Enable daily auto-sync (8 AM)
  • System notifications

Twitter Lists

Step 1: Open Settings

npm start

Click "Settings" button in the app

Step 2: Discover Lists (One-time) In Settings page:

  • Click "Discover Lists"
  • Browser opens and finds all your Twitter Lists
  • Returns to Settings showing all lists with checkboxes

Step 3: Select Lists to Sync

  • βœ… Check the lists you want to sync
  • ❌ Uncheck lists you want to skip
  • Set "Days Back" (default: 1 day = last 24 hours)
  • Set "Max Tweets" (default: 50)
  • Click "Save Settings"

Step 4: Sync Go back to main page and click "Sync Lists"

Result: Each enabled list creates a separate NotebookLM notebook:

BrainBrief - AI Leaders #2 of 2 - 2025-10-18
BrainBrief - Gauntlet AI Cohort 1 - 2025-10-18
BrainBrief - Solana Influencers - 2025-10-18

Performance:

  • 1-day filter (24 hours): ~15-30 seconds per list ⚑ (default)
  • 3-day filter: ~45 seconds per list
  • 7-day filter: ~90 seconds per list
  • All time: 2-5 minutes per list (not recommended)

πŸ“Š What Gets Extracted

Basic Info

  • Tweet text
  • Author
  • URL
  • Timestamp

Embedded Content

Auto-Uploaded to NotebookLM:

  • βœ… YouTube Videos - Fully automated!
    • Finds videos in Twitter cards
    • Expands t.co shortened links
    • Uploads each video as separate source
    • NotebookLM auto-transcribes full video
    • Searchable video content

Extracted (in markdown, not auto-uploaded):

  • PDF Links - URLs saved for reference (manual add to NotebookLM)
  • Google Docs - URLs saved for reference (use Google Drive integration)
  • Images - Direct links to tweet media (excludes profile pics)
  • Twitter Videos - URLs extracted (file size limitations)
  • Quoted Tweets - Full original tweet context
  • Threads - Multi-tweet content preserved

πŸ“ File Structure

brainbrief/
β”œβ”€β”€ data/
β”‚   β”œβ”€β”€ brainbrief.db          # Your bookmarks database
β”‚   └── exports/               # Markdown exports to NotebookLM
β”œβ”€β”€ browser-data/              # Saved login sessions
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ automation/            # Twitter & NotebookLM automation
β”‚   β”œβ”€β”€ db/                    # Database operations
β”‚   └── utils/                 # Logger, helpers
└── run-sync.js                # CLI entry point

πŸ”’ Privacy

  • All data stored locally in SQLite
  • No cloud services (except Twitter & NotebookLM)
  • Browser sessions saved for convenience (can be deleted)
  • No analytics or tracking

πŸ› Troubleshooting

"Failed to create ProcessSingleton"

Problem: Browser lock file preventing sync

Quick Fix:

npm run fix

Manual Fix:

  1. Close the Electron app: pkill -f "electron.*brainbrief"
  2. Remove lock file: rm -f browser-data/SingletonLock
  3. Run sync: npm run sync

Prevention: Don't run Electron app and CLI sync at the same time

"Not logged in to Twitter"

Solution: Run sync once, log in manually in the browser window

"Notebook full (300 sources)"

Solution: App will create a new dated notebook automatically

πŸ“ Example Output

## Bookmark 42

**Author:** John Doe
**URL:** https://x.com/johndoe/status/123
**Date:** 2025-10-18T12:00:00.000Z

**Content:**
Check out my latest video on AI automation!

**YouTube Videos:**
- https://www.youtube.com/watch?v=abc123

**Images:**
- https://pbs.twimg.com/media/G3U849.jpg

**Quoted Tweet:**
> Author: Jane Smith
> This is the original tweet being quoted

🎯 NotebookLM Integration

Your bookmarks appear in a notebook named:

BrainBrief - Twitter Bookmarks - 2025-10-18

You can ask NotebookLM:

  • "Show me YouTube videos"
  • "Summarize the threads"
  • "What PDFs are included?"
  • "Find tweets about AI automation"

πŸ”§ Advanced

Custom Sync Schedule

Edit src/main/index.js:

cronExpression: '0 8 * * *'  // Change to your preferred time

Sync Limits

Edit src/automation/twitter.js:

const MAX_NEW_BOOKMARKS = 500;  // Max per sync
const BATCH_SIZE = 20;          // Tweets per batch

πŸ“š Documentation

🀝 Contributing

This is a personal automation tool, but feel free to fork and customize!

πŸ“„ License

MIT


Status: βœ… Production Ready
Version: 1.0.0
Last Updated: 2025-10-18

About

An app that automates the extraction of your bookmarked X Tweets and List Tweets and auto uploads it into NoteBookLM. Turn your NoteBooks into a second Brain

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors