CodeReader
CodeReader is a VS Code extension that renders EPUB ebooks as syntax-highlighted source code. Book content is wrapped in realistic-looking classes, methods, comments, and docstrings so your "code review" is actually the next chapter of your novel. Supports 18 programming languages (and counting) for rendering, remembers your reading position across sessions, and lets you save and manage highlighted passages.
Table of Contents
Features
InstallationFrom the VS Code Marketplace
From a
|
| Command | Title | Description |
|---|---|---|
codereader.openEpub |
CodeReader: Open EPUB | Opens a file picker to select an .epub file. |
codereader.switchLanguage |
CodeReader: Switch Language | Displays a quick-pick menu to change the rendering language. |
codereader.removeHighlight |
CodeReader: Remove Highlight | Removes the highlight at the current cursor position (also available in the editor context menu). |
Configuration
Settings are available under Settings → Extensions → CodeReader or in settings.json.
| Setting | Type | Default | Description |
|---|---|---|---|
codereader.language |
string |
"python" |
Programming language used to render EPUB content. See Supported Languages for valid values. |
codereader.wordWrap |
boolean |
true |
Automatically enable word wrap when opening a book. Does not affect other editors. |
Example settings.json:
{
"codereader.language": "rust",
"codereader.wordWrap": true
}
Supported Languages
| Label | Setting Value |
|---|---|
| Bash | shellscript |
| Batch | bat |
| C | c |
| C# | csharp |
| C++ | cpp |
| Clojure | clojure |
| Go | go |
| Java | java |
| JavaScript | javascript |
| Objective-C | objectivec |
| PHP | php |
| PowerShell | powershell |
| Python | python |
| Ruby | ruby |
| Rust | rust |
| Swift | swift |
| TypeScript | typescript |
| Visual Basic | vb |
Known Issues
- Basic HTML stripping - EPUB HTML is processed with regex-based tag removal. Heavily formatted EPUBs (tables, nested lists, custom fonts) may produce stray characters or awkward line breaks.
- No image support - Images embedded in EPUBs are silently ignored (they would rather break the disguise anyway).
- Chapter titles - Chapter titles are currently generated as
Chapter 1,Chapter 2, etc. Actual titles from the EPUB TOC are not yet extracted. - Large EPUBs - Very large books are rendered in one pass and held in memory. Opening them may be slow on low-spec machines.
0.0.1
- Initial release.
- EPUB parsing via
adm-zipandxml2js. - Code generation in 18 programming languages.
- Reading progress saved and restored per book.
- Text selection highlights saved and restored per book.
- Highlight hover tooltips with one-click removal.
- Right-click context menu for removing highlights.
- Status bar language indicator with quick-pick switcher.
- Word wrap automatically applied when opening a book.
- Auto-registers as default editor for
.epubfiles.
