First of all: thanks to the developers for doing all this work, and also for
the work previously put into Freemind, of which I became a heavy user, and on
which I currently depend.
I'd love to switch to Freeplane, but there's one hindrance: I need scripting
for doing my work, but I am not able to port my scripts without assistance.
Bad combination. I'd need to get text from nodes, have access to child nodes,
change fonts, change colors, check for presence and value of attributes,
programmatically center the viewport on some node, all that.
It would be absolutely terrific if someone with more ability could spend the
time to make a port of a helpful script that can be found on the Freemind
I dare asking for this because I am sure having some rudimentary scripting API
documentation would help many users.
Thanks for reading
Thanks for your interest. Due to the extensive refactoring, the API has been
in flux. The changes to the code should have settled down now we're in beta.
Hopefully we can put some documentation together soon, and I will get back to
Looking forward to that!
IMHO a transparent and (more or less) invariant scripting interface, and
ideally a simple way to register a script as a custom menu item would probably
be beneficial to the project. A larger crowd of users with less profound
programming skills (including me) would be enabled to contribute without the
need to understand the whole architecture of the software.
for making the doc you requested I need some assistance from you because we
have quite different backgrounds. I almost never use scripting facilities.
I'll do as you say and open that script doc page.
Here I quickly respond to your question concerning the "cheezy object
reference" script from the Freemind page. As I experienced it, it will
just take one of the preset objects "c" or "node"
(whichever line you uncomment at the bottom of the script) and create new
nodes as children of the node containing the script. These contain return
type, method name and parameter list of the methods of "c" or
I found this quite convenient, because the method names are mostly self
When I see a node like
public void setColor(Color)
for the "node" object and
public MindMapNode getSelected()
for the "c" object, then I can guess I should call
c.getSelected().setColor(Color.WHITE) to turn the currently selected node
white. In this sense I found the "cheezy" script quite useful...
Scripting API is still to be developed. It depends only on the community when
it happens. Look at http://freeplane.sourceforge.net/mediawiki-1.14.1/index.p
hp/Scripting_documentation and make your suggestions. Once we have the
specification it shall be implemented.
I believe this discussion needs more structure. See my suggestions on the
Scripting documentation Talk page http://freeplane.sourceforge.net/mediawiki-
Your corrections and expansions of my suggestion will be appreciated.
John, your API is looks like C API, not like a object oriented one.
I do not like to think about node IDs, I prefer to deal with node objects.
Also something like node.atributes.count() or node.attibutes.get(1).value =
I take MS Visual Basic for Applications (MS Office) as an example.
I finally found the time to think and just added an API draft to the Talk page
opened by John, which should be closer to the style imagined by Dimitry. It
hopefully can serve as a basis for discussion.
I commented in Wiki. Dimitry
Read your comment and slightly extended the "API" draft. Guess it's time to
close this thread here and ultimately migrate it to the Wiki page
to be honest, I see no much better solution. One alternative would be to have
a dummy property object "mapDefault" of some class "DefaultProperty" extending
Object, and to overload each setProperty(property) with
setProperty(DefaultProperty mapDefault) to do the same as resetProperty()
would do. This would save all the specialized resetProperty() methods. Is that
more elegant ? I don't know. It's up to you.
I have implemented API and put the details in Wiki.
The new code is submitted to bazaar.
It is not tested yet.
Just a final note for those who find this rather old discussion while looking
You can find ported versions of nearly all FreeMind scripts from http://freem
ind.sourceforge.net/wiki/index.php/Example_scripts in the Wiki at http://freeplane.sourcef
orge.net/mediawiki-1.14.1/index.php/Scripting_examples. All are working and
tested (unlike some of their originals).
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.