Coder Social home page Coder Social logo

shollingsworth / freeplane_tools Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 0.0 226 KB

This package provides tooling around translating freeplane mindmap files into other useful formats

License: MIT License

Makefile 4.28% Python 94.56% Dockerfile 0.34% Shell 0.81%
cli freeplane markdown mindmaps python

freeplane_tools's People

Contributors

shollingsworth avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

freeplane_tools's Issues

Question: get parent of a node

Hello,
Thank you for your software! I try to write something like a mm2ics.py. I Use mindmap as a hierarchical todo list. And want to create a calendar with tasks out of it. Later I will try to two-way-sync between icalendar and mm-file.

Is there a way to get the parent of a node (or 'None')? My working example just uses mm.iternodes() so I lose the hierarchy. I think to use xml for that.

If it works in the future, are you interested in a pull-request?

Thanks
Ekran

parser error when node text has format

Error

mm2github.py -w -o /dev/stdout ~/t.mm 
Saving file to: /dev/stdout
Traceback (most recent call last):
  File "/opt/homebrew/Caskroom/miniforge/base/bin/mm2github.py", line 48, in <module>
    main(args)
  File "/opt/homebrew/Caskroom/miniforge/base/bin/mm2github.py", line 38, in main
    mm.write_document(outfile)
  File "/opt/homebrew/Caskroom/miniforge/base/lib/python3.9/site-packages/freeplane_tools/base.py", line 159, in write_document
    fileh.write(self.get_document())
  File "/opt/homebrew/Caskroom/miniforge/base/lib/python3.9/site-packages/freeplane_tools/github.py", line 46, in get_document
    self._toc(),
  File "/opt/homebrew/Caskroom/miniforge/base/lib/python3.9/site-packages/freeplane_tools/base.py", line 135, in _toc
    return "\n".join(n.toc_entry for n in self._iternodes() if n.toc_entry)
  File "/opt/homebrew/Caskroom/miniforge/base/lib/python3.9/site-packages/freeplane_tools/base.py", line 135, in <genexpr>
    return "\n".join(n.toc_entry for n in self._iternodes() if n.toc_entry)
  File "/opt/homebrew/Caskroom/miniforge/base/lib/python3.9/site-packages/freeplane_tools/base.py", line 107, in toc_entry
    return f"{pad}[{self.text}](#{self._toc_name})"
  File "/opt/homebrew/Caskroom/miniforge/base/lib/python3.9/site-packages/freeplane_tools/github.py", line 15, in _toc_name
    return re.sub("[^a-zA-Z0-9]", "-", self.text).lower() + "-"
  File "/opt/homebrew/Caskroom/miniforge/base/lib/python3.9/re.py", line 210, in sub
    return _compile(pattern, flags).sub(repl, string, count)
TypeError: expected string or bytes-like object

node content

<node ID="ID_1521234531" CREATED="1632342121801" MODIFIED="1637123461801"><richcontent TYPE="NODE">

<html>
  <head>
    
  </head>
  <body>
    <p>
      test text
    </p>
  </body>
</html>
</richcontent>
</node>

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.