Code Monkey home page Code Monkey logo

text-to-freemind's Introduction

Text-to-Freemind

A simple text to freemind conversion program

Overview

This program converts tab-indented UTF-8 text files into an XML format suitable for display by Freemind. It was written out of annoyance with the Freemind user interface, and the lack of 'merging' capabilities when collaborating with other people.

Copyright 2006โ€“2017 Wouter Bolsterlee <[email protected]>

This program is distributed under the GPL v2 (or later) license.

Usage

To convert a single text file into a Freemind file, use:

$ text-to-freemind input-file.txt.mm > output-file.mm

You can use it as a filter (using shell pipes) as well:

$ cat some-text-data.mm.txt | text-to-freemind > output-file.mm

A Makefile snippet is also included to convert all *.mm.txt files into their *.mm counterparts. First copy or symlink the makefile, than run make:

$ cp /path/to/text-to-freemind/text-to-freemind.make Makefile
$ make

Alternatively:

$ ln -s /path/to/text-to-freemind/text-to-freemind.make Makefile
$ make

Or execute the makefile directly if you don't want to copy files around:

$ /path/to/text-to-freemind/text-to-freemind.make

Requirements

The conversion program is written in Python (tested with 2.4 and 2.5) and requires an ElementTree implementation. Install python-elementtree or python-celementtree (included in Python 2.5) if you run into programs.

The Makefile snippet obviously depends on the make utility. GNU/Make is known to work.

Issues, problems, and feedback

This program is a quick hack, so don't expect too much of it. If you feel like contacting me with problems or suggestions, please mail me. Thanks.

text-to-freemind's People

Contributors

buckeye43210 avatar wbolster 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

text-to-freemind's Issues

Quick feature overview

I see that it can parse some properties, could you just quickly write up what it supports and how?

Python3 Support

The current version does not run under Python3. Please updated the code to support Python3.

Enhancement Request: Add Code To Parse MarkDown Into Freemind Links

Please modify set_node_properties as follows:

def set_node_properties(node, text):
    # convert literal \n into newlines
    if r'\n' in text:
        text = text.replace(r'\n', '\n')

    # parse line for markdown url links
    if r'[' in text and r'](' in text and r']' in text: # find [text](link) formatted markdown in nodes
        match = re.search("\[(\w.*)\]\((\w.*)\)$", text)
        if match:
            text = match.group(1)
            link = match.group(2)
            node.set('LINK', link)
    elif r'<' in text and r'>' in text:                 # find <link> formatted markdown in nodes
        match = re.search("\<(\w.*)\>$", text)
        if match:
            text = match.group(1)
            link = match.group(1)
            node.set('LINK', link)

    node.set('TEXT', text)
    node.set('CREATED', creation_time)
    node.set('MODIFIED', creation_time)

I updated the regular expressions to make them a bit more robust.

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.