Skip to content

Commit

Permalink
demo version
Browse files Browse the repository at this point in the history
  • Loading branch information
EdoFro committed Oct 2, 2021
1 parent 73c6ffc commit abd82cb
Show file tree
Hide file tree
Showing 7 changed files with 739 additions and 26 deletions.
181 changes: 181 additions & 0 deletions README-Tutorial-o-Matic-MDH.mm
Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@
<map version="freeplane 1.9.8">
<!--To view this file, download free mind mapping software Freeplane from http://freeplane.sourceforge.net -->
<node LOCALIZED_TEXT="new_mindmap" FOLDED="false" ID="ID_696401721" STYLE="oval">
<font SIZE="18"/>
<hook NAME="MapStyle">
<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"/>

<map_styles>
<stylenode LOCALIZED_TEXT="styles.root_node" ID="ID_1758066171" STYLE="oval" UNIFORM_SHAPE="true" VGAP_QUANTITY="24 pt">
<font SIZE="24"/>
<stylenode LOCALIZED_TEXT="styles.predefined" POSITION="right" STYLE="bubble">
<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">
<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"/>
<font NAME="SansSerif" SIZE="10" BOLD="false" STRIKETHROUGH="false" ITALIC="false"/>
<richcontent CONTENT-TYPE="plain/auto" TYPE="DETAILS"/>
<richcontent TYPE="NOTE" CONTENT-TYPE="plain/auto"/>
<edge STYLE="bezier" COLOR="#808080" WIDTH="2" DASH="SOLID"/>
</stylenode>
<stylenode LOCALIZED_TEXT="defaultstyle.details"/>
<stylenode LOCALIZED_TEXT="defaultstyle.attributes">
<font SIZE="9"/>
</stylenode>
<stylenode LOCALIZED_TEXT="defaultstyle.note" ID="ID_1327065955" COLOR="#000000" BACKGROUND_COLOR="#ffffff" TEXT_ALIGN="LEFT"/>
<stylenode LOCALIZED_TEXT="defaultstyle.floating">
<edge STYLE="hide_edge"/>
<cloud COLOR="#f0f0f0" SHAPE="ROUND_RECT"/>
</stylenode>
<stylenode LOCALIZED_TEXT="defaultstyle.selection" BACKGROUND_COLOR="#4e85f8" STYLE="bubble" BORDER_COLOR_LIKE_EDGE="false" BORDER_COLOR="#4e85f8"/>
</stylenode>
<stylenode LOCALIZED_TEXT="styles.user-defined" POSITION="right" ID="ID_1886070887" STYLE="bubble">
<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">
<icon BUILTIN="emoji-1F343"/>
<richcontent TYPE="NOTE" CONTENT-TYPE="plain/markdown"/>
</stylenode>
<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">
<icon BUILTIN="emoji-1F517"/>
</stylenode>
</stylenode>
<stylenode LOCALIZED_TEXT="styles.AutomaticLayout" POSITION="right" STYLE="bubble">
<stylenode LOCALIZED_TEXT="AutomaticLayout.level.root" COLOR="#000000" STYLE="oval" SHAPE_HORIZONTAL_MARGIN="10 pt" SHAPE_VERTICAL_MARGIN="10 pt">
<font SIZE="18"/>
</stylenode>
<stylenode LOCALIZED_TEXT="AutomaticLayout.level,1" COLOR="#0033ff">
<font SIZE="16"/>
</stylenode>
<stylenode LOCALIZED_TEXT="AutomaticLayout.level,2" COLOR="#00b439">
<font SIZE="14"/>
</stylenode>
<stylenode LOCALIZED_TEXT="AutomaticLayout.level,3" COLOR="#990000">
<font SIZE="12"/>
</stylenode>
<stylenode LOCALIZED_TEXT="AutomaticLayout.level,4" COLOR="#111111">
<font SIZE="10"/>
</stylenode>
<stylenode LOCALIZED_TEXT="AutomaticLayout.level,5"/>
<stylenode LOCALIZED_TEXT="AutomaticLayout.level,6"/>
<stylenode LOCALIZED_TEXT="AutomaticLayout.level,7"/>
<stylenode LOCALIZED_TEXT="AutomaticLayout.level,8"/>
<stylenode LOCALIZED_TEXT="AutomaticLayout.level,9"/>
<stylenode LOCALIZED_TEXT="AutomaticLayout.level,10"/>
<stylenode LOCALIZED_TEXT="AutomaticLayout.level,11"/>
</stylenode>
</stylenode>
</map_styles>
</hook>
<hook NAME="AutomaticEdgeColor" COUNTER="7" RULE="ON_BRANCH_CREATION"/>
<node TEXT="README.MD" STYLE_REF="MarkdownHelperNode" POSITION="right" ID="ID_634612698" LINK="file:/C:/Users/Edo/Documents/GitHub/Freeplane_Tutorial_AddOn/README.MD">
<edge COLOR="#00007c"/>
<attribute_layout NAME_WIDTH="135 pt" VALUE_WIDTH="135 pt"/>
<attribute NAME="headersToUnderline" VALUE="0" OBJECT="org.freeplane.features.format.FormattedNumber|0|#0.####"/>
<attribute NAME="hideFolded" VALUE="false"/>
<attribute NAME="headerNumbering" VALUE="true"/>
<attribute NAME="topHeadersNumbered" VALUE="false"/>
<attribute NAME="topHeaderStartingNumber" VALUE="1" OBJECT="org.freeplane.features.format.FormattedNumber|1"/>
<attribute NAME="fileLinksRelative" VALUE="false"/>
<attribute NAME="lineOverHeader" VALUE="true"/>
<attribute NAME="ignoreHeaderDetails" VALUE="true"/>
<attribute NAME="ignoreHeaderNotes" VALUE="true"/>
<attribute NAME="ignoreLeafDetails" VALUE="false"/>
<attribute NAME="ignoreHeaderImageObjects" VALUE="false"/>
<richcontent TYPE="NOTE" CONTENT-TYPE="plain/">
<text>= edofro.MarkDownHelper.MDH.document(node)</text>
</richcontent>
<node TEXT="Tutorial-o-Matic" ID="ID_817659443">
<node TEXT="text block" STYLE_REF="MarkdownHelperNode" ID="ID_1655169059"><richcontent TYPE="NOTE" CONTENT-TYPE="xml/">
<html>
<head>

</head>
<body>
<p>
= edofro.MarkDownHelper.MDH.textBlock(node)
</p>
</body>
</html>
</richcontent>
<node TEXT="description" ID="ID_723426932"><richcontent TYPE="NOTE" CONTENT-TYPE="xml/">
<html>
<head>

</head>
<body>
<p>
Here I'm developing a $1 that will help users to create Tutorials for $2.
</p>
<p>

</p>
<p>
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.
</p>
<p>

</p>
<p>
Look under $3 in this repository.
</p>
<p>

</p>
<p>

</p>
<p>
Bye,
</p>
<p>

</p>
<p>
edo
</p>
</body>
</html>
</richcontent>
<node TEXT="web link" STYLE_REF="MarkdownHelperNode" ID="ID_253168814"><richcontent TYPE="NOTE" CONTENT-TYPE="xml/">
<html>
<head>

</head>
<body>
<p>
= edofro.MarkDownHelper.MDH.webLink(node)
</p>
</body>
</html>
</richcontent>
<node TEXT="Freeplane AddOn" ID="ID_1481337960" LINK="https://www.freeplane.org/wiki/index.php/Add-ons_(install)"/>
</node>
<node TEXT="web link" STYLE_REF="MarkdownHelperNode" ID="ID_1051472494"><richcontent TYPE="NOTE" CONTENT-TYPE="xml/">
<html>
<head>

</head>
<body>
<p>
= edofro.MarkDownHelper.MDH.webLink(node)
</p>
</body>
</html></richcontent>
<node TEXT="Freeplane" ID="ID_686425414" LINK="https://www.freeplane.org/wiki/index.php/Home"/>
</node>
<node TEXT="web link" STYLE_REF="MarkdownHelperNode" ID="ID_88579910"><richcontent TYPE="NOTE" CONTENT-TYPE="xml/">
<html>
<head>

</head>
<body>
<p>
= edofro.MarkDownHelper.MDH.webLink(node)
</p>
</body>
</html></richcontent>
<node TEXT="Releases" ID="ID_1483002666" LINK="https://github.com/EdoFro/Freeplane_Tutorial_AddOn/releases"/>
</node>
</node>
</node>
</node>
</node>
</node>
</map>
13 changes: 11 additions & 2 deletions README.MD
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# Dummy readme file
# Tutorial-o-Matic

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).

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.

Look under [Releases](https://github.com/EdoFro/Freeplane_Tutorial_AddOn/releases) in this repository.

Bye,

edo

justa a **dummy** markdown file
62 changes: 40 additions & 22 deletions Tutorial-o-Matic/Tutorial-o-Matic.mm
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,7 @@
To translate the description you have to define a translation for the key 'addons.${name}.description'.
</p>
</body>
</html>
</richcontent>
</html></richcontent>
<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"/>
</node>
<node TEXT="changes" POSITION="left" ID="ID_461119253">
Expand All @@ -164,8 +163,7 @@
Change log of this add-on: append one node for each noteworthy version and put the details for each version into a child node.
</p>
</body>
</html>
</richcontent>
</html></richcontent>
</node>
<node TEXT="license" FOLDED="true" POSITION="left" ID="ID_624388795">
<edge COLOR="#00ff00"/>
Expand All @@ -185,8 +183,7 @@
The License text has to be entered as a child of the <i>'license'</i>&nbsp;node, either as plain text or as HTML.
</p>
</body>
</html>
</richcontent>
</html></richcontent>
<node ID="ID_444630498"><richcontent TYPE="NODE">

<html>
Expand Down Expand Up @@ -277,8 +274,7 @@
<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>
</p>
</body>
</html>
</richcontent>
</html></richcontent>
</node>
<node TEXT="default.properties" POSITION="left" ID="ID_1398497950">
<edge COLOR="#00ffff"/>
Expand All @@ -300,8 +296,7 @@ For each menu item with an icon add an attribute with the icon key (use develope
</li>
</ul>
</body>
</html>
</richcontent>
</html></richcontent>
</node>
<node TEXT="translations" POSITION="left" ID="ID_546877695">
<edge COLOR="#7c0000"/>
Expand All @@ -326,13 +321,14 @@ For each menu item with an icon add an attribute with the icon key (use develope
</li>
</ul>
</body>
</html>
</richcontent>
</html></richcontent>
<node TEXT="en" ID="ID_1998059292">
<attribute_layout NAME_WIDTH="162 pt" VALUE_WIDTH="281.24999 pt"/>
<attribute NAME="addons.${name}" VALUE="Tutorial-o-Matic"/>
<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;"/>
<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;"/>
<attribute NAME="addons.${name}.executeTutorial" VALUE="execute Demo tutorial"/>
<attribute NAME="addons.${name}.openDemoMap" VALUE="open Demo map"/>
</node>
</node>
<node TEXT="deinstall" POSITION="left" ID="ID_378917294">
Expand All @@ -347,13 +343,15 @@ For each menu item with an icon add an attribute with the icon key (use develope
List of files and/or directories to remove on uninstall
</p>
</body>
</html>
</richcontent>
</html></richcontent>
<attribute_layout NAME_WIDTH="42.75 pt" VALUE_WIDTH="207.74999 pt"/>
<attribute NAME="delete" VALUE="${installationbase}/addons/${name}.script.xml"/>
<attribute NAME="delete" VALUE="${installationbase}/addons/${name}/lib/Tutorial-o-Matic.jar"/>
<attribute NAME="delete" VALUE="${installationbase}/addons/${name}/lib/markedj-1.0.16.jar"/>
<attribute NAME="delete" VALUE="${installationbase}/addons/${name}/lib/jsoup-1.10.2.jar"/>
<attribute NAME="delete" VALUE="${installationbase}/addons/${name}/scripts/executeTutorial.groovy"/>
<attribute NAME="delete" VALUE="${installationbase}/addons/${name}/scripts/openDemoMap.groovy"/>
<attribute NAME="delete" VALUE="${installationbase}/doc/Tutorial-o-Matic/Tutorial Sample.mm"/>
</node>
<node TEXT="scripts" POSITION="right" ID="ID_1037882722">
<edge COLOR="#007c00"/>
Expand Down Expand Up @@ -472,8 +470,31 @@ For each menu item with an icon add an attribute with the icon key (use develope
&nbsp;&nbsp;- In any case set execute_scripts_without_asking to true unless you want to annoy users.
</p>
</body>
</html>
</richcontent>
</html></richcontent>
<node TEXT="executeTutorial.groovy" ID="ID_420702224">
<attribute_layout NAME_WIDTH="200.24999 pt" VALUE_WIDTH="200.24999 pt"/>
<attribute NAME="menuTitleKey" VALUE="addons.${name}.executeTutorial"/>
<attribute NAME="menuLocation" VALUE="/menu_bar/edoTools/addons.${name}"/>
<attribute NAME="executionMode" VALUE="on_single_node"/>
<attribute NAME="keyboardShortcut" VALUE=""/>
<attribute NAME="execute_scripts_without_asking" VALUE="true"/>
<attribute NAME="execute_scripts_without_file_restriction" VALUE="true"/>
<attribute NAME="execute_scripts_without_write_restriction" VALUE="false"/>
<attribute NAME="execute_scripts_without_exec_restriction" VALUE="false"/>
<attribute NAME="execute_scripts_without_network_restriction" VALUE="false"/>
</node>
<node TEXT="openDemoMap.groovy" ID="ID_1629939217">
<attribute_layout NAME_WIDTH="200.24999 pt" VALUE_WIDTH="200.24999 pt"/>
<attribute NAME="menuTitleKey" VALUE="addons.${name}.openDemoMap"/>
<attribute NAME="menuLocation" VALUE="/menu_bar/edoTools/addons.${name}"/>
<attribute NAME="executionMode" VALUE="on_single_node"/>
<attribute NAME="keyboardShortcut" VALUE=""/>
<attribute NAME="execute_scripts_without_asking" VALUE="true"/>
<attribute NAME="execute_scripts_without_file_restriction" VALUE="true"/>
<attribute NAME="execute_scripts_without_write_restriction" VALUE="true"/>
<attribute NAME="execute_scripts_without_exec_restriction" VALUE="false"/>
<attribute NAME="execute_scripts_without_network_restriction" VALUE="false"/>
</node>
</node>
<node TEXT="lib" POSITION="right" ID="ID_1814812956">
<edge COLOR="#7c007c"/>
Expand Down Expand Up @@ -511,8 +532,7 @@ For each menu item with an icon add an attribute with the icon key (use develope
&nbsp;- The files will be processed in the sequence as seen in the map.
</p>
</body>
</html>
</richcontent>
</html></richcontent>
<node TEXT="Tutorial-o-Matic.jar" ID="ID_1864463328"/>
<node TEXT="markedj-1.0.16.jar" ID="ID_1060333872"/>
<node TEXT="jsoup-1.10.2.jar" ID="ID_1151792763"/>
Expand Down Expand Up @@ -553,8 +573,7 @@ For each menu item with an icon add an attribute with the icon key (use develope
&nbsp;- The files will be processed in the sequence as seen in the map.
</p>
</body>
</html>
</richcontent>
</html></richcontent>
<node TEXT="doc" ID="ID_281158802"/>
<node TEXT="icons" ID="ID_211861022"/>
<node TEXT="templates" ID="ID_553385296"/>
Expand Down Expand Up @@ -591,8 +610,7 @@ For each menu item with an icon add an attribute with the icon key (use develope
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.
</p>
</body>
</html>
</richcontent>
</html></richcontent>
</node>
<node TEXT="DevTools - MoM" POSITION="right" ID="ID_989188638">
<edge COLOR="#ff0000"/>
Expand Down
18 changes: 18 additions & 0 deletions Tutorial-o-Matic/scripts/executeTutorial.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import edofro.tutorialomatic.ToM_ui as tomui
import edofro.tutorialomatic.ToM as tom

//saca listado de tutotiales de mapa
def nodosTutoriales = node.map.root.find{it.style.name == tom.styles.tutorial}

// se elige tutorial
//TODO: hacer que usuario elija tutorial a realizar
def nTutorial = nodosTutoriales?nodosTutoriales.get(0):null

// listado de componentes de tutorial
def tutNodes = tom.getTutNodes(nTutorial)
if(!tutNodes) ui.informationMessage( 'no tutorial components(nodes) found')

// ---- crear / abrir panel -----
def myPanel = tomui.getContentPaneFromMyTab(tom.tabName, true)

tom.fillContentPane(myPanel, tutNodes)
14 changes: 14 additions & 0 deletions Tutorial-o-Matic/scripts/openDemoMap.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//opens demo map

def mapFile = "Tutorial Sample.mm"
def dir = c.userDirectory.path
def sep = File.separator
def helpFile = "Tutorial-o-Matic" + sep + mapFile
def pathName = dir + sep + "doc" + sep + helpFile


if(exists(pathName)){
c.mapLoader(pathName).withView().load()
}

def exists(String path){new File(path).isFile()}
4 changes: 2 additions & 2 deletions Tutorial-o-Matic/src/main/groovy/ToM_ui.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ class ToM_ui{
if (backToTop) scrollContentPaneBackToTop(comp)
TabPane.repaint()
def timer = new Timer()
timer.runAfter(1000) {
resizeContentPanel(comp, comp.height + 200)
timer.runAfter(3000) {
resizeContentPanel(comp, comp.height + 500)
if (backToTop) scrollContentPaneBackToTop(comp)
// TabPane.revalidate() <--- no funciona
TabPane.repaint()
Expand Down
Loading

0 comments on commit abd82cb

Please sign in to comment.