Skip to content

Commit b412c19

Browse files
committed
added showTutorialsFromActiveMap
1 parent e05fae8 commit b412c19

6 files changed

Lines changed: 60 additions & 25 deletions

File tree

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

Lines changed: 49 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@
8484
</li>
8585
</ul>
8686
</body>
87-
</html></richcontent>
87+
</html>
88+
</richcontent>
8889
<hook NAME="MapStyle" background="#f9f9f8" zoom="0.8">
8990
<properties edgeColorConfiguration="#808080ff,#ff0000ff,#0000ffff,#00ff00ff,#ff00ffff,#00ffffff,#7c0000ff,#00007cff,#007c00ff,#7c007cff,#007c7cff,#7c7c00ff" show_icon_for_attributes="true" mapUsesOwnSaveOptions="true" save_modification_times="false" save_last_visited_node="default" associatedTemplateLocation="file:/C:/Users/Edo/Documents/GitHub/Freeplane_My-Menu-Inator/Menu-o-Matic/Menu-o-Matic.mm" show_note_icons="true" save_folding="save_folding_if_map_is_changed" fit_to_viewport="false"/>
9091

@@ -186,7 +187,8 @@
186187
To translate the description you have to define a translation for the key 'addons.${name}.description'.
187188
</p>
188189
</body>
189-
</html></richcontent>
190+
</html>
191+
</richcontent>
190192
<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"/>
191193
</node>
192194
<node TEXT="changes" POSITION="left" ID="ID_461119253"><richcontent TYPE="NOTE" CONTENT-TYPE="xml/">
@@ -199,7 +201,8 @@
199201
Change log of this add-on: append one node for each noteworthy version and put the details for each version into a child node.
200202
</p>
201203
</body>
202-
</html></richcontent>
204+
</html>
205+
</richcontent>
203206
<node TEXT="v0.0.1" FOLDED="true" ID="ID_1147464075">
204207
<node TEXT="Demo version" ID="ID_1739689712"/>
205208
</node>
@@ -247,6 +250,7 @@
247250
<node TEXT="Added command &quot;get menu command&quot;" ID="ID_498503125"/>
248251
<node TEXT="Tab name can be set for each tutorial individually" ID="ID_1916947069"/>
249252
<node TEXT="List of Tutorials in Map can be shown in its own Tab. Its text can be set as a root node attribute." ID="ID_1159122569"/>
253+
<node TEXT="Added command: &quot;Show tutorials from active map&quot;" ID="ID_624798635"/>
250254
</node>
251255
</node>
252256
<node TEXT="license" FOLDED="true" POSITION="left" ID="ID_624388795"><richcontent TYPE="NOTE" CONTENT-TYPE="xml/">
@@ -265,7 +269,8 @@
265269
The License text has to be entered as a child of the <i>'license'</i>&nbsp;node, either as plain text or as HTML.
266270
</p>
267271
</body>
268-
</html></richcontent>
272+
</html>
273+
</richcontent>
269274
<node TEXT="MIT License&#xa;&#xa;Copyright (c) 2021 Eduardo Frohlich.&#xa;&#xa;Permission is hereby granted, free of charge, to any person obtaining a copy&#xa;of this software and associated documentation files (the &quot;Software&quot;), to deal&#xa;in the Software without restriction, including without limitation the rights&#xa;to use, copy, modify, merge, publish, distribute, sublicense, and/or sell&#xa;copies of the Software, and to permit persons to whom the Software is&#xa;furnished to do so, subject to the following conditions:&#xa;&#xa;The above copyright notice and this permission notice shall be included in all&#xa;copies or substantial portions of the Software.&#xa;&#xa;THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR&#xa;IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,&#xa;FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE&#xa;AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER&#xa;LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,&#xa;OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE&#xa;SOFTWARE." ID="ID_444630498"/>
270275
</node>
271276
<node TEXT="preferences.xml" POSITION="left" ID="ID_1967714695"><richcontent TYPE="NOTE" CONTENT-TYPE="xml/">
@@ -374,7 +379,8 @@
374379
</tr>
375380
</table>
376381
</body>
377-
</html></richcontent>
382+
</html>
383+
</richcontent>
378384
</node>
379385
<node TEXT="default.properties" POSITION="left" ID="ID_1398497950"><richcontent TYPE="NOTE" CONTENT-TYPE="xml/">
380386
<html>
@@ -394,7 +400,8 @@ For each menu item with an icon add an attribute with the icon key (use develope
394400
</li>
395401
</ul>
396402
</body>
397-
</html></richcontent>
403+
</html>
404+
</richcontent>
398405
</node>
399406
<node TEXT="translations" POSITION="left" ID="ID_546877695"><richcontent TYPE="NOTE" CONTENT-TYPE="xml/">
400407
<html>
@@ -426,23 +433,27 @@ For each menu item with an icon add an attribute with the icon key (use develope
426433
</li>
427434
</ul>
428435
</body>
429-
</html></richcontent>
430-
<node TEXT="en" ID="ID_1258736997">
431-
<attribute_layout NAME_WIDTH="166.5 pt" VALUE_WIDTH="269.24999 pt"/>
436+
</html>
437+
</richcontent>
438+
<node TEXT="en" ID="ID_867038336">
439+
<attribute_layout NAME_WIDTH="209.99999 pt" VALUE_WIDTH="269.24999 pt"/>
432440
<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;"/>
433441
<attribute NAME="addons.${name}" VALUE="Tutorial-o-Matic"/>
434442
<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;"/>
435443
<attribute NAME="addons.${name}.openDemoMap" VALUE="open Demo map"/>
444+
<attribute NAME="addons.${name}.getMenuCommand" VALUE="Get menu command"/>
445+
<attribute NAME="addons.${name}.showTutorialsFromActiveMap" VALUE="Show tutorials from active map"/>
436446
<attribute NAME="addons.${name}.ToMDemo" VALUE="Tutorial-o-Matic Demo"/>
437447
<attribute NAME="addons.${name}.executeTutorial" VALUE="execute Demo tutorial"/>
438-
<attribute NAME="addons.${name}.getMenuCommand" VALUE="Get menu command"/>
439448
</node>
440-
<node TEXT="es" ID="ID_1964613511">
441-
<attribute_layout NAME_WIDTH="188.24999 pt" VALUE_WIDTH="248.24999 pt"/>
442-
<attribute NAME="addons.${name}.ActionInstruction1" VALUE="&lt;html&gt;En submenu &lt;b&gt;{0}&lt;/b&gt; &lt;br&gt;has click en &lt;b&gt;{1}&lt;/b&gt;&lt;/html&gt;"/>
449+
<node TEXT="es" ID="ID_673322434">
450+
<attribute_layout NAME_WIDTH="209.99999 pt" VALUE_WIDTH="233.24999 pt"/>
451+
<attribute NAME="addons.${name}.ActionInstruction1" VALUE="&lt;html&gt;En submenu &lt;b&gt;{0}&lt;/b&gt; &lt;br&gt;has click en &lt;b&gt;{1}&lt;/b&gt;&lt;/html&gt;"/>
443452
<attribute NAME="addons.${name}" VALUE="Tutorial-o-Matic"/>
444453
<attribute NAME="addons.${name}.ActionInstruction2" VALUE="&lt;html&gt;Puedes usar también el atajo &lt;b&gt;{0}&lt;/b&gt; para este comando&lt;/html&gt;"/>
445454
<attribute NAME="addons.${name}.openDemoMap" VALUE="abrir mapa demo"/>
455+
<attribute NAME="addons.${name}.getMenuCommand" VALUE="Obtener comando desde el menú"/>
456+
<attribute NAME="addons.${name}.showTutorialsFromActiveMap" VALUE="Mostrar tutoriales de mapa activo"/>
446457
<attribute NAME="addons.${name}.ToMDemo" VALUE="Tutorial-o-Matic Demo"/>
447458
<attribute NAME="addons.${name}.executeTutorial" VALUE="ejecutar Demo tutorial"/>
448459
</node>
@@ -457,7 +468,8 @@ For each menu item with an icon add an attribute with the icon key (use develope
457468
List of files and/or directories to remove on uninstall
458469
</p>
459470
</body>
460-
</html></richcontent>
471+
</html>
472+
</richcontent>
461473
<attribute_layout NAME_WIDTH="42.75 pt" VALUE_WIDTH="295.49999 pt"/>
462474
<attribute NAME="delete" VALUE="${installationbase}/addons/${name}.script.xml"/>
463475
<attribute NAME="delete" VALUE="${installationbase}/addons/${name}/lib/Tutorial-o-Matic.jar"/>
@@ -472,6 +484,7 @@ For each menu item with an icon add an attribute with the icon key (use develope
472484
<attribute NAME="delete" VALUE="${installationbase}/resources/images/tutorialOMatic-screenshot-1.png"/>
473485
<attribute NAME="delete" VALUE="${installationbase}/templates/Tutorial-o-Matic/tutorial_styles_template.mm"/>
474486
<attribute NAME="delete" VALUE="${installationbase}/addons/${name}/scripts/getMenuCommand.groovy"/>
487+
<attribute NAME="delete" VALUE="${installationbase}/addons/${name}/scripts/showTutorialsFromActiveMap.groovy"/>
475488
</node>
476489
<node TEXT="scripts" POSITION="right" ID="ID_1037882722"><richcontent TYPE="NOTE" CONTENT-TYPE="xml/">
477490
<html>
@@ -588,7 +601,8 @@ For each menu item with an icon add an attribute with the icon key (use develope
588601
&nbsp;&nbsp;- In any case set execute_scripts_without_asking to true unless you want to annoy users.
589602
</p>
590603
</body>
591-
</html></richcontent>
604+
</html>
605+
</richcontent>
592606
<node TEXT="openDemoMap.groovy" ID="ID_1629939217">
593607
<attribute_layout NAME_WIDTH="209.24999 pt" VALUE_WIDTH="156.75 pt"/>
594608
<attribute NAME="menuTitleKey" VALUE="addons.${name}.openDemoMap"/>
@@ -625,6 +639,18 @@ For each menu item with an icon add an attribute with the icon key (use develope
625639
<attribute NAME="execute_scripts_without_exec_restriction" VALUE="false"/>
626640
<attribute NAME="execute_scripts_without_network_restriction" VALUE="false"/>
627641
</node>
642+
<node TEXT="showTutorialsFromActiveMap.groovy" ID="ID_484672073">
643+
<attribute_layout NAME_WIDTH="209.24999 pt" VALUE_WIDTH="209.99999 pt"/>
644+
<attribute NAME="menuTitleKey" VALUE="addons.${name}.showTutorialsFromActiveMap"/>
645+
<attribute NAME="menuLocation" VALUE="${addonsMenu}/addons.${name}"/>
646+
<attribute NAME="executionMode" VALUE="on_single_node"/>
647+
<attribute NAME="keyboardShortcut" VALUE=""/>
648+
<attribute NAME="execute_scripts_without_asking" VALUE="true"/>
649+
<attribute NAME="execute_scripts_without_file_restriction" VALUE="true"/>
650+
<attribute NAME="execute_scripts_without_write_restriction" VALUE="false"/>
651+
<attribute NAME="execute_scripts_without_exec_restriction" VALUE="false"/>
652+
<attribute NAME="execute_scripts_without_network_restriction" VALUE="true"/>
653+
</node>
628654
</node>
629655
<node TEXT="lib" POSITION="right" ID="ID_1814812956"><richcontent TYPE="NOTE" CONTENT-TYPE="xml/">
630656
<html>
@@ -660,7 +686,8 @@ For each menu item with an icon add an attribute with the icon key (use develope
660686
&nbsp;- The files will be processed in the sequence as seen in the map.
661687
</p>
662688
</body>
663-
</html></richcontent>
689+
</html>
690+
</richcontent>
664691
<node TEXT="Tutorial-o-Matic.jar" ID="ID_1864463328"/>
665692
<node TEXT="markedj-1.0.16.jar" ID="ID_1060333872"/>
666693
<node TEXT="jsoup-1.10.2.jar" ID="ID_1151792763"/>
@@ -699,7 +726,8 @@ For each menu item with an icon add an attribute with the icon key (use develope
699726
&nbsp;- The files will be processed in the sequence as seen in the map.
700727
</p>
701728
</body>
702-
</html></richcontent>
729+
</html>
730+
</richcontent>
703731
<node TEXT="doc" ID="ID_281158802"/>
704732
<node TEXT="icons" ID="ID_211861022"/>
705733
<node TEXT="templates" ID="ID_553385296"/>
@@ -734,7 +762,8 @@ For each menu item with an icon add an attribute with the icon key (use develope
734762
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.
735763
</p>
736764
</body>
737-
</html></richcontent>
765+
</html>
766+
</richcontent>
738767
<node TEXT="tutorialOMatic.svg" ID="ID_863225553"/>
739768
<node TEXT="tutorialOMatic-icon.svg" ID="ID_1901205001"/>
740769
<node TEXT="tutorialOMatic-screenshot-1.png" ID="ID_791135029"/>
@@ -747,7 +776,8 @@ For each menu item with an icon add an attribute with the icon key (use develope
747776
<body>
748777
Direct links to menu commands
749778
</body>
750-
</html></richcontent>
779+
</html>
780+
</richcontent>
751781
<node TEXT="Build add-on" ID="ID_295578710" LINK="menuitem:_addons.devtools.checkAddOn_on_single_node"/>
752782
<node TEXT="Package add-on for publication" ID="ID_776080324" LINK="menuitem:_addons.devtools.releaseAddOn_on_single_node"/>
753783
<node TEXT="Export Translations" ID="ID_743273714" LINK="menuitem:_addons.devtools.exportTranslations_on_single_node"/>

Tutorial-o-Matic/history.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
* added "editing status" to tutorial node (crayon icon)
77
* Added command "get menu command"
88
* Tab name can be set for each tutorial individually
9+
* List of Tutorials in Map can be shown in its own Tab. Its text can be set as a root node attribute.
10+
* Added command: "Show tutorials from active map"
911

1012
## v0.0.5
1113

Tutorial-o-Matic/scripts/ToMDemo.groovy

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import edofro.tutorialomatic.ToM_ui as tomui
21
import edofro.tutorialomatic.ToM as tom
32

43
//region: opens tutorial map
@@ -11,6 +10,4 @@ import edofro.tutorialomatic.ToM as tom
1110

1211
tom.showTutorials( tutMap )
1312

14-
return 'tutorial started'
15-
1613
//end:
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import edofro.tutorialomatic.ToM as tom
2+
3+
tom.showTutorials( node.map )
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
#Wed Mar 09 00:14:46 CLST 2022
1+
#Thu Mar 10 12:35:30 CLST 2022
22
addons.${name}.ActionInstruction1=<html>In submenu <b>{0}</b> <br>click on <b>{1}</b></html>
33
addons.${name}=Tutorial-o-Matic
44
addons.${name}.ActionInstruction2=<html>You can also use de keyboard shortcut <b>{0}</b> for this command</html>
55
addons.${name}.openDemoMap=open Demo map
66
addons.${name}.getMenuCommand=Get menu command
7+
addons.${name}.showTutorialsFromActiveMap=Show tutorials from active map
78
addons.${name}.ToMDemo=Tutorial-o-Matic Demo
89
addons.${name}.executeTutorial=execute Demo tutorial
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
#Wed Mar 09 00:14:46 CLST 2022
2-
addons.${name}.ActionInstruction1=<html>En submenu <b>{0}</b> <br>has click en <b>{1}</b></html>
1+
#Thu Mar 10 12:35:30 CLST 2022
2+
addons.${name}.ActionInstruction1=<html>En submenu <b>{0}</b> <br>has click en <b>{1}</b></html>
33
addons.${name}=Tutorial-o-Matic
44
addons.${name}.ActionInstruction2=<html>Puedes usar también el atajo <b>{0}</b> para este comando</html>
55
addons.${name}.openDemoMap=abrir mapa demo
6+
addons.${name}.getMenuCommand=Obtener comando desde el menú
7+
addons.${name}.showTutorialsFromActiveMap=Mostrar tutoriales de mapa activo
68
addons.${name}.ToMDemo=Tutorial-o-Matic Demo
79
addons.${name}.executeTutorial=ejecutar Demo tutorial

0 commit comments

Comments
 (0)