Tools to help developers create IReader sources by finding CSS selectors on novel websites.
A simple, noob-friendly tool to find CSS selectors by drag-selecting areas on any webpage.
create_source_interactive.py- Generate Kotlin source code using Gemini AIlauncher.py- Interactive launcher for the workflowvalidate_config.py- Validate exported configurations
- Open Chrome →
chrome://extensions/ - Enable "Developer mode" (top right toggle)
- Click "Load unpacked"
- Select the
scripts/devtools/extensionfolder - The IReader icon appears in your toolbar
- Go to any novel website
- Click the IReader extension icon in your toolbar
- Drag to select an area containing elements you want selectors for
- Or just click on a specific element
- Browse the results panel:
- ✓ Green = unique selector (best!)
- ~ Yellow = few matches
- • Gray = many matches
- Use the tools:
- 👁 Preview - see what content the selector extracts
- 🎯 Highlight - highlight matching elements on page
- 📋 Copy - copy selector to clipboard
- Filter results:
- Use the search box
- Click field hints (Title, Author, Cover, etc.)
- Export all selectors as JSON if needed
# Set your Gemini API key
set GEMINI_API_KEY=your-key-here
# Run the generator
python scripts/devtools/create_source_interactive.py your_config.jsonUse the IReader Selector Helper Chrome extension to easily find CSS selectors on any website:
- Install the extension from
scripts/devtools/extension/ - Click the extension icon on any novel website
- Drag to select an area → get all CSS selectors
- Copy the ones you need for your source
📖 Quick Start Guide (5 minutes)
📚 Full Documentation
- Drag to select - Select an area to analyze all elements within
- Click to select - Click on a single element to analyze it and its children
- ESC to cancel - Press Escape anytime to exit
- Quick Copy - Top recommended selectors with one-click copy
- Search - Filter selectors by name or content
- Field Hints - Quick filters for Title, Author, Cover, Chapter, etc.
- Preview - See what text/content each selector extracts
- Highlight - Visually highlight matching elements on the page
- Select Again - Make another selection without closing
- Export - Download all selectors as JSON
The extension scores selectors based on:
- Uniqueness (single match = best)
- Selector type (ID > class > tag)
- Semantic naming (contains "title", "author", etc.)
- Selector length (shorter = better)
Explore/List Page:
- Novel card container
- Title within card
- Cover image
- Link to novel page
Detail Page:
- Novel title
- Author
- Description
- Cover image
- Status
- Genres
Chapter List:
- Chapter item container
- Chapter name
- Chapter link
Content Page:
- Chapter content container
- Look for green checkmarks - These are unique selectors
- Use field hints - Click "Title", "Author", etc. to filter
- Preview before copying - Make sure it extracts the right content
- Test on multiple pages - Verify selectors work across the site
- Prefer class selectors - They're usually more stable than tag selectors
scripts/devtools/
├── extension/
│ ├── manifest.json # Extension config
│ ├── background.js # Service worker
│ ├── selector.js # Main selector logic
│ ├── selector.css # Styles
│ ├── README.md # Extension docs
│ └── images/ # Icons
├── create_source_interactive.py
├── launcher.py
├── validate_config.py
├── start.bat
└── README.md # This file
Extension doesn't activate?
- Make sure you're on a regular webpage (not chrome:// pages)
- Try refreshing the page
No selectors found?
- Make your selection area larger
- Try clicking directly on an element instead of dragging
Selector doesn't work in your source?
- Some sites load content dynamically
- Try a more general selector
- Check if the site uses JavaScript rendering
- v4.0 - Complete redesign with drag-to-select flow
- v3.0 - Previous popup-based UI with AI features