Skip to content

Commit abd82cb

Browse files
committed
demo version
1 parent 73c6ffc commit abd82cb

File tree

7 files changed

+739
-26
lines changed

7 files changed

+739
-26
lines changed

README-Tutorial-o-Matic-MDH.mm

Lines changed: 181 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
<map version="freeplane 1.9.8">
2+
<!--To view this file, download free mind mapping software Freeplane from http://freeplane.sourceforge.net -->
3+
<node LOCALIZED_TEXT="new_mindmap" FOLDED="false" ID="ID_696401721" STYLE="oval">
4+
<font SIZE="18"/>
5+
<hook NAME="MapStyle">
6+
<properties fit_to_viewport="false" edgeColorConfiguration="#808080ff,#ff0000ff,#0000ffff,#00ff00ff,#ff00ffff,#00ffffff,#7c0000ff,#00007cff,#007c00ff,#7c007cff,#007c7cff,#7c7c00ff" show_icon_for_attributes="true" show_note_icons="true" associatedTemplateLocation="template:/MarkdownHelper/MarkdownHelper%20template.mm" mapUsesOwnSaveOptions="true" save_folding="default" save_last_visited_node="default" save_modification_times="false"/>
7+
8+
<map_styles>
9+
<stylenode LOCALIZED_TEXT="styles.root_node" ID="ID_1758066171" STYLE="oval" UNIFORM_SHAPE="true" VGAP_QUANTITY="24 pt">
10+
<font SIZE="24"/>
11+
<stylenode LOCALIZED_TEXT="styles.predefined" POSITION="right" STYLE="bubble">
12+
<stylenode LOCALIZED_TEXT="default" ID="ID_271890427" ICON_SIZE="12 pt" FORMAT_AS_HYPERLINK="false" COLOR="#000000" BACKGROUND_COLOR="#ffffff" STYLE="fork" NUMBERED="false" FORMAT="STANDARD_FORMAT" TEXT_ALIGN="DEFAULT" MAX_WIDTH="10 cm" MIN_WIDTH="0 cm" VGAP_QUANTITY="2 pt" BORDER_WIDTH_LIKE_EDGE="false" BORDER_WIDTH="1 px" BORDER_COLOR_LIKE_EDGE="true" BORDER_COLOR="#808080" BORDER_DASH_LIKE_EDGE="false" BORDER_DASH="SOLID">
13+
<arrowlink SHAPE="CUBIC_CURVE" COLOR="#000000" WIDTH="2" TRANSPARENCY="200" DASH="" FONT_SIZE="9" FONT_FAMILY="SansSerif" DESTINATION="ID_271890427" STARTINCLINATION="65.25 pt;-33 pt;" ENDINCLINATION="55.5 pt;18.75 pt;" STARTARROW="NONE" ENDARROW="DEFAULT"/>
14+
<font NAME="SansSerif" SIZE="10" BOLD="false" STRIKETHROUGH="false" ITALIC="false"/>
15+
<richcontent CONTENT-TYPE="plain/auto" TYPE="DETAILS"/>
16+
<richcontent TYPE="NOTE" CONTENT-TYPE="plain/auto"/>
17+
<edge STYLE="bezier" COLOR="#808080" WIDTH="2" DASH="SOLID"/>
18+
</stylenode>
19+
<stylenode LOCALIZED_TEXT="defaultstyle.details"/>
20+
<stylenode LOCALIZED_TEXT="defaultstyle.attributes">
21+
<font SIZE="9"/>
22+
</stylenode>
23+
<stylenode LOCALIZED_TEXT="defaultstyle.note" ID="ID_1327065955" COLOR="#000000" BACKGROUND_COLOR="#ffffff" TEXT_ALIGN="LEFT"/>
24+
<stylenode LOCALIZED_TEXT="defaultstyle.floating">
25+
<edge STYLE="hide_edge"/>
26+
<cloud COLOR="#f0f0f0" SHAPE="ROUND_RECT"/>
27+
</stylenode>
28+
<stylenode LOCALIZED_TEXT="defaultstyle.selection" BACKGROUND_COLOR="#4e85f8" STYLE="bubble" BORDER_COLOR_LIKE_EDGE="false" BORDER_COLOR="#4e85f8"/>
29+
</stylenode>
30+
<stylenode LOCALIZED_TEXT="styles.user-defined" POSITION="right" ID="ID_1886070887" STYLE="bubble">
31+
<stylenode TEXT="MarkdownHelperNode" ID="ID_916254995" COLOR="#dbffdb" BACKGROUND_COLOR="#333333" STYLE="rectangle" BORDER_WIDTH="4 px" BORDER_COLOR_LIKE_EDGE="false" BORDER_COLOR="#009000">
32+
<icon BUILTIN="emoji-1F343"/>
33+
<richcontent TYPE="NOTE" CONTENT-TYPE="plain/markdown"/>
34+
</stylenode>
35+
<stylenode TEXT="MarkdownHelperLink" ID="ID_211915897" COLOR="#dbffdb" BACKGROUND_COLOR="#4c4c7f" STYLE="rectangle" BORDER_WIDTH="4 px" BORDER_COLOR_LIKE_EDGE="false" BORDER_COLOR="#009000">
36+
<icon BUILTIN="emoji-1F517"/>
37+
</stylenode>
38+
</stylenode>
39+
<stylenode LOCALIZED_TEXT="styles.AutomaticLayout" POSITION="right" STYLE="bubble">
40+
<stylenode LOCALIZED_TEXT="AutomaticLayout.level.root" COLOR="#000000" STYLE="oval" SHAPE_HORIZONTAL_MARGIN="10 pt" SHAPE_VERTICAL_MARGIN="10 pt">
41+
<font SIZE="18"/>
42+
</stylenode>
43+
<stylenode LOCALIZED_TEXT="AutomaticLayout.level,1" COLOR="#0033ff">
44+
<font SIZE="16"/>
45+
</stylenode>
46+
<stylenode LOCALIZED_TEXT="AutomaticLayout.level,2" COLOR="#00b439">
47+
<font SIZE="14"/>
48+
</stylenode>
49+
<stylenode LOCALIZED_TEXT="AutomaticLayout.level,3" COLOR="#990000">
50+
<font SIZE="12"/>
51+
</stylenode>
52+
<stylenode LOCALIZED_TEXT="AutomaticLayout.level,4" COLOR="#111111">
53+
<font SIZE="10"/>
54+
</stylenode>
55+
<stylenode LOCALIZED_TEXT="AutomaticLayout.level,5"/>
56+
<stylenode LOCALIZED_TEXT="AutomaticLayout.level,6"/>
57+
<stylenode LOCALIZED_TEXT="AutomaticLayout.level,7"/>
58+
<stylenode LOCALIZED_TEXT="AutomaticLayout.level,8"/>
59+
<stylenode LOCALIZED_TEXT="AutomaticLayout.level,9"/>
60+
<stylenode LOCALIZED_TEXT="AutomaticLayout.level,10"/>
61+
<stylenode LOCALIZED_TEXT="AutomaticLayout.level,11"/>
62+
</stylenode>
63+
</stylenode>
64+
</map_styles>
65+
</hook>
66+
<hook NAME="AutomaticEdgeColor" COUNTER="7" RULE="ON_BRANCH_CREATION"/>
67+
<node TEXT="README.MD" STYLE_REF="MarkdownHelperNode" POSITION="right" ID="ID_634612698" LINK="file:/C:/Users/Edo/Documents/GitHub/Freeplane_Tutorial_AddOn/README.MD">
68+
<edge COLOR="#00007c"/>
69+
<attribute_layout NAME_WIDTH="135 pt" VALUE_WIDTH="135 pt"/>
70+
<attribute NAME="headersToUnderline" VALUE="0" OBJECT="org.freeplane.features.format.FormattedNumber|0|#0.####"/>
71+
<attribute NAME="hideFolded" VALUE="false"/>
72+
<attribute NAME="headerNumbering" VALUE="true"/>
73+
<attribute NAME="topHeadersNumbered" VALUE="false"/>
74+
<attribute NAME="topHeaderStartingNumber" VALUE="1" OBJECT="org.freeplane.features.format.FormattedNumber|1"/>
75+
<attribute NAME="fileLinksRelative" VALUE="false"/>
76+
<attribute NAME="lineOverHeader" VALUE="true"/>
77+
<attribute NAME="ignoreHeaderDetails" VALUE="true"/>
78+
<attribute NAME="ignoreHeaderNotes" VALUE="true"/>
79+
<attribute NAME="ignoreLeafDetails" VALUE="false"/>
80+
<attribute NAME="ignoreHeaderImageObjects" VALUE="false"/>
81+
<richcontent TYPE="NOTE" CONTENT-TYPE="plain/">
82+
<text>= edofro.MarkDownHelper.MDH.document(node)</text>
83+
</richcontent>
84+
<node TEXT="Tutorial-o-Matic" ID="ID_817659443">
85+
<node TEXT="text block" STYLE_REF="MarkdownHelperNode" ID="ID_1655169059"><richcontent TYPE="NOTE" CONTENT-TYPE="xml/">
86+
<html>
87+
<head>
88+
89+
</head>
90+
<body>
91+
<p>
92+
= edofro.MarkDownHelper.MDH.textBlock(node)
93+
</p>
94+
</body>
95+
</html>
96+
</richcontent>
97+
<node TEXT="description" ID="ID_723426932"><richcontent TYPE="NOTE" CONTENT-TYPE="xml/">
98+
<html>
99+
<head>
100+
101+
</head>
102+
<body>
103+
<p>
104+
Here I'm developing a $1 that will help users to create Tutorials for $2.
105+
</p>
106+
<p>
107+
108+
</p>
109+
<p>
110+
It is in &quot;work in progress&quot; state, but I loaded a first addOn version that shows how it will work. It is a demo version.
111+
</p>
112+
<p>
113+
114+
</p>
115+
<p>
116+
Look under $3 in this repository.
117+
</p>
118+
<p>
119+
120+
</p>
121+
<p>
122+
123+
</p>
124+
<p>
125+
Bye,
126+
</p>
127+
<p>
128+
129+
</p>
130+
<p>
131+
edo
132+
</p>
133+
</body>
134+
</html>
135+
</richcontent>
136+
<node TEXT="web link" STYLE_REF="MarkdownHelperNode" ID="ID_253168814"><richcontent TYPE="NOTE" CONTENT-TYPE="xml/">
137+
<html>
138+
<head>
139+
140+
</head>
141+
<body>
142+
<p>
143+
= edofro.MarkDownHelper.MDH.webLink(node)
144+
</p>
145+
</body>
146+
</html>
147+
</richcontent>
148+
<node TEXT="Freeplane AddOn" ID="ID_1481337960" LINK="https://www.freeplane.org/wiki/index.php/Add-ons_(install)"/>
149+
</node>
150+
<node TEXT="web link" STYLE_REF="MarkdownHelperNode" ID="ID_1051472494"><richcontent TYPE="NOTE" CONTENT-TYPE="xml/">
151+
<html>
152+
<head>
153+
154+
</head>
155+
<body>
156+
<p>
157+
= edofro.MarkDownHelper.MDH.webLink(node)
158+
</p>
159+
</body>
160+
</html></richcontent>
161+
<node TEXT="Freeplane" ID="ID_686425414" LINK="https://www.freeplane.org/wiki/index.php/Home"/>
162+
</node>
163+
<node TEXT="web link" STYLE_REF="MarkdownHelperNode" ID="ID_88579910"><richcontent TYPE="NOTE" CONTENT-TYPE="xml/">
164+
<html>
165+
<head>
166+
167+
</head>
168+
<body>
169+
<p>
170+
= edofro.MarkDownHelper.MDH.webLink(node)
171+
</p>
172+
</body>
173+
</html></richcontent>
174+
<node TEXT="Releases" ID="ID_1483002666" LINK="https://github.com/EdoFro/Freeplane_Tutorial_AddOn/releases"/>
175+
</node>
176+
</node>
177+
</node>
178+
</node>
179+
</node>
180+
</node>
181+
</map>

README.MD

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1-
# Dummy readme file
1+
# Tutorial-o-Matic
2+
3+
Here I'm developing a [Freeplane AddOn](https://www.freeplane.org/wiki/index.php/Add-ons_(install)) that will help users to create Tutorials for [Freeplane](https://www.freeplane.org/wiki/index.php/Home).
4+
5+
It is in "work in progress" state, but I loaded a first addOn version that shows how it will work. It is a demo version.
6+
7+
Look under [Releases](https://github.com/EdoFro/Freeplane_Tutorial_AddOn/releases) in this repository.
8+
9+
Bye,
10+
11+
edo
212

3-
justa a **dummy** markdown file

Tutorial-o-Matic/Tutorial-o-Matic.mm

Lines changed: 40 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,7 @@
148148
To translate the description you have to define a translation for the key 'addons.${name}.description'.
149149
</p>
150150
</body>
151-
</html>
152-
</richcontent>
151+
</html></richcontent>
153152
<node TEXT="Tutorial-o-Matic for Freeplane!!&#xa;Tutorial-o-Matic is an AddOn for Freeplane that gives the user the possibility to create his/her own tutorials." ID="ID_1642042079"/>
154153
</node>
155154
<node TEXT="changes" POSITION="left" ID="ID_461119253">
@@ -164,8 +163,7 @@
164163
Change log of this add-on: append one node for each noteworthy version and put the details for each version into a child node.
165164
</p>
166165
</body>
167-
</html>
168-
</richcontent>
166+
</html></richcontent>
169167
</node>
170168
<node TEXT="license" FOLDED="true" POSITION="left" ID="ID_624388795">
171169
<edge COLOR="#00ff00"/>
@@ -185,8 +183,7 @@
185183
The License text has to be entered as a child of the <i>'license'</i>&nbsp;node, either as plain text or as HTML.
186184
</p>
187185
</body>
188-
</html>
189-
</richcontent>
186+
</html></richcontent>
190187
<node ID="ID_444630498"><richcontent TYPE="NODE">
191188

192189
<html>
@@ -277,8 +274,7 @@
277274
<font color="#000000" face="SansSerif, sans-serif">Every property in the configuration should receive a default value in <i>default.properties</i>&nbsp;node.</font>
278275
</p>
279276
</body>
280-
</html>
281-
</richcontent>
277+
</html></richcontent>
282278
</node>
283279
<node TEXT="default.properties" POSITION="left" ID="ID_1398497950">
284280
<edge COLOR="#00ffff"/>
@@ -300,8 +296,7 @@ For each menu item with an icon add an attribute with the icon key (use develope
300296
</li>
301297
</ul>
302298
</body>
303-
</html>
304-
</richcontent>
299+
</html></richcontent>
305300
</node>
306301
<node TEXT="translations" POSITION="left" ID="ID_546877695">
307302
<edge COLOR="#7c0000"/>
@@ -326,13 +321,14 @@ For each menu item with an icon add an attribute with the icon key (use develope
326321
</li>
327322
</ul>
328323
</body>
329-
</html>
330-
</richcontent>
324+
</html></richcontent>
331325
<node TEXT="en" ID="ID_1998059292">
332326
<attribute_layout NAME_WIDTH="162 pt" VALUE_WIDTH="281.24999 pt"/>
333327
<attribute NAME="addons.${name}" VALUE="Tutorial-o-Matic"/>
334328
<attribute NAME="addons.${name}.ActionInstruction1" VALUE="&lt;html&gt;In submenu &lt;b&gt;{0}&lt;/b&gt; &lt;br&gt;click on &lt;b&gt;{1}&lt;/b&gt;&lt;/html&gt;"/>
335329
<attribute NAME="addons.${name}.ActionInstruction2" VALUE="&lt;html&gt;You can also use de keyboard shortcut &lt;b&gt;{0}&lt;/b&gt; for this command&lt;/html&gt;"/>
330+
<attribute NAME="addons.${name}.executeTutorial" VALUE="execute Demo tutorial"/>
331+
<attribute NAME="addons.${name}.openDemoMap" VALUE="open Demo map"/>
336332
</node>
337333
</node>
338334
<node TEXT="deinstall" POSITION="left" ID="ID_378917294">
@@ -347,13 +343,15 @@ For each menu item with an icon add an attribute with the icon key (use develope
347343
List of files and/or directories to remove on uninstall
348344
</p>
349345
</body>
350-
</html>
351-
</richcontent>
346+
</html></richcontent>
352347
<attribute_layout NAME_WIDTH="42.75 pt" VALUE_WIDTH="207.74999 pt"/>
353348
<attribute NAME="delete" VALUE="${installationbase}/addons/${name}.script.xml"/>
354349
<attribute NAME="delete" VALUE="${installationbase}/addons/${name}/lib/Tutorial-o-Matic.jar"/>
355350
<attribute NAME="delete" VALUE="${installationbase}/addons/${name}/lib/markedj-1.0.16.jar"/>
356351
<attribute NAME="delete" VALUE="${installationbase}/addons/${name}/lib/jsoup-1.10.2.jar"/>
352+
<attribute NAME="delete" VALUE="${installationbase}/addons/${name}/scripts/executeTutorial.groovy"/>
353+
<attribute NAME="delete" VALUE="${installationbase}/addons/${name}/scripts/openDemoMap.groovy"/>
354+
<attribute NAME="delete" VALUE="${installationbase}/doc/Tutorial-o-Matic/Tutorial Sample.mm"/>
357355
</node>
358356
<node TEXT="scripts" POSITION="right" ID="ID_1037882722">
359357
<edge COLOR="#007c00"/>
@@ -472,8 +470,31 @@ For each menu item with an icon add an attribute with the icon key (use develope
472470
&nbsp;&nbsp;- In any case set execute_scripts_without_asking to true unless you want to annoy users.
473471
</p>
474472
</body>
475-
</html>
476-
</richcontent>
473+
</html></richcontent>
474+
<node TEXT="executeTutorial.groovy" ID="ID_420702224">
475+
<attribute_layout NAME_WIDTH="200.24999 pt" VALUE_WIDTH="200.24999 pt"/>
476+
<attribute NAME="menuTitleKey" VALUE="addons.${name}.executeTutorial"/>
477+
<attribute NAME="menuLocation" VALUE="/menu_bar/edoTools/addons.${name}"/>
478+
<attribute NAME="executionMode" VALUE="on_single_node"/>
479+
<attribute NAME="keyboardShortcut" VALUE=""/>
480+
<attribute NAME="execute_scripts_without_asking" VALUE="true"/>
481+
<attribute NAME="execute_scripts_without_file_restriction" VALUE="true"/>
482+
<attribute NAME="execute_scripts_without_write_restriction" VALUE="false"/>
483+
<attribute NAME="execute_scripts_without_exec_restriction" VALUE="false"/>
484+
<attribute NAME="execute_scripts_without_network_restriction" VALUE="false"/>
485+
</node>
486+
<node TEXT="openDemoMap.groovy" ID="ID_1629939217">
487+
<attribute_layout NAME_WIDTH="200.24999 pt" VALUE_WIDTH="200.24999 pt"/>
488+
<attribute NAME="menuTitleKey" VALUE="addons.${name}.openDemoMap"/>
489+
<attribute NAME="menuLocation" VALUE="/menu_bar/edoTools/addons.${name}"/>
490+
<attribute NAME="executionMode" VALUE="on_single_node"/>
491+
<attribute NAME="keyboardShortcut" VALUE=""/>
492+
<attribute NAME="execute_scripts_without_asking" VALUE="true"/>
493+
<attribute NAME="execute_scripts_without_file_restriction" VALUE="true"/>
494+
<attribute NAME="execute_scripts_without_write_restriction" VALUE="true"/>
495+
<attribute NAME="execute_scripts_without_exec_restriction" VALUE="false"/>
496+
<attribute NAME="execute_scripts_without_network_restriction" VALUE="false"/>
497+
</node>
477498
</node>
478499
<node TEXT="lib" POSITION="right" ID="ID_1814812956">
479500
<edge COLOR="#7c007c"/>
@@ -511,8 +532,7 @@ For each menu item with an icon add an attribute with the icon key (use develope
511532
&nbsp;- The files will be processed in the sequence as seen in the map.
512533
</p>
513534
</body>
514-
</html>
515-
</richcontent>
535+
</html></richcontent>
516536
<node TEXT="Tutorial-o-Matic.jar" ID="ID_1864463328"/>
517537
<node TEXT="markedj-1.0.16.jar" ID="ID_1060333872"/>
518538
<node TEXT="jsoup-1.10.2.jar" ID="ID_1151792763"/>
@@ -553,8 +573,7 @@ For each menu item with an icon add an attribute with the icon key (use develope
553573
&nbsp;- The files will be processed in the sequence as seen in the map.
554574
</p>
555575
</body>
556-
</html>
557-
</richcontent>
576+
</html></richcontent>
558577
<node TEXT="doc" ID="ID_281158802"/>
559578
<node TEXT="icons" ID="ID_211861022"/>
560579
<node TEXT="templates" ID="ID_553385296"/>
@@ -591,8 +610,7 @@ For each menu item with an icon add an attribute with the icon key (use develope
591610
Images can be added automatically by releaseAddOn.groovy or must be uploaded into the map via the script <i>Tools-&gt;Scripts-&gt;Insert Binary</i>&nbsp;since they have to be (base64) encoded as simple strings.
592611
</p>
593612
</body>
594-
</html>
595-
</richcontent>
613+
</html></richcontent>
596614
</node>
597615
<node TEXT="DevTools - MoM" POSITION="right" ID="ID_989188638">
598616
<edge COLOR="#ff0000"/>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import edofro.tutorialomatic.ToM_ui as tomui
2+
import edofro.tutorialomatic.ToM as tom
3+
4+
//saca listado de tutotiales de mapa
5+
def nodosTutoriales = node.map.root.find{it.style.name == tom.styles.tutorial}
6+
7+
// se elige tutorial
8+
//TODO: hacer que usuario elija tutorial a realizar
9+
def nTutorial = nodosTutoriales?nodosTutoriales.get(0):null
10+
11+
// listado de componentes de tutorial
12+
def tutNodes = tom.getTutNodes(nTutorial)
13+
if(!tutNodes) ui.informationMessage( 'no tutorial components(nodes) found')
14+
15+
// ---- crear / abrir panel -----
16+
def myPanel = tomui.getContentPaneFromMyTab(tom.tabName, true)
17+
18+
tom.fillContentPane(myPanel, tutNodes)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
//opens demo map
2+
3+
def mapFile = "Tutorial Sample.mm"
4+
def dir = c.userDirectory.path
5+
def sep = File.separator
6+
def helpFile = "Tutorial-o-Matic" + sep + mapFile
7+
def pathName = dir + sep + "doc" + sep + helpFile
8+
9+
10+
if(exists(pathName)){
11+
c.mapLoader(pathName).withView().load()
12+
}
13+
14+
def exists(String path){new File(path).isFile()}

Tutorial-o-Matic/src/main/groovy/ToM_ui.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ class ToM_ui{
120120
if (backToTop) scrollContentPaneBackToTop(comp)
121121
TabPane.repaint()
122122
def timer = new Timer()
123-
timer.runAfter(1000) {
124-
resizeContentPanel(comp, comp.height + 200)
123+
timer.runAfter(3000) {
124+
resizeContentPanel(comp, comp.height + 500)
125125
if (backToTop) scrollContentPaneBackToTop(comp)
126126
// TabPane.revalidate() <--- no funciona
127127
TabPane.repaint()

0 commit comments

Comments
 (0)