Giter Site home page Giter Site logo

lucas-c / brain_dump Goto Github PK

View Code? Open in Web Editor NEW
24.0 7.0 16.0 91 KB

Tools to generate mindmaps compatible from markdown-like text files, either as PNG with graphviz or as wisemapping-compatible XMLs

License: GNU General Public License v3.0

Python 100.00%

brain_dump's Introduction

pypi_version_img pypi_license_img build status snyk_deps_status

Tools to generate mindmaps compatible from markdown-like text files, either as PNG with graphviz or as wisemapping-compatible XMLs.

A viewer for those can be found here: https://github.com/Lucas-C/wisemapping-mindmap-viewer

Also include a Twilio webhook that can receive updates for such markdown-like mindmap files, stored in git.

For more information, I wrote some blog posts explaining the role of those scripts.

Usage

Converting a Markdown indented mind map to wisemapping-compatible XML:

wisemapping_md2xml examples/welcome.md > welcome.xml

Converting a Markdown indented mind map to a Graphviz graph:

graphviz_md2png examples/seasons.md

Twilio web hook deployment

upstart job using pew & uwsgi: /etc/init/brain_dump.conf

start on startup

script
    set -o errexit -o nounset -o xtrace
    cd /path/to/git/dir
    exec >> upstart-stdout.log
    exec 2>> upstart-stderr.log
    date
    APP_SCRIPT=$(dirname $(pew-in brain_dump python -c 'import brain_dump; print(brain_dump.__file__)'))/twilio_webhook_gitdb_app.py
    LANG=fr_FR.UTF-8 pew-in brain_dump uwsgi --buffer-size 8000 --http :8087 --manage-script-name --mount /webhook=$APP_SCRIPT
end script

systemd job using pew with a virtual env named brain_dump & uwsgi: /etc/systemd/system/brain_dump.service

[Unit]
Description=brain_dump

[Service]
WorkingDirectory=/root/brain_dump
Environment=LANG=fr_FR.UTF-8
ExecStart=/usr/local/bin/pew in brain_dump uwsgi --need-app --buffer-size 8000 --http :8087 --manage-script-name --pythonpath=
/root/.local/share/virtualenvs/brain_dump/lib/python3.6/site-packages/brain_dump --mount /webhook=twilio_webhook_gitdb_app:application                                                                                                                      Restart=always

Changelog

https://github.com/Lucas-C/brain_dump/blob/master/CHANGELOG.md

Contributing

curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
$HOME/.poetry/bin/poetry install
pre-commit install

The 2nd command install the pre-commit hooks

To only execute a single unit test:

py.test -k 'test_topic_from_line[toto-expected_topic0]'

brain_dump's People

Contributors

lucas-c avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

brain_dump's Issues

ModuleNotFoundError: No module named 'brain_dump.cli'

Reported to me by email:

i used pip to install your brain_dump package and when i issued the command it show something like this

$ graphviz_md2png welcome.md
Traceback (most recent call last):
  File "/home/j/.local/bin/graphviz_md2png", line 7, in <module>
    from brain_dump.cli.graphviz_md2png import main
ModuleNotFoundError: No module named 'brain_dump.cli'
j@culsky8gssd:~/desktop/t$ which graphviz_md2png
/home/j/.local/bin/graphviz_md2png

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.