npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

xmind-m3

v0.2.1

Published

Lightweight markup language for mind mapping, with a toolset to make it easy to use.

Downloads

60

Readme

M3 - Lightweight markup language for mind mapping

M3 is a lightweight markup language for mind mapping inspired by markdown. It is designed to describe structures and elements of a mind map easily.

Just like everyone can use mind mapping software to organize ideas and improve efficiency, everyone can benefit from M3.

M3 files are written in plain text, which means that you can describe a mind map faster using any text editor at any time anywhere, like:

Seasons
- Spring
- Summer
- Autumn
- Winter

For more infomation about M3 syntax, please visit M3 language specification.

The recommended way to save an M3 file is to use .m3 as its extension name, though you can use any other names as you like. If you are developing an application that distributes or generates M3 files, you're encouraged to use application/vnd.xmind.m3 as the mime type, or org.xmind.openformat.m3 as the UTI.

From M3 to Mind Map

xmind-m3 is a toolset that helps you convert M3 files into various forms of mind maps easily.

For an M3 file with the following content,

Seasons
- Spring
- Summer
- Autumn
- Winter

you can easily convert it to a graphical mind map using xmind-m3:

seasons.svg

See also:

Use xmind-m3 as a CLI program

Install

Make sure Node.js and npm is available on your computer, and run the command below in your command line program:

npm install -g xmind-m3

Convert M3 file to XMind file

> m3 <your-m3-file>

A .xmind file will be generated in your working directory, which can then be opened and further edited using XMind.

You can also pass your M3 file through standard input:

> cat <your-m3-file> | m3

This command has the same effect as the previous one.

Convert M3 file to SVG file

> m3 -f svg <your-m3-file>
# or
> m3 --format svg <your-m3-file> 

You can use -f or --format flag to specify the target format of the output file. So far xmind-m3 supports these target formats:

  • xmind
  • svg

If no target format is specified, xmind-m3 will use xmind by default.

In the case above, a .svg file will be generated in your working directory.

Specify the output directory

> m3 -o ./out <your-m3-file>
# or
> m3 --outputDir ./out <your-m3-file>

You can use -o or --outputDir flag to specify the output directory where the generated file will be placed. Both relative and absolute path are supported.

Get more information

> m3 -h
# or
> m3 --help

Use xmind-m3 as a Javascript library

Install

> npm install xmind-m3 -S

Usage

import { parseM3ToXMindFile } from 'xmind-m3'

const m3FileContent = `
Central Topic
- Main Topic 1
- Main Topic 2
`

const xmindArrayBuffer = await parseM3ToXMindFile(m3FileContent)

Currently, xmind-m3 only supports converting string content to ArrayBuffer of .xmind file. You can then save it to the local disk or upload it to an online storage.

Roadmap

  • Default theme. Generate files with pretty color theme.
  • Syntax parser API. Improve and expose the parser API to allow developers to obtain more detailed syntax and semantic information.
  • Editor language support. Allow users to interact with M3 files easily and gracefully in text editors like Visual Studio Code.

Troubleshooting

Getting stuck during conversion process

Converting M3 files to .svg files relies on a graphical environment, so when xmind-m3 converts an M3 file to a .svg file for the every first time, it must complete the following preparations:

  1. Download a bundled version (specified here) of Chromium by puppeteer-core.
  2. Download the mind map rendering engine from XMind official website: https://assets.xmind.net.

These downloads will be cached in the local disk. The next time, xmind-m3 will just start converting if the cache is still valid.

If there is a problem during the preparation, please check whether your network is available. If the problem still exists, please create an issue.

"Output file exists"

If the file to be exported already exists, xmind-m3 will report a warning message and quit without doing anything else.

Other issues not mentioned here

You can try to find existing related issues, otherwise please create an issue and report to us.