A comprehensive offline application for creating and managing book indexes with both command-line and web interfaces. Built for GIAC/SANS certification exam preparation and anyone working with open-book exams.
- Offline Operation: Works completely offline using SQLite database
- Dual Interface: Command-line tool and modern web interface
- Smart Reference Handling: Automatically manages duplicates and groups references by term
- Multiple Export Formats: LaTeX, PDF, Plain Text, and Markdown
- Letter-Grouped Display: Organizes entries alphabetically with letter headings
- Search Functionality: Quick search through index terms and notes
- Simple Reference Format: Uses
b:pfor single pages andb:p-pfor page ranges
- Study Mode: Flashcard-based review with terms on front, notes/references on back
- Keyboard Navigation: Space to flip, N/P for next/previous cards
- Notes Support: Add study notes to any term, displayed in View References
- Multiple Books: Track page counts and custom metadata per book
- Custom Metadata: Add author, publisher, edition, or any custom properties
- Drag-to-Reorder: Organize metadata with intuitive drag and drop
- Multiple Indexes: Create, switch between, backup, and archive separate indexes
- Collapsible Sections: Accordion-style organization in Tools and Settings
- Customizable Appearance: Choose from multiple accent colors
- Visual Progress Charts: ApexCharts-powered dashboards showing indexing progress
- Overall progress donut chart
- Term density by book (terms per 100 pages)
- Book completion comparison (stacked bar)
- Gap distribution treemap
- Summary Statistics: Total books, pages, indexed pages, and completion percentage
- Gap Analysis: Identify unindexed pages with click-to-add functionality
- Page Exclusions: Mark front matter, blank pages, or irrelevant sections
- AI Note Generation: Automatically generate study notes using Claude or ChatGPT
- API Key Management: Secure storage of your AI provider credentials
- Python 3.7 or higher
- pip (Python package installer)
-
Install dependencies:
pip install -r requirements.txt
-
That's it! The SQLite database will be created automatically on first use.
The web interface provides a user-friendly way to manage your index:
-
Start the web server:
python web_app.py
-
Open your browser to:
http://localhost:5000 -
Keyboard Shortcuts:
Key Action 1-6Navigate to tabs (Add Entry, View References, Progress, Books, Tools, Settings) /Focus search or term input EscClose modals or menu -
Study Mode Shortcuts:
Key Action SpaceFlip flashcard NNext flashcard PPrevious flashcard EscEnd study session
The CLI tool provides quick access to all indexing functions:
# Add a single page reference
python index_cli.py add "machine learning" 1:42
# Add a page range reference
python index_cli.py add "neural networks" 2:15-18python index_cli.py listOutput example:
A
----------------------------------------
artificial intelligence: 1:10, 1:25-28, 2:5
B
----------------------------------------
backpropagation: 2:45-47
Bayesian inference: 3:12, 3:20
Total: 3 entries
python index_cli.py search "learning"# Delete a specific reference
python index_cli.py delete "old term" 1:10
# Delete all references for a term
python index_cli.py delete "old term"# Export to LaTeX format (default)
python index_cli.py export -f latex -o index.tex
# Export to PDF
python index_cli.py export -f pdf -o index.pdf
# Export to plain text
python index_cli.py export -f plain -o index.txt
# Export to Markdown
python index_cli.py export -f markdown -o index.md# All commands support the -d flag to specify a database file
python index_cli.py -d myproject.db add "term" 1:5
python index_cli.py -d myproject.db list# Get general help
python index_cli.py -h
# Get help for a specific command
python index_cli.py add -hThe application uses a simple format for book and page references:
- Single page:
b:p(e.g.,1:42= book 1, page 42) - Page range:
b:p-p(e.g.,2:15-18= book 2, pages 15-18)
Where:
b= book number (integer)p= page number (integer)
Produces output styled for LaTeX documents with proper escaping of special characters.
Direct PDF generation with professional formatting, ready to print.
Clean, readable plain text with letter headings and timestamps.
GitHub-flavored Markdown for documentation or web publishing.
The application uses SQLite with the following main tables:
id: Primary keyterm: Index term (unique, case-insensitive)note: Study notes for the termcreated_at: Timestamp
id: Primary keyterm_id: Foreign key to termsbook_number: Book numberpage_start: Starting pagepage_end: Ending page (NULL for single pages)created_at: Timestamp
book_number: Primary keybook_name: Name/title of the bookpage_count: Total pages (for gap analysis)created_at: Timestamp
PageSage/
├── database.py # Database operations
├── formatter.py # Export formatting
├── index_cli.py # Command-line interface
├── web_app.py # Flask web application
├── requirements.txt # Python dependencies
├── README.md # This file
├── QUICKSTART.md # Quick reference guide
├── MARKETING.md # Feature overview
├── templates/
│ └── index.html # Web interface template
├── static/
│ ├── style.css # Styling
│ ├── script.js # JavaScript functionality
│ ├── logo-icon.jpg # Application logo
│ └── favicon.ico # Browser favicon
├── demo/
│ └── demo_index.db # Demo database
└── databases/ # User databases (git-ignored)
-
Set Page Counts: Add page counts to books to enable progress tracking and gap analysis.
-
Use Notes: Add study notes to terms for flashcard-based review in Study Mode.
-
Track Progress: Check the View Progress tab regularly to identify under-indexed books.
-
Regular Backups: Use Settings → Index Management → Backup to save your work.
-
Multiple Databases: Use separate database files for different courses or exams.
-
Keyboard Shortcuts: Use number keys 1-6 to quickly switch between tabs.
- Make sure you're using the correct format:
b:porb:p-p - Use only numbers for book and page values
- Don't include spaces
- Check that Flask is installed:
pip install -r requirements.txt - Make sure port 5000 is not already in use
- Try a different port: edit
web_app.pyand change the port number
- Close the web interface before using the CLI on the same database
- Or use a different database file with the
-dflag
- Ensure page counts are set for books in the Books tab
- Check browser console for JavaScript errors
This project uses the following open-source libraries:
- Flask - MIT License
- ApexCharts - ApexCharts Community License (free for individuals, non-profits, educators, and organizations with < $2M annual revenue). See ApexCharts License.
This project is released under the Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0).
You are free to:
- Share — copy and redistribute the material in any medium or format
- Adapt — remix, transform, and build upon the material
Under the following terms:
- Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made.
- NonCommercial — You may not use the material for commercial purposes.
See the LICENSE file for the full license text, or visit CC BY-NC 4.0.
Note: ApexCharts (used for progress visualization) has its own license terms. See ApexCharts License for details.
Suggestions and improvements welcome! This is a standalone offline tool designed for exam preparation and study.
SANS/GIAC students, certification candidates, and anyone facing open-book exams with massive reference materials.