项目作者: lucasepe

项目描述 :
Turn asterisk-indented text lines into mind maps
高级语言: Go
项目地址: git://github.com/lucasepe/crumbs.git
创建时间: 2020-09-08T15:06:01Z
项目社区:https://github.com/lucasepe/crumbs

开源协议:MIT License

下载


Crumbs

Turn asterisk-indented text lines into mind maps.

Organize your notes in a hierarchical tree structure, using a simple text editor.

  • an asterisk at the beginning of the line means level 1
  • two asterisk at the beginning of the line means level 2
  • and so on…

How crumbs works?

Example (without icons)

Create a simple text file - let’s say meeting-ideas.txt:

  1. * main idea
  2. ** topic 1
  3. *** sub topic
  4. *** sub topic
  5. **** sub topic
  6. **** sub topic
  7. ** topic 2
  8. *** sub topic

To create the PNG image you can

  • “inject” the text file to crumbs and then the result to dot redirecting the output to the file meeting-ideas.png - (I love the Linux command pipelines! 😍)
  1. cat meeting-ideas.txt | crumbs | dot -Tpng > meeting-ideas.png
  • or as alternative you can specify your text file to crumbs directly:
  1. crumbs meeting-ideas.txt | dot -Tpng > meeting-ideas.png

Here the output:


Example (with icons)

You can, eventually, add images too (one for text line) using a special syntax: [[path/to/image.png]]

  • if you specify the flag -image-path you can write [[image.png]] instead of [[path/to/image.png]]
  • if you specify the flag -image-type you can write [[path/to/image]] instead of [[path/to/image.png]]
  • therefore if you specify both you can write [[image]] instead of [[path/to/image.png]]
  1. * [[./png/bulb.png]] main idea
  2. ** topic 1
  3. *** sub topic
  4. *** sub topic
  5. **** [[./png/comments-alt.png]] sub topic
  6. **** sub topic
  7. ** [[./png/map-signs.png]] topic 2
  8. *** sub topic

then as usual, let’s feed graphviz with crumbs:

  1. crumbs meeting-ideas-with-icons.txt | dot -Tpng > meeting-ideas-with-icons.png

and the output is…

Example (with HTML)

You can enrich the output with a little bit of style, adding some HTML tag.

The following tags are understood:

  1. <b>, <br/>, <i>, <o>, <s>, <sub>, <sup>, <u>
  1. * main idea
  2. ** <u>topic 1</u>
  3. *** sub <sub>topic</sub>
  4. *** sub <i>topic</i>
  5. **** <s>sub topic</s>
  6. **** sub <o>topic</o>
  7. ** topic <b>2</b>
  8. *** sub <sup>topic</sup>

then as usual, let’s feed graphviz with crumbs:

  1. crumbs meeting-ideas-with-html.txt | dot -Tpng > meeting-ideas-with-html.png

and the output is…


Installation Steps

In order to use the crumbs command, compile it using the following command:

  1. go get -u github.com/lucasepe/crumbs/crumbs

This will create the crumbs executable under your $GOPATH/bin directory.

Ready-To-Use Releases

If you don’t want to compile the sourcecode yourself, Here you can find the tool already compiled for:

  • MacOS
  • Linux
  • Windows

CHANGE LOG

👉 Record of all notable changes made to a project