source: freemind/trunk/fuentes/freemind/accessories/ExportToHtml.groovy @ 68

Last change on this file since 68 was 68, checked in by jrpelegrina, 4 years ago

First release to Xenial

File size: 1.4 KB
Line 
1/*FreeMind - A Program for creating and viewing Mindmaps
2 *Copyright (C) 2000-2011  Joerg Mueller, Daniel Polansky, Christian Foltin and others.
3 *
4 *See COPYING for Details
5 *
6 *This program is free software; you can redistribute it and/or
7 *modify it under the terms of the GNU General Public License
8 *as published by the Free Software Foundation; either version 2
9 *of the License, or (at your option) any later version.
10 *
11 *This program is distributed in the hope that it will be useful,
12 *but WITHOUT ANY WARRANTY; without even the implied warranty of
13 *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 *GNU General Public License for more details.
15 *
16 *You should have received a copy of the GNU General Public License
17 *along with this program; if not, write to the Free Software
18 *Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
19 *
20 * Created on 22.06.2011
21 */
22
23/**
24 * To use this script, call
25 * java -Dstartup_groovy_script=accessories\ExportToHtml.groovy -jar lib\freemind.jar
26 */
27
28// show map (otherwise it can't be exported)
29c.showThisMap()
30// get exporter
31def ex = c.getHookFactory().createModeControllerHook("accessories/plugins/ExportWithXSLT_HTML3.properties")
32ex.setController(c)
33// calculate file name
34def file = c.getMap().getFile().getAbsolutePath().replaceFirst(
35                    "\\.[^.]*?\$", "") + ".html"
36try {
37        ex.transform(new File(file));
38        } catch(e) { print e; }
39System.exit(0);
40return 0;
Note: See TracBrowser for help on using the repository browser.