Contents
FreeMindBrowser
Wiki and mind-mapping are 2 great concepts that can be perfectly combined.
Get this macro to share your mindmaps with the users of your MoinMoin.
Read About FreeMind to get a first impression of FreeMind and to find some good links to more detailed information.
DESCRIPTION
This macro inserts the FreeMindBrowser applet into your page.
The applet tag will only be inserted, if the Formatter is an html formatter.
Otherwise, a normal link to the mindmap file is generated.
If you donot know about FreeMind yet, have a look at About FreeMind.
USAGE
<<FreeMindBrowser( mindmapUrl, width, height )>>
mindmapUrl: url to the mindmap to be displayed
2 schemes are allowed for the url: attachment: and http:.
This means, that http-reachable mindmaps as well as MoinMoin attachments can be addressed.
width: (optional) defines the width of the applet; default: 100%
height: (optional) defines the height of the applet; default: 500
EXAMPLES
<<FreeMindBrowser( attachment:freemind.mm, 95% )>>
PREREQUISITES
FreeMindBrowser macro
Java -- see Main_Page for which Java version is suitable and from where to download
FreeMindBrowser applet (freemindbrowser.jar)
Stable -- see download page (freemind-browser)
- OR
0.9 beta -- within here http://freemind.sourceforge.net/testversions/freemind-bin-max-0.9.0_Beta_8.zip<<BR>> Colored mind maps and icons are rendered! CarlosBandar 2024-12-22 11:25:27
INSTALLATION
Please ensure that the prerequisites of above are met.
Install the FreeMindBrowser MoinMoin macro like the following:
Place freemindbrowser.jar (either stable or beta) in the /usr/share/moin/htdocs/applets/FreeMindBrowser or wiki\htdocs\applets\FreeMindBrowser directory of your MoinMoin installation.
E. g. C:\Programs\MoinDesktop_1.3.4-2\wiki\htdocs\applets\FreeMindBrowser. (be careful to put freemindbrowser.java inside applets/FreeMindBrowser!)You can as well ignore freemindbrowser.html - instead you will use the FreeMindBrowser macro at hand.
Rename FreeMindBrowser_patched.py to FreeMindBrowser.py and place it in the DATA-DIR/plugin/macro/ directory of your MoinMoin instance.
E. g. /var/wiki/moin/data/plugin/macro/ or C:\Programs\MoinDesktop_1.3.4-2\MoinMoin\macro
The installation can be tested like the following:
Attach an existing mindmap to your local WikiSandBox page, e.g. freemind.mm.
Then add the following macro to your local WikiSandBox page:
[[FreeMindBrowser(attachment:freemind.mm)]]
In the rare case, that attachments are not allowed in your MoinMoin installation, alternatively take an http-reachable url to your mindmap.
Try one of the following http-links to mindmaps (CarlosBandar´s note: I think those are not working, just deliver the map but not within the browser applet!:)
last one should be:
TESTS
Successfully tested with the following environment:
- OS: Windows XP
MoinMoin: MoinMoin - 1.3.4 [patch-723]; DesktopEdition Releases 1.3.4-2 and 1.5.4
FreeMindBrowser: 0.7.1
- Java: java version "1.5.0_04" and "1.5.0_06"
Python: 2.4.1 (if not using DesktopEdition!)
Download & Release Notes
Download |
Release Version |
Moin Version |
Release Notes |
|
1.3 |
FreeMindBrowser.py has some deficits, take patched version |
|
|
1.3 |
|
MODIFICATION HISTORY
@copyright: 2005 by Jürgen Lind (JürgenLind)
@license: GNU GPL, see COPYING for details.
Version: 1.3.4-1
Patched version by CarlosBandar, that just applied the patches of PeterPfläging and GuoYong. Tested and working.
About FreeMind
FreeMind is a premier free mind-mapping software written in Java.
It also provides an applet, called FreeMindBrowser, that is able to visualize and browse FreeMind mindmaps. Editing FreeMind mindmaps, however, is currently not possible with the FreeMindBrowser applet.
References:
Find all information around FreeMind at the FreeMind wiki
Get info about the FreeMindBrowser (also called FreeMind applet) at the FreeMind's applet info section
Inform yourself about the discussion of FreeMind combined with wiki
Download FreeMindBrowser/FreeMind's applet from the download page (freemind-browser)
Download FreeMind from the download page
You will also find the FreeMindBrowser there in the bottom half. So in all probability you have to scroll down a good part to reach the FreeMindBrowser.Read the well-written article of Robert J. Alexander about Freemind maps in a browser/ Serving mindmaps in a browser
Discussion
Small bug in FreeMindBrowser.py
If you modify the static pages in wikiconfig.py to not point to /wiki, your in troubles with FreeMindBrowser.py macro. Here's a fix as context diff for FreeMindBrowser.py:
*** FreeMindBrowser.py.orig Tue Nov 15 21:03:28 2005 --- FreeMindBrowser.py Tue Nov 15 21:06:20 2005 *************** *** 39,45 **** class FMBMacro: appletClass = 'freemind.main.FreeMindApplet.class' - appletArchive= '/wiki/applets/FreeMindBrowser/freemindbrowser.jar' widthDefault = '100%' heightDefault= '500' --- 39,44 ---- *************** *** 55,61 **** # Check and set, if we have an HTML formatter self.isHTML = '<br>\n' == self.macro.formatter.linebreak(0) ! self.appletArchive = self.macro.request.getQualifiedURL( FMBMacro.appletArchive ) self.isFatal = False self.applet = [] # this is for the applet code --- 54,61 ---- # Check and set, if we have an HTML formatter self.isHTML = '<br>\n' == self.macro.formatter.linebreak(0) ! appletArchive= "%s/applets/FreeMindBrowser/freemindbrowser.jar" % (self.macro.request.cfg.url_prefix) ! self.appletArchive = self.macro.request.getQualifiedURL( appletArchive ) self.isFatal = False self.applet = [] # this is for the applet code
Greetings / (I did include in the patched version; CarlosBandar)
A issue with MoinMoin DesktopEdition 1.5.2-1
self.isHTML will not be set to True because the value of self.macro.formatter.linebreak(0) is not '<br>\n' but '<br />\n'. Here's a fix for FreeMindBrowser.py:
*** FreeMindBrowser.py.orig Sun Jul 2 00:00:01 2006 --- FreeMindBrowser.py Sun Jul 2 00:59:09 2006 *************** *** 55,61 **** self.args = args # Check and set, if we have an HTML formatter ! self.isHTML = '<br>\n' == self.macro.formatter.linebreak(0) self.appletArchive = self.macro.request.getQualifiedURL( FMBMacro.appletArchive ) --- 55,61 ---- self.args = args # Check and set, if we have an HTML formatter ! self.isHTML = '<br />\n' == self.macro.formatter.linebreak(0) self.appletArchive = self.macro.request.getQualifiedURL( FMBMacro.appletArchive )
Thanks Guo! So many time waiting for a solution ... / I (CarlosBandar) included it in the patched version.
I hacked a version that works with 1.8.2 of moin. I hope it helps someone.
56c56,57 < appletArchive= "%s/applets/FreeMindBrowser/freemindbrowser.jar" % (self.macro.request.cfg.url_prefix) --- > # appletArchive= "C:/Python25/share/moin/htdocs/applets/FreeMindBrowser/freemindbrowser.jar" > appletArchive= "%s/applets/FreeMindBrowser/freemindbrowser.jar" % (self.macro.request.cfg.url_prefix_static) 120,123d120 < < if self.isHTML: < self.result = self.macro.formatter.rawHTML( result ) < else: 131d127 < if self.isHTML: 148d143 < 152,154d146 < else: < self.applet.append( self.macro.formatter.url( 1, self.mindmapUrl ) ) < self.applet.append( self.macro.formatter.url( 0 ) )
-- AP
Hi again... I got this file working with moin version 1.9.2 too. The changes are similar to the above (1.8.2) hack. Here it is:
56,59c56,57 < # Following line works with an alias for '/applets' in apache httpd.conf (on windows). < # appletArchive= "/applets/freemindbrowser.jar" < appletArchive= "%s/applets/FreeMindBrowser/freemindbrowser.jar" % (self.macro.request.cfg.url_prefix_static) < self.appletArchive = appletArchive --- > appletArchive= "%s/applets/FreeMindBrowser/freemindbrowser.jar" % (self.macro.request.cfg.url_prefix) > self.appletArchive = self.macro.request.getQualifiedURL( appletArchive ) 121a120,123 > > if self.isHTML: > self.result = self.macro.formatter.rawHTML( result ) > else: 128a131 > if self.isHTML: 144a148 > 147a152,154 > else: > self.applet.append( self.macro.formatter.url( 1, self.mindmapUrl ) ) > self.applet.append( self.macro.formatter.url( 0 ) )
Changes since the 1.8.2 version: Got rid of call to 'getQualifiedURL'. It took me a while to figure that out though since I am not familiar with Python.
I have also attached the my version of the file as: FreeMindBrowser_for_1_9_2.py. Please rename to FreeMindBrowser.py before use. I have only tested this on windows (2k3). One more thing to note is that now (for Moin ver. 1.9.2) I had to put the FreeMind jar file in the following folder:
C:\Python26\Lib\site-packages\MoinMoin\web\static\htdocs\applets
And I also had to remove the moin_static alias in my apache httpd.conf file (If you don't have one -- don't worry about it).
-- AP
Problems
I want to use this Marcro with version 1.83 standalone. I applied the patch, but it does not work. Does anybody use this macro with moinmoin v1.83? In addition to that, the syntax changed to <<FreeMindBrowser(attachment:freemind.mm)>>. I changed this. RalfMoll
@RalfMoll, I was able to use this macro with version 1.84 on CentOS by applying the above patch from AP. I can document in more detail if this would be helpful. BenChapman
In the FreeMind tool one is able to insert links to other .mm files. When I use the .jar browser + this macro in a page of my MoinMoin wiki, none of these links work anymore. Is it possible to link to other .mm files using FreeMindBrowser.jar + this macro? Thanks! JenCarlile