Skip to main content

Interactive mindmaps from markdown using markmap

Project description

markmap-anywidget

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

Installation

PyPI:

pip install markmap-anywidget

Nix:

# your flake.nix
{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
    markmap-anywidget.url = "github:daniel-fahey/markmap-anywidget";
  };

  outputs = { nixpkgs, markmap-anywidget, ... }:
    let
      system = "x86_64-linux";
      pkgs = nixpkgs.legacyPackages.${system};
    in {
      devShells.${system}.default = pkgs.mkShell {
        packages = [
          (pkgs.python3.withPackages (ps: [
            markmap-anywidget.packages.${system}.default
          ]))
        ];
      };
    };
}

Usage

See the marimo documentation for more information.

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}$
"""
    )
)

widget

Development

git clone git@github.com:daniel-fahey/markmap-anywidget.git
cd markmap-anywidget

nix develop -c bun run build                  # rebuild static assets
nix develop -c marimo run examples/marimo.py  # test widget

Tests run automatically in the Nix build.

Releasing

# Update version
echo "0.3.0" > VERSION
nix develop -c bun run build

# Commit and tag
git add -A && git commit -m "v0.3.0"
git tag v0.3.0 && git push --tags

# Create release on GitHub (publishes to PyPI automatically)

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.2.0.tar.gz (849.8 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.2.0-py3-none-any.whl (860.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: markmap_anywidget-0.2.0.tar.gz
  • Upload date:
  • Size: 849.8 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.2.0.tar.gz
Algorithm Hash digest
SHA256 162cdfbf0dd9a06a1fcf9252c429322a54b5fae11ae8de23b9439a7e74cd46de
MD5 4f529ad49e4ed9297bcc4104edc6fe07
BLAKE2b-256 35aa2e534ce80bedfae77be82900e15c7657c0a8b592a526c1226cd50a5fa2e6

See more details on using hashes here.

Provenance

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

Publisher: release.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.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for markmap_anywidget-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4cf5fbed9d384cdb5c8a07c79e34b401fd4a4dc2370020141734d224e5521c84
MD5 45a22d4e9a1757166b718b691309b3b9
BLAKE2b-256 c8ea4adf47bec9c492eb6e4b40e31acfd1d93b89102c19219ef2d77f7cbea5fd

See more details on using hashes here.

Provenance

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

Publisher: release.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