Skip to main content

anywidget to make interactive mindmaps from markdown using markmap in interactive computing environments

Project description

markmap-anywidget

A simple anywidget implementation of markmap for Jupyter and marimo notebooks.

Installation

# Using pip
pip install markmap-anywidget

# Using uv
uv add markmap-anywidget

Usage with marimo

See the marimo documentation for more information on using anywidget.

import marimo as mo
from markmap_anywidget import MarkmapWidget

widget = mo.ui.anywidget(
    MarkmapWidget(
        markdown_content="""---
markmap:
  colorFreezeLevel: 2
  maxWidth: 300
---

# markmap

## Links
- [Website](https://markmap.js.org/)
- [GitHub](https://github.com/gera2ld/markmap)

## Features
- `inline code`
- **strong** and *italic*
- Katex: $x = {-b \pm \sqrt{b^2-4ac} \over 2a}$
"""
    )
)

# In a marimo cell, displaying the widget is enough
widget

Development

This project uses Nix with nix-direnv for a reproducible development environment.

# Clone the repository
git clone git@github.com:daniel-fahey/markmap-anywidget.git
cd markmap-anywidget

# Enter Nix development environment
direnv allow

# Install dependencies
uv sync

Building

Complete build (recommended):

# Using make (includes clean, build, and quality checks)
make all

Build only (faster for development):

# Using make
make build
# or:
cd js && pnpm install && pnpm build
cd .. && uv build

Development mode (watch for changes):

# Using make
make dev

# Manual equivalent
cd js && pnpm dev

Quality Checks

Run all quality checks:

# Using make (includes lint, type-check, and test)
make check

Individual checks:

# Linting
make lint
# or:
uv run ruff check src/ examples/ tests/

# Type checking
make type-check
# or:
uv run mypy src/

# Testing
make test
# or:
uv run pytest

Available Commands

Show all available Makefile targets:

make
# or:
make help

Examples

Run the marimo example:

uv run python -m marimo edit --watch examples/marimo.py

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

markmap_anywidget-0.1.4.tar.gz (869.0 kB view details)

Uploaded Source

Built Distribution

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

markmap_anywidget-0.1.4-py3-none-any.whl (870.8 kB view details)

Uploaded Python 3

File details

Details for the file markmap_anywidget-0.1.4.tar.gz.

File metadata

  • Download URL: markmap_anywidget-0.1.4.tar.gz
  • Upload date:
  • Size: 869.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for markmap_anywidget-0.1.4.tar.gz
Algorithm Hash digest
SHA256 b78b5d2622c7fa25a98aa7d71d7b3ad95e52b249066336a246ec4ab2b9e4f9bf
MD5 d6da67d7efc6e37f24e8b1fbc0c564a8
BLAKE2b-256 65f3a6a6cd5da2e037efbbcd122b18248afda43b16d5dcf258ca558470dd4a6b

See more details on using hashes here.

Provenance

The following attestation bundles were made for markmap_anywidget-0.1.4.tar.gz:

Publisher: workflow.yml on daniel-fahey/markmap-anywidget

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file markmap_anywidget-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for markmap_anywidget-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 71aa850f7f4ff906990413a75bc0a8915a228accf4cfb5d6d3c8732bb4c99979
MD5 38e0d432566a1172ad8e91e8d616825f
BLAKE2b-256 2e572e2f48ab851316c9c39804085c3769716e48b0b4f21dfff1fb59a824624a

See more details on using hashes here.

Provenance

The following attestation bundles were made for markmap_anywidget-0.1.4-py3-none-any.whl:

Publisher: workflow.yml on daniel-fahey/markmap-anywidget

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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