Skip to content
| Marketplace
Sign in
Visual Studio Code>Visualization>TOME Metadata ManagerNew to Visual Studio Code? Get it now.
TOME Metadata Manager

TOME Metadata Manager

Keegan Bruer

|
1 install
| (0) | Free
Preview and edit metadata of TOME archive files
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

TOME Metadata Manager VSCode Extension

A VSCode extension for previewing and editing metadata of TOME archive files.

Features

📋 Preview Mode

  • Beautiful UI display of TOME metadata
  • Cover image thumbnail
  • Title, authors, and description
  • Type-specific fields (ISBN for books, narrators for audiobooks, volume info for comics)
  • File information and archive contents listing

✏️ Editor Mode

  • Direct JSON editing of tome.json
  • Real-time validation against TOME specification
  • Support for all TOME types (book, audio_book, comic_series, comic_volume, comic_chapter)
  • Type-specific field requirement enforcement
  • Save changes back to the TOME archive

🎯 Integration

  • Default preview on file open - Double-click a .tome file to open it in preview mode
  • Right-click context menu for .tome files
  • Command palette integration
  • Keyboard shortcuts support
  • Seamless file handling

Installation

From VS Code Marketplace (Coming Soon)

When published, install directly from VS Code:

  1. Open VS Code
  2. Go to Extensions (Ctrl+Shift+X)
  3. Search for "TOME Metadata Manager"
  4. Click Install
  5. Double-click any .tome file to use the extension

Development Installation

For development or testing:

  1. Open the vscode-extension folder in VS Code
  2. Install dependencies:
    npm install
    
  3. Compile the extension:
    npm run compile
    
  4. Run the extension in debug mode:
    • Press F5 to start debugging
    • A new VS Code window will open with the extension active

Development

Project Structure

src/
├── extension.ts              # Main extension entry point
├── webviewPanel.ts           # Webview panel management
├── utils/
│   └── tomeParser.ts         # TOME file parsing and validation
└── commands/
    ├── openPreview.ts        # Preview command handler
    └── editMetadata.ts       # Edit metadata command handler

Building

  • Compile: npm run compile
  • Watch mode: npm run watch
  • Lint: npm run lint

Testing the Extension

  1. Double-click a TOME file (.tome) in VS Code to open it in preview mode (default)
  2. Right-click and select "TOME: Open Preview" to view metadata
  3. Right-click and select "TOME: Edit Metadata" to edit the JSON
  4. Use the Preview or Edit Metadata buttons to switch between modes

TOME File Format

TOME files are ZIP archives with the following structure:

archive.tome
├── tome.json          # Metadata (required)
├── cover.jpg          # Cover image (optional)
├── content.html       # Main content file (type-dependent)
└── ...other files

Supported TOME Types

Type Required Fields Common Fields
book type, title, content authors, cover_image, published_date, isbn, description
audio_book type, title authors, narrators, duration, cover_image, description
comic_series type, volumes_file title, authors, cover_image, description
comic_volume type, chapters_file title, comic_series, volume_number, cover_image
comic_chapter type, title, chapter_number comic_title, volume_number, cover_image

Example tome.json

{
  "type": "book",
  "title": "The Great Adventure",
  "authors": ["Jane Smith"],
  "content": "book.html",
  "cover_image": "cover.jpg",
  "published_date": "2024-01-15",
  "language": "en",
  "isbn": "978-0-123456-78-9",
  "description": "An epic tale of adventure and discovery.",
  "tags": ["fantasy", "adventure"]
}

Commands

From Command Palette

  • TOME: Open Preview - Open metadata preview for the current TOME file
  • TOME: Edit Metadata - Open JSON editor for the current TOME file

From Context Menu

Right-click on any .tome file to see:

  • Preview
  • Edit Metadata

Publishing

To publish this extension to the VS Code Marketplace:

Quick summary:

# One-time setup
npm install -g vsce
# Create publisher account at https://marketplace.visualstudio.com/manage
# Generate Personal Access Token at https://dev.azure.com/

# For each release
npm run compile
vsce package
vsce publish --pat YOUR_TOKEN

Features in Progress

Phase 2 (Planned)

  • Visual form-based metadata editor
  • Type selector with dynamic fields
  • Image picker for cover art
  • Date picker for publication dates
  • Narrators/authors multi-field editor

Phase 3 (Planned)

  • Advanced validation with detailed suggestions
  • Schema-based validation
  • File existence verification
  • Performance optimizations for large TOME files

Architecture

Extension Flow

Extension Activation
    ↓
Register Commands
    ↓
User Right-clicks .tome file
    ↓
Command Executed
    ↓
TomeParser reads archive
    ↓
WebviewPanel created
    ↓
HTML UI rendered (Preview or Editor)
    ↓
User interaction → Validation → Save/Close

Key Components

  1. TomeParser (utils/tomeParser.ts)

    • Parses ZIP archives
    • Extracts and validates metadata
    • Handles file updates
    • Validates against TOME spec
  2. WebviewPanelManager (webviewPanel.ts)

    • Creates and manages webview panels
    • Handles resource URIs
    • Tracks panel lifecycle
  3. Command Handlers (commands/)

    • openPreview.ts - Displays metadata in a formatted UI
    • editMetadata.ts - Provides JSON editor with validation

Dependencies

  • adm-zip - ZIP file reading/writing
  • ajv - JSON schema validation (ready for future use)
  • vscode - VS Code API
  • typescript - Type safety

License

MIT

Contributing

Contributions are welcome! Please follow the existing code style and structure.

Roadmap

  • [ ] Visual form-based metadata editor
  • [ ] Schema validation with detailed error messages
  • [ ] File reference validation
  • [ ] Support for nested metadata structures
  • [ ] Batch editing for multiple TOME files
  • [ ] Integration with TOME Studio for advanced editing
  • [ ] Template support for quick metadata creation

Support

For issues, questions, or feature requests, please create an issue in the repository.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft