Skip to content

Chrome extension to export NotebookLM Quizzes & Flashcards to Anki - via AnkiConnect, .apkg, or CSV

Notifications You must be signed in to change notification settings

KNN-07/NotebookLM2Anki

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

31 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

NotebookLM2Anki

A Chrome extension that exports Quizzes and Flashcards from Google NotebookLM directly to Anki.

Features

  • πŸ“š Quiz Support: Export multiple-choice questions with hints, options, and rationales
  • πŸ—‚οΈ Flashcard Support: Export simple front/back flashcards
  • ⚑ AnkiConnect Integration: Send cards directly to Anki (requires Anki open)
  • πŸ“¦ APKG Export: Download as .apkg file (works offline, import anywhere)
  • πŸ“„ CSV Export: Export as CSV for manual import or other tools
  • πŸ”’ LaTeX/Math Support: Cards render mathematical notation via MathJax
  • 🎨 Beautiful Dark Theme: Matching NotebookLM's aesthetic
  • πŸ”˜ UI Button Injection: Export button appears directly in NotebookLM

Installation

From Source (Developer Mode)

  1. Clone or download this repository
  2. Open Chrome and go to chrome://extensions/
  3. Enable "Developer mode" (toggle in top right)
  4. Click "Load unpacked"
  5. Select the NotebookLM2Anki folder

From Chrome Web Store

Coming soon

Usage

Method 1: Popup Menu (Recommended)

  1. Navigate to a notebook in NotebookLM
  2. Generate a Quiz or Flashcards using NotebookLM's features
  3. Click the extension icon in Chrome toolbar
  4. Choose your export method:
    • Send to Anki: Requires Anki desktop open with AnkiConnect
    • Download .apkg: Creates a portable Anki package file
    • Export CSV: Creates CSV files for quizzes and/or flashcards

Method 2: Injected Button

  1. When viewing quiz/flashcard content in NotebookLM, an "Anki Export" button appears
  2. Click the button to send directly to Anki via AnkiConnect

Requirements

For AnkiConnect Export

For APKG/CSV Export

  • No additional requirements (works in browser)

Anki Note Types

The extension creates two note types in Anki:

NotebookLM Quiz

15 fields for multiple-choice questions:

  • Question, Hint, ArchDiagram (for images)
  • Option1-4, Flag1-4 (True/False), Rationale1-4

NotebookLM Flashcard

2 fields for simple flashcards:

  • Front, Back

Both include dark theme styling and MathJax support.

Export Formats

AnkiConnect

  • Creates deck under NotebookLM:: parent deck
  • Creates note types automatically if missing
  • Best for direct integration

APKG File

  • Portable Anki package
  • Import on any device (desktop, mobile, AnkiWeb)
  • No Anki instance required during export

CSV

  • Universal format
  • Can import into Anki, Quizlet, or other tools
  • Separate files for quizzes and flashcards

Project Structure

NotebookLM2Anki/
β”œβ”€β”€ manifest.json           # Chrome extension manifest
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ background/         # Service worker for AnkiConnect
β”‚   β”œβ”€β”€ content/            # Content scripts for UI injection
β”‚   β”œβ”€β”€ popup/              # Extension popup UI
β”‚   β”œβ”€β”€ lib/                # Shared utilities
β”‚   └── templates/          # Anki card templates
β”œβ”€β”€ vendor/                 # Third-party libraries
β”‚   β”œβ”€β”€ sql.js              # SQLite in browser
β”‚   β”œβ”€β”€ jszip.min.js        # ZIP creation
β”‚   β”œβ”€β”€ FileSaver.min.js    # File downloads
β”‚   └── genanki.js          # Anki deck generation
└── icons/                  # Extension icons

Development

Building

No build step required. Load the extension directly in developer mode.

Testing

  1. Load extension in Chrome
  2. Navigate to NotebookLM
  3. Create quizzes/flashcards
  4. Test each export method

Credits

This project integrates functionality from:

Libraries Used

License

MIT License

Contributing

Contributions welcome! Please open an issue or pull request.

Troubleshooting

"Anki Not Found"

  • Make sure Anki Desktop is open
  • Verify AnkiConnect is installed: Tools β†’ Add-ons β†’ Check for "AnkiConnect"
  • AnkiConnect uses port 8765 by default

"0 Cards Added"

  • The note type might have field mismatches
  • Try deleting and recreating the note type in Anki
  • Or use APKG export which creates fresh note types

No content found

  • Make sure you've generated a Quiz or Flashcards in NotebookLM first
  • Refresh the page and try again
  • Some notebooks may have different data structures

Math not rendering

  • Make sure MathJax is configured in Anki
  • Cards use \(...\) for inline math and \[...\] for display math

About

Chrome extension to export NotebookLM Quizzes & Flashcards to Anki - via AnkiConnect, .apkg, or CSV

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •