Skip to main content

Add your description here

Project description

Leaflet-to-Zoommap Converter

This repository contains a Python CLI tool to parse Obsidian Vaults and convert Leaflet codeblocks to Zoommap (TTRPG Tools: Maps) format, supporting map scales, icons and shapes.

Overview

ZoomMap Converter is designed to facilitate the migration from the Obsidian Leaflet plugin to the ZoomMap plugin. It handles the conversion of map notes, markers, and configurations while maintaining compatibility with Obsidian vault structures.

Features

  • Note Conversion: Converts Leaflet-formatted codeblocks to ZoomMap format.
  • Icon Processing: Transforms custom SVG icons with color and size normalisation over to Zoommap.
  • Error Handling: Validation and logging for troubleshooting.
  • Path Management: Handles Obsidian vault file paths and structures.

Installation

Prerequisites

  • Python 3.12+
  • Obsidian vault with Leaflet plugin notes
  • Leaflet Plug-In installed and enabled.
  • Zoommap Plug-In installed and enabled.

Setup

  1. Download the CLI tool using pip.
pip install zoommap-converter
  1. Once installed, you can test the install was successful using:
zoommap-converter --version
  1. Configure the vault path in settings.yaml or via environment variables

Usage

Basic Conversion

python -m zoommap_converter --vault-path /path/to/obsidian/vault

Advanced Options

python -m zoommap_converter \
    --vault-path /path/to/vault \
    --output-dir ./converted \
    --verbose

Configuration

Create a .zoommap/config.json file in your vault for custom settings:

{
    "defaultIconKey": "pinRed",
    "defaultWidth": "100%",
    "defaultHeight": "480px",
    "icons": [
        {
            "key": "customIcon",
            "pathOrDataUrl": "data:image/svg+xml;...",
            "size": 24
        }
    ]
}

Development

Project Structure

├── src
│   └── zoommap_converter
│       ├── __init__.py
│       ├── __main__.py
│       ├── app.py
│       ├── cli.py          # Command-line interface
│       ├── logs.py
│       ├── bootstrap/      # Initialisation and setup
│       ├── conf/           # Settings Config
│       ├── converter/      # Core conversion logic
│       └── models/         # Data models and schemas
tests/

Developer Setup

  1. Clone the repository:

    git clone https://codeberg.org/paddyd/zoommap-converter.git
    cd zoommap-converter
    
  2. Install dependencies using uv:

    uv install
    
  3. Configure the vault path in settings.yaml or via environment variables

Running Tests

pytest tests

Building

python -m build

Contributing

Contributions are welcome. Please follow these guidelines:

  1. Fork the repository
  2. Create a feature branch
  3. Submit a pull request with clear documentation
  4. Include tests for new functionality

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

For issues or questions, please open a GitHub issue.

Acknowledgements

  • Obsidian community for plugin development
  • Font Awesome for icon assets
  • Pydantic for data validation

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zoommap_converter-0.1.0.tar.gz (21.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zoommap_converter-0.1.0-py3-none-any.whl (24.8 kB view details)

Uploaded Python 3

File details

Details for the file zoommap_converter-0.1.0.tar.gz.

File metadata

  • Download URL: zoommap_converter-0.1.0.tar.gz
  • Upload date:
  • Size: 21.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.25 {"installer":{"name":"uv","version":"0.9.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for zoommap_converter-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d6b7b17fb2c66e9a012dd20751bce41dcbb4f155e5262897adbabbd3adbd32a3
MD5 be1a4a94dec66003dff8842edabbfaf9
BLAKE2b-256 db68963ee7ce0ef5b840a040a95505851f3478a373247e616ddaa7bcdb514043

See more details on using hashes here.

File details

Details for the file zoommap_converter-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: zoommap_converter-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 24.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.25 {"installer":{"name":"uv","version":"0.9.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for zoommap_converter-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d18383ca28e9386614650f46227e1d660b47243b42eeef925f7630cfa7465e07
MD5 86c97430450ccfb0a5c87f5d8f6aa3cb
BLAKE2b-256 66435667e35efb8b9cc6ccbe991a4000c61eb650be7116659f9b953f19ce4dce

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page