Difference between revisions of "Scripting: Jython"
From Freeplane - free mind mapping and knowledge management software
(Created page with "= Hints for scripting Freeplane in Python/Jython = You may want to have this url http://freeplane.sourceforge.net/doc/api/ at hand. == Attributes == node.attributes.get(na...") |
m (Text replacement - "freeplane.sourceforge.net" to "www.freeplane.org") |
||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
= Hints for scripting Freeplane in Python/Jython = | = Hints for scripting Freeplane in Python/Jython = | ||
− | You may want to have this url http://freeplane. | + | You may want to have this url http://www.freeplane.org/doc/api/ at hand. |
== Attributes == | == Attributes == | ||
Line 20: | Line 20: | ||
note = node.getNoteText() # Question: would node.getNote() be better? | note = node.getNoteText() # Question: would node.getNote() be better? | ||
node.setNote('new note text') | node.setNote('new note text') | ||
+ | |||
+ | [[Category:Script]] |
Latest revision as of 19:06, 18 November 2018
Hints for scripting Freeplane in Python/Jython
You may want to have this url http://www.freeplane.org/doc/api/ at hand.
Attributes
node.attributes.get(name) # no default value, returns None if non-existant node.attributes.set(name, value) if 'myAttrib' in node.attributes.names: ...
Node Text, Details and Notes
txt = node.text # also available via node.getText() node.setText("new text") # can not assign to node.text details = node.getDetailsText() # Question: would node.getDetails() be better? node.setDetails('new details text') note = node.getNoteText() # Question: would node.getNote() be better? node.setNote('new note text')