-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 8abe14c
Showing
30 changed files
with
1,292 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
## Intellij | ||
.idea/**/workspace.xml | ||
.idea/**/tasks.xml | ||
.idea/**/encodings.xml | ||
.idea/**/compiler.xml | ||
.idea/**/misc.xml | ||
.idea/**/modules.xml | ||
.idea/**/vcs.xml | ||
|
||
## VSCode | ||
.vscode/ | ||
|
||
## File-based project format: | ||
*.iws | ||
*.iml | ||
.idea/ | ||
|
||
# Binaries for programs and plugins | ||
*.exe | ||
*.exe~ | ||
*.dll | ||
*.so | ||
*.dylib | ||
*.dat | ||
*.DS_Store | ||
go.sum | ||
|
||
# Test binary, built with `go test -c` | ||
*.test | ||
|
||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out | ||
|
||
# Goreleaser builds | ||
**/dist/** | ||
|
||
# This is my wip ideas folder | ||
experiments/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Changelog | ||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## [0.1.0] - 2020-09-08 | ||
- 🎉 First release! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2020 Luca Sepe | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,154 @@ | ||
# 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](https://github.com/lucasepe/crumbs/releases/latest) works? | ||
|
||
- takes in input a text file and generates a [dot script](https://en.wikipedia.org/wiki/DOT_(graph_description_language)) for [Graphviz](https://graphviz.gitlab.io/download/). | ||
|
||
- depends on [GraphViz](https://graphviz.gitlab.io/download/) | ||
- look at the bottom for info about [how to install graphviz](#how-to-install-graphViz). | ||
|
||
|
||
## Example (without icons) | ||
|
||
Create a simple text file - let's say `meeting-ideas.txt`: | ||
|
||
```text | ||
* main idea | ||
** topic 1 | ||
*** sub topic | ||
*** sub topic | ||
**** sub topic | ||
**** sub topic | ||
** topic 2 | ||
*** sub topic | ||
``` | ||
|
||
To create the PNG image you can | ||
|
||
- _"inject"_ the text file to [crumbs](https://github.com/lucasepe/crumbs/releases/latest) and then the result to [dot](https://graphviz.org/doc/info/command.html) redirecting the output to the file `meeting-ideas.png` - (I love the Linux command pipelines! 😍) | ||
|
||
```bash | ||
cat meeting-ideas.txt | crumbs | dot -Tpng > meeting-ideas.png | ||
``` | ||
|
||
- or as alternative you can specify your text file to [crumbs](https://github.com/lucasepe/crumbs/releases/latest) directly: | ||
|
||
```bash | ||
crumbs meeting-ideas.txt | dot -Tpng > meeting-ideas.png | ||
``` | ||
|
||
Here the output: | ||
|
||
![](./testdata/sample4.png) | ||
|
||
--- | ||
|
||
## Example (with icons) | ||
|
||
You can, eventually, add images too (one for text line) using a special syntax: `[[path/to/image.png]]` | ||
|
||
```text | ||
* [[./png/bulb.png]] main idea | ||
** topic 1 | ||
*** sub topic | ||
*** sub topic | ||
**** [[./png/comments-alt.png]] sub topic | ||
**** sub topic | ||
** [[./png/map-signs.png]] topic 2 | ||
*** sub topic | ||
``` | ||
|
||
then as usual, let's feed graphviz with [crumbs](https://github.com/lucasepe/crumbs/releases/latest): | ||
|
||
```bash | ||
crumbs meeting-ideas-with-icons.txt | dot -Tpng > meeting-ideas-with-icons.png | ||
``` | ||
|
||
and the output is... | ||
|
||
![](./testdata/sample5.png) | ||
|
||
## Example (with HTML) | ||
|
||
You can enrich the output with a little bit of style, adding some HTML tag. | ||
|
||
The following tags are understood: | ||
|
||
```html | ||
<b>, <br/>, <i>, <o>, <s>, <sub>, <sup>, <u> | ||
``` | ||
|
||
```text | ||
* main idea | ||
** <u>topic 1</u> | ||
*** sub <sub>topic</sub> | ||
*** sub <i>topic</i> | ||
**** <s>sub topic</s> | ||
**** sub <o>topic</o> | ||
** topic <b>2</b> | ||
*** sub <sup>topic</sup> | ||
``` | ||
|
||
then as usual, let's feed graphviz with [crumbs](https://github.com/lucasepe/crumbs/releases/latest): | ||
|
||
```bash | ||
crumbs meeting-ideas-with-html.txt | dot -Tpng > meeting-ideas-with-html.png | ||
``` | ||
|
||
and the output is... | ||
|
||
![](./testdata/sample6.png) | ||
|
||
--- | ||
|
||
# Installation Steps | ||
|
||
To build the binaries by yourself, assuming that you have Go installed, you need [GoReleaser](https://goreleaser.com/intro/). | ||
|
||
Here the steps: | ||
|
||
### Grab the source code | ||
|
||
```bash | ||
git clone https://github.com/lucasepe/crumbs.git | ||
``` | ||
|
||
### Change dir to the tool folder | ||
|
||
```bash | ||
cd crumbs/cli | ||
``` | ||
|
||
### Run GoReleaser | ||
|
||
```bash | ||
goreleaser --rm-dist --snapshot --skip-publish | ||
``` | ||
|
||
you will found the binaries for: | ||
|
||
- MacOS into the folder _dist/crumbs_darwin_amd64/_ | ||
- Linux into the folder _dist/crumbs_linux_amd64/_ | ||
- Windows into the folder _dist/crumbs_windows_amd64/_ | ||
|
||
## Ready-To-Use Releases | ||
|
||
If you don't want to compile the sourcecode yourself, [Here you can find the tool already compiled](https://github.com/lucasepe/crumbs/releases/latest) for: | ||
|
||
- MacOS | ||
- Linux | ||
- Windows | ||
|
||
--- | ||
|
||
# CHANGE LOG | ||
|
||
👉 [Record of all notable changes made to a project](./CHANGELOG.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# This is an example goreleaser.yaml file with some sane defaults. | ||
# Make sure to check the documentation at http://goreleaser.com | ||
# Run locally with: goreleaser --rm-dist --snapshot --skip-publish | ||
project_name: crumbs | ||
before: | ||
hooks: | ||
- go mod tidy | ||
- go mod download | ||
builds: | ||
- binary: '{{ .ProjectName }}' | ||
main: ./main.go | ||
env: | ||
- CGO_ENABLED=0 | ||
ldflags: | ||
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} | ||
- -a -extldflags "-static" | ||
goos: | ||
- windows | ||
- linux | ||
- darwin | ||
goarch: | ||
- amd64 | ||
archives: | ||
- replacements: | ||
darwin: macOS | ||
windows: win | ||
amd64: 64-bit | ||
checksum: | ||
name_template: 'checksums.txt' | ||
snapshot: | ||
name_template: "{{ .ProjectName }}_{{ .Tag }}" | ||
nfpms: | ||
- | ||
package_name: tiles | ||
vendor: Luca Sepe | ||
homepage: https://lucasepe.it/ | ||
maintainer: Luca Sepe <luca.sepe@gmail.com> | ||
description: Turn asterisk-indented text lines into mind maps. | ||
license: MIT | ||
replacements: | ||
amd64: 64-bit | ||
formats: | ||
- deb | ||
- rpm | ||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^test:' |
Oops, something went wrong.