Skip to content

andersbekkevard/note2flash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

reMarkable to Anki Parser

Extracts highlighted text from reMarkable PDF exports and converts them to Anki cloze deletion cards.

Quick Start

# Install dependencies
uv sync

# Run with interactive PDF picker
uv run parse.py

# Parse a specific PDF file
uv run parse.py testpage.pdf

# Parse all PDFs in the input/ folder
uv run parse.py all

How It Works

Color System

  • Yellow (#FFED75): Marks sections that become cards
  • Pink, Orange, Blue, Gray, Green: Mark text to be clozed (hidden)

Card Types

  1. Processed Cards: Yellow section + cloze colors

    • Text from yellow section with cloze-colored parts wrapped in {{c1::text}}
    • Multiple cloze colors get different numbers (c1, c2, c3...)
    • Consecutive words with the same color are grouped into one cloze deletion
  2. Unprocessed Cards: Yellow section only (no cloze colors)

    • Prefixed with "UNPROCESSED: "
    • Last word automatically clozed
  3. Orphan Highlights: Cloze colors without yellow underneath

    • Exported to output/unfinished/ folder
    • Warning printed to console

CLI Options

# Interactive mode - select from list (includes "Parse ALL" option)
uv run parse.py

# Parse specific file
uv run parse.py myfile.pdf

# Parse all PDFs in input/ folder (also accepts --all or -a)
uv run parse.py all

The interactive mode displays all PDF files in the input/ folder and includes a "Parse ALL PDFs" option at the end of the list.

Configuration

Edit parse.py to configure:

PDF_PATH = ""       # Leave empty for interactive picker
PAGE_OFFSET = 0     # Add to PDF page numbers (e.g., 35 for book pages)

File Structure

remarkable/
├── input/               # Place PDF files here
├── output/              # Generated cards go here
│   ├── cards_{pdfname}_{YYYYMMDD_HHMM}.txt
│   └── unfinished/      # Orphan highlights
│       └── cards_{pdfname}_{YYYYMMDD_HHMM}.txt
└── parse.py             # Main script

Output files include the source PDF name for easy identification.

Output Format

Anki-importable text files with headers:

#separator:tab
#html:true
#tags column:3
"Card front with {{c1::cloze}}"	Page X

Import into Anki:

  1. File → Import
  2. Select generated .txt file
  3. Choose "Cloze" note type
  4. Map fields: Front → Text, Back Extra → Page

Example

Highlighting in reMarkable:

  • Yellow highlight: "The Internet uses packet switching to send data"
  • Pink overlay on: "packet switching"
  • Orange overlay on: "data"

Generated card:

"The Internet uses {{c1::packet switching}} to send {{c2::data}}"	Page 36

Verification

Tested with:

  • Single-page PDFs with various color combinations
  • Multi-page PDFs (150+ pages)
  • Page offset configuration
  • Interactive and command-line modes

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors