diff --git a/README-Tutorial-o-Matic-MDH.mm b/README-Tutorial-o-Matic-MDH.mm new file mode 100644 index 0000000..044f1a8 --- /dev/null +++ b/README-Tutorial-o-Matic-MDH.mm @@ -0,0 +1,181 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + = edofro.MarkDownHelper.MDH.document(node) + + + + + + + + +

+ = edofro.MarkDownHelper.MDH.textBlock(node) +

+ + +
+ + + + + + +

+ Here I'm developing a $1 that will help users to create Tutorials for $2. +

+

+ +

+

+ 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 $3 in this repository. +

+

+ +

+

+ +

+

+ Bye, +

+

+ +

+

+ edo +

+ + +
+ + + + + + +

+ = edofro.MarkDownHelper.MDH.webLink(node) +

+ + +
+ + + + + + + + +

+ = edofro.MarkDownHelper.MDH.webLink(node) +

+ +
+ + + + + + + + +

+ = edofro.MarkDownHelper.MDH.webLink(node) +

+ +
+ + +
+
+
+
+
+
diff --git a/README.MD b/README.MD index 7afde9d..cd8830e 100644 --- a/README.MD +++ b/README.MD @@ -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 diff --git a/Tutorial-o-Matic/Tutorial-o-Matic.mm b/Tutorial-o-Matic/Tutorial-o-Matic.mm index 95cb094..e116a0a 100644 --- a/Tutorial-o-Matic/Tutorial-o-Matic.mm +++ b/Tutorial-o-Matic/Tutorial-o-Matic.mm @@ -148,8 +148,7 @@ To translate the description you have to define a translation for the key 'addons.${name}.description'.

- - + @@ -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.

- - +
@@ -185,8 +183,7 @@ The License text has to be entered as a child of the 'license' node, either as plain text or as HTML.

- - + @@ -277,8 +274,7 @@ Every property in the configuration should receive a default value in default.properties node.

- -
+
@@ -300,8 +296,7 @@ For each menu item with an icon add an attribute with the icon key (use develope - - + @@ -326,13 +321,14 @@ For each menu item with an icon add an attribute with the icon key (use develope - - + + + @@ -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

- - + + + +
@@ -472,8 +470,31 @@ For each menu item with an icon add an attribute with the icon key (use develope   - In any case set execute_scripts_without_asking to true unless you want to annoy users.

- - + + + + + + + + + + + + + + + + + + + + + + + + +
@@ -511,8 +532,7 @@ For each menu item with an icon add an attribute with the icon key (use develope  - The files will be processed in the sequence as seen in the map.

- - + @@ -553,8 +573,7 @@ For each menu item with an icon add an attribute with the icon key (use develope  - The files will be processed in the sequence as seen in the map.

- - + @@ -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 Tools->Scripts->Insert Binary since they have to be (base64) encoded as simple strings.

- - +
diff --git a/Tutorial-o-Matic/scripts/executeTutorial.groovy b/Tutorial-o-Matic/scripts/executeTutorial.groovy new file mode 100644 index 0000000..c8c624e --- /dev/null +++ b/Tutorial-o-Matic/scripts/executeTutorial.groovy @@ -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) diff --git a/Tutorial-o-Matic/scripts/openDemoMap.groovy b/Tutorial-o-Matic/scripts/openDemoMap.groovy new file mode 100644 index 0000000..9ca0e60 --- /dev/null +++ b/Tutorial-o-Matic/scripts/openDemoMap.groovy @@ -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()} \ No newline at end of file diff --git a/Tutorial-o-Matic/src/main/groovy/ToM_ui.groovy b/Tutorial-o-Matic/src/main/groovy/ToM_ui.groovy index 3f02bbe..209ef9e 100644 --- a/Tutorial-o-Matic/src/main/groovy/ToM_ui.groovy +++ b/Tutorial-o-Matic/src/main/groovy/ToM_ui.groovy @@ -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() diff --git a/Tutorial-o-Matic/zips/doc/Tutorial-o-Matic/Tutorial Sample.mm b/Tutorial-o-Matic/zips/doc/Tutorial-o-Matic/Tutorial Sample.mm new file mode 100644 index 0000000..f40bc3a --- /dev/null +++ b/Tutorial-o-Matic/zips/doc/Tutorial-o-Matic/Tutorial Sample.mm @@ -0,0 +1,473 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ uses HTML +

+ + +
+ + + + + + + +

+ Welcome to the Tutorial-o-Matic demo!! +

+

+ This is a first demo version of an addon that can be used to build tutorials in Freeplane. +

+ + +
+
+ + + + + + +

+ In the next pages you will see: +

+
    +
  • + An example of a note in markdown that includes tables and images + +
      +
    • + It has also links to webpages, but I don't know how to make them work +
    • +
    • + The content is just a demo markdown document I made a time ago about the "Calvin and Hobbes" comic strip. It has no relation with Freeplane, but it helps to see what can be shown +
    • +
    +
  • +
  • + The third page has three markdown examples with animated gif, code block and a table with images + +
      +
    • + I don't know why (at least in my computer) I can see the images in the nodes notes but they are not shown in the Tutorial panel +
    • +
    +
  • +
  • + The fourth page has an example about teaching how to make some format modifications to a selected node +
  • +
  • + The fifth page shows a list of "next steps" and "nice to haves" for this AddOn +
  • +
+ + +
+
+ + + + + + +

+ The whole information shown in this tutorial is taken from the "Tutorial Sample" mindmap. +

+

+ +

+

+ If you modify it and relaunch the tutorial it will include those changes. +

+ + +
+
+ + + + + + +

+ Click the "Next page" button to go to the first example +

+ +
+
+
+ + + + + + # Calvin and Hobbes + +----- + +## 1. Preface + +----- + +I made this markdown document and its source mindmap as an example to show how the **Markdown Helper AddOn** works and to show some of its features. + +This document isn't an official source of information about the **Calvin and Hobbes** comic strip. I made this document about it because I like **Mr. Watterson** work very much and I think that any extra showroom for it is well deserved. + +All information in this document comes from the ['Calvin and Hobbes' wiki page available in FANDOM.com](https://calvinandhobbes.fandom.com/wiki/Main_Page) + +Please look in there if you want to know more about **Calvin and Hobbes**. + +## 2. Content + +----- + +[Calvin and Hobbes](#Calvin-and-Hobbes) + +[1. Preface](#1-Preface) + +[2. Content](#2-Content) + +[3. Story Arcs](#3-Story-Arcs) + +[4. Characters](#4-Characters) + +[5. Watterson](#5-Watterson) + +[6. Books](#6-Books) + +## 3. Story Arcs + +----- + +In [Calvin and Hobbes](https://calvinandhobbes.fandom.com/wiki/Calvin_and_Hobbes), story arcs are a theme or plotline that lasts longer than a day. They can range from a few days to a month, such as the arc with [Calvin](https://calvinandhobbes.fandom.com/wiki/Calvin) accidentally pushing [his parents' car](https://calvinandhobbes.fandom.com/wiki/Car) into a ditch. + +Generally, the strip had week-long story arcs for the first couple of years and had its longest arcs in the middle of the its life. Later on, the arcs became fewer and farther between as [Bill Watterson](https://calvinandhobbes.fandom.com/wiki/Bill_Watterson) focused more on [Sunday strips](https://calvinandhobbes.fandom.com/wiki/Sunday_comics). + +Story arcs are used mainly to develop characters, introduce new devices, or investigate new artistic directions. + +## 4. Characters + +----- + +The principal characters of this strip are the followings: + +|Name|Image|Link|Description| +|----|:----:|:----:|----| +|Calvin|![https://static.wikia.nocookie.net/candh/images/7/78/Image.jpg/revision/latest/scale-to-width-down/139?cb=20130902154949](https://static.wikia.nocookie.net/candh/images/7/78/Image.jpg/revision/latest/scale-to-width-down/139?cb=20130902154949)|[Calvin](https://calvinandhobbes.fandom.com/wiki/Calvin)| +|Hobbes|![https://static.wikia.nocookie.net/candh/images/3/36/61D_hobbes.jpg/revision/latest/scale-to-width-down/133?cb=20121112232636](https://static.wikia.nocookie.net/candh/images/3/36/61D_hobbes.jpg/revision/latest/scale-to-width-down/133?cb=20121112232636)|[Hobbes](https://calvinandhobbes.fandom.com/wiki/Hobbes)| +|Susie Derkins|![https://static.wikia.nocookie.net/candh/images/a/a4/Susie_lalal.jpg/revision/latest/scale-to-width-down/140?cb=20130902161428](https://static.wikia.nocookie.net/candh/images/a/a4/Susie_lalal.jpg/revision/latest/scale-to-width-down/140?cb=20130902161428)|[Susie Derkins](https://calvinandhobbes.fandom.com/wiki/Susie_Derkins)| +|Calvin's mother|![https://static.wikia.nocookie.net/candh/images/3/32/Cmom_mainpage.jpeg/revision/latest/scale-to-width-down/150?cb=20170703031759](https://static.wikia.nocookie.net/candh/images/3/32/Cmom_mainpage.jpeg/revision/latest/scale-to-width-down/150?cb=20170703031759)|[Calvin's mother](https://calvinandhobbes.fandom.com/wiki/Calvin%27s_mother)| +|Calvin's father|![https://static.wikia.nocookie.net/candh/images/c/ca/Dad.jpg/revision/latest/scale-to-width-down/150?cb=20200108212915](https://static.wikia.nocookie.net/candh/images/c/ca/Dad.jpg/revision/latest/scale-to-width-down/150?cb=20200108212915)|[Calvin's father](https://calvinandhobbes.fandom.com/wiki/Calvin%27s_father)| +|Rosalyn|![https://static.wikia.nocookie.net/candh/images/2/20/Rosalyn.png/revision/latest/scale-to-width-down/49?cb=20200108212824](https://static.wikia.nocookie.net/candh/images/2/20/Rosalyn.png/revision/latest/scale-to-width-down/49?cb=20200108212824)|[Rosalyn](https://calvinandhobbes.fandom.com/wiki/Rosalyn)| +|Moe|![https://static.wikia.nocookie.net/candh/images/8/81/Moe.jpg/revision/latest/scale-to-width-down/150?cb=20090401050911](https://static.wikia.nocookie.net/candh/images/8/81/Moe.jpg/revision/latest/scale-to-width-down/150?cb=20090401050911)|[Moe](https://calvinandhobbes.fandom.com/wiki/Moe)| +|Miss Wormwood|![https://static.wikia.nocookie.net/candh/images/7/79/Wormwoodmainpagepic.png/revision/latest/scale-to-width-down/121?cb=20170713194559](https://static.wikia.nocookie.net/candh/images/7/79/Wormwoodmainpagepic.png/revision/latest/scale-to-width-down/121?cb=20170713194559)|[Miss Wormwood](https://calvinandhobbes.fandom.com/wiki/Miss_Wormwood)| +|Alter Egos|![https://static.wikia.nocookie.net/candh/images/e/e7/Unknown-5.jpeg/revision/latest/scale-to-width-down/111?cb=20110320025133](https://static.wikia.nocookie.net/candh/images/e/e7/Unknown-5.jpeg/revision/latest/scale-to-width-down/111?cb=20110320025133)|[Alter Egos](https://calvinandhobbes.fandom.com/wiki/Category:Alter_egos)| + +## 5. Watterson + +----- + +William Boyd "Bill" Watterson II (born July 5, 1958) is the author of [Calvin and Hobbes](https://calvinandhobbes.fandom.com/wiki/Calvin_and_Hobbes). He was author and artist during the strip's decade-long run. Calvin and Hobbes abruptly ceased publication in 1995, when Watterson decided to retire. He is now removed completely from the public eye, and is reluctant to take interviews, preferring to let his work speak for itself. He drew Calvin's father to look exactly like himself, for symbolism. Bill is currently 62 years old. + +## 6. Books + +----- + +Despite [ Bill Watterson](https://calvinandhobbes.fandom.com/wiki/Bill_Watterson)'s reluctance to sell [merchandise](https://calvinandhobbes.fandom.com/wiki/Licensing) based on [merchandise](https://calvinandhobbes.fandom.com/wiki/Licensing) or its characters, he still allowed some merchandise to reach the public, one of the few was books. There have so far been eighteen books (including one three-volume set) published in the United States. + +The books, referred to as "Collections", form a complete archive of the newspaper strips, except for a [single daily strip](https://calvinandhobbes.fandom.com/wiki/Alternate_strip) from November 28, 1985 (The collections do contain a strip for this date, but it is not the same strip that appeared in some newspapers). "Treasuries" combine the two preceding collections with bonus material and include color reprints of Sunday comics, and irregular printed collections reprint already published comics with a particular intent, such as providing original sketches or commentary. + +A complete collection of Calvin and Hobbes strips, in three hardcover volumes, with a total 1440 pages, was released on October 4, 2005, by [Andrews & McMeel](https://calvinandhobbes.fandom.com/wiki/Andrews_%26_McMeel) Publishing. It also includes color prints of the art used on paperback covers, the Treasuries' extra illustrated stories and poems, and an original 14-page introduction by Bill Watterson. Unfortunately, the alternate 1985 strip is still omitted, and two other strips (January 7, 1987, and November 25, 1988) have altered dialogue. + +To celebrate the release, Calvin and Hobbes reruns were made available to newspapers from Sunday, September 4, 2005, through Saturday, December 31, 2005, and Bill Watterson answered a select dozen questions submitted by readers. ([[1]](http://www.amuniversal.com/ups/features/thereturn/) [[2]](http://www.andrewsmcmeel.com/calvinandhobbes/returning.html)) Like current contemporary strips, weekday Calvin and Hobbes strips now appear in color print when available, instead of black and white as in their first run. + +|Title|Cover|Date|ISBN|Notes| +|----|----|:----:|----|----| +|[Calvin and Hobbes](https://calvinandhobbes.fandom.com/wiki/Calvin_and_Hobbes_(book))|![https://static.wikia.nocookie.net/candh/images/b/b2/Calvin_and_Hobbes_Original.png/revision/latest/scale-to-width-down/100?cb=20060314024407](https://static.wikia.nocookie.net/candh/images/b/b2/Calvin_and_Hobbes_Original.png/revision/latest/scale-to-width-down/100?cb=20060314024407)|April 1987|ISBN 0836220889|Collection covering strips from first strip on Nov 18, 1985 to Aug 17, 1986. Original content: Foreword by [Garry Trudeau](http://en.wikipedia.org/wiki/Garry_Trudeau).| +|[Something Under the Bed Is Drooling](https://calvinandhobbes.fandom.com/wiki/Something_Under_the_Bed_Is_Drooling)|![https://static.wikia.nocookie.net/candh/images/2/24/Something_Under_the_Bed_Is_Drooling.jpg/revision/latest/scale-to-width-down/100?cb=20060316165419](https://static.wikia.nocookie.net/candh/images/2/24/Something_Under_the_Bed_Is_Drooling.jpg/revision/latest/scale-to-width-down/100?cb=20060316165419)|April 1988|ISBN 0836218256|Collection covering strips from Aug 18, 1986 to May 22, 1987. Original content: Foreword by [Pat Oliphant](http://en.wikipedia.org/wiki/Pat_Oliphant).| +|[The Essential Calvin and Hobbes: A Calvin and Hobbes Treasury](https://calvinandhobbes.fandom.com/wiki/The_Essential_Calvin_and_Hobbes)|![https://static.wikia.nocookie.net/candh/images/d/dd/The_Essential_Calvin_and_Hobbes.png/revision/latest/scale-to-width-down/100?cb=20060316165656](https://static.wikia.nocookie.net/candh/images/d/dd/The_Essential_Calvin_and_Hobbes.png/revision/latest/scale-to-width-down/100?cb=20060316165656)|September 1988|ISBN 0836218051|Treasury including cartoons from Calvin and Hobbes, Something Under the Bed is Drooling, & a strip from May 23, 1987 not published in Drooling. Original content: Foreword by [Charles M. Schulz](http://en.wikipedia.org/wiki/Charles_M._Schulz), original illustrated poem "[A Nauseous Nocturne](https://calvinandhobbes.fandom.com/wiki/A_Nauseous_Nocturne)" and artwork on back cover of a giant rampaging Calvin.| +|....|....|....|....|....| +|....|....|....| + +Early books were printed in a smaller format, and the Sunday strips appeared in black and white. They were then reprinted, in color for the Sundays, in the three "Treasuries" (Essential, Authoritative, and Indispensable). The contents of Attack of the Deranged Mutant Killer Monster Snow Goons were not reprinted, and its Sunday comics were in black and white. As a result, those Sunday strips were never reprinted in color until the Complete collection was published in 2005. Every book since Snow Goons had been printed in a larger format with Sundays in color and weekday and Saturday strips larger than they appeared in most newspapers. + +Remaining books do contain some additional content; for instance, The Calvin and Hobbes Lazy Sunday Book contains a long watercolor Spaceman Spiff epic not seen elsewhere until Complete, and The Calvin and Hobbes Tenth Anniversary Book contains much original commentary from Watterson. Calvin and Hobbes: Sunday Pages 1985-1995 contains 36 Sunday strips in color alongside Watterson's original sketches, prepared for an exhibition at The Ohio State University Cartoon Research Library. + +An officially licensed children's textbook entitled [Teaching with Calvin and Hobbes](https://calvinandhobbes.fandom.com/wiki/Teaching_with_Calvin_and_Hobbes) ([ISBN 1878849158](https://calvinandhobbes.fandom.com/wiki/ISBN_1878849158?action=edit&redlink=1)) was published in 1993. It reprints 57 comic strips comprising 5 [story arcs](https://calvinandhobbes.fandom.com/wiki/Story_arcs). + + + + + + + + + + ## How to xxxx + +Sopose this is an introductio paragraph that explains a problem and next it comes an explanation of the possible solution: + +In the following animation you can see how this can be done: + +### my animated webimage + +*(I just took any image. I think for this kind of tutorials you should include smaller ones (not so wide)) * + +![https://github.com/EdoFro/hello-world/raw/master/testFormulaNodeChange.gif](https://github.com/EdoFro/hello-world/raw/master/testFormulaNodeChange.gif) + + + + + ## a codeBlock example + +Code: **'pasar texto a nota e indicar formato Markdown'** + +```groovy +// import org.freeplane.features.text.TextController +import org.freeplane.features.note.NoteController + + +def nodos = c.selecteds + +nodos.each{nodo -> + nodo.note = nodo.text + setNoteMarkdown(nodo) +} + +def setNoteMarkdown(n){ + return NoteController.getController().setNoteContentType(n.delegate, 'markdown') +} +``` + + + + + ## a link and an image + +----- + +For more information look: [Freeplane Homepage](https://www.freeplane.org/wiki/index.php/Home) + +![What is Mindmapping (thumb)](https://www.freeplane.org/wiki/images/thumb/7/7b/WhatIsMindMapping.jpg/300px-WhatIsMindMapping.jpg) + + + + + + + + + + + + + +

+ Some FREEPLANE tips +

+ + +
+
+ + ## Menu View + +Too many toolbars on screen? Do you want to have a bigger look of your map? + + * No problem! you can use the **Fullscreen mode**!! + + +The **Outline view** can give you a different way to look at your map + + +### Do you want to try them? Here is how: + + +
+ + + + + + + ## Blinking node + +You can also apply a multicolor, eye catching format to your node using the **Blinking node** command + + + + + + + + + + ## Using hotkeys + +Some of the commands can be called by clicking in the manu but also by using Hotkeys. + +### Here is an example: + + + + + + + + + + ## How to add more pages to the tutorial? + +Just add nodes to it and change their styles to the ones that you can find in the styles menu that start with "ToM_" + + + + + + + + + ## Where are all configuration files, addons, etc saved? + +in Freeplane's user directory. + +### You can open it directly using a menu command: + + + + + + + + + + + + ## Next steps + +* Way to execute menu commands on the selected node (almost ready) +* Insert an example node structure to the example map (30%) +* select defined nodes (30%) +* execute a script on the selected nodes +* open a new map to use for the example + + + + + ## Nice to have + +* Tutorial mouse arrow moves on the screen and shows where to click (not the actual mouse arrow, a simulated one) + + + + + + + + + + + + + + +

+ Ok. that was the first demo. +

+

+ I hope you enjoyed it. bye! +

+

+ +

+

+ edo +

+ + +
+
+
+
+
+
+