Menu

script restriction blocks xslt export?

Berteh
2016-08-13
2018-05-22
  • Berteh

    Berteh - 2016-08-13

    Hello,

    A user of my xslt export that turns a freeplane mindmap into a nice html animated slideshow reports that groovy script restrictions prevents the export to happen in freeplane 1.5.13.

    I never experienced similar issues, and could not reproduce the problem in 1.5.14. Can anyone point me/him to a possible fix?

    original report at https://github.com/berteh/mindslide/issues/18:

    Just found tath, after installed the latest Freeplane version 1.5.13, it's always failed to export as mindslide format.
    Below is the error I found from the log.
    STDERR: ERROR: 'java.lang.SecurityException: Freeplane groovy scripts are restricted. The following File operation is forbidden: Read C:\Program Files\Freeplane\resources\xslt\config.xml. You can change this in the program settings.'Aug 12, 2016 5:51:03 PM org.freeplane.core.util.LogUtils warn

    I tried to enable those setting to permit scripts to Read and even Write in Freeplane, but nothing changed.

    Is there something would fix this can be done on mindslide side?

    Thanks for any help,
    Berteh.

     
    • BLOOD WOLF 3

      BLOOD WOLF 3 - 2016-08-15

      WUHAA THATS AWESOME!

      This is what i envisioned for the presentation mode in FP!
      So, Presenters, look at this!

      tony.

       
  • Berteh

    Berteh - 2016-08-15

    Thanks Dimitry for the answer, indeed the problem is fixed in 1.5.14, great!

    For the other ones interested in the export (bloodwolf, zipizap and other presenters) there's a demo online at http://berteh.github.io/mindslide/ It contains all info needed to install and create your own presentations (offline or online, online has presenters notes and synchronisation features in addition).

    It is powered by http://lab.hakim.se/reveal-js/, is pure html5 (css + js, no flash or anything else) and works in most modern devices. It basically works by turning (non-leaf) nodes into slides, and leaf nodes into bullets within these slides, all within a single html file with beautiful layout and powerful navigation. Required librairies (both css and js) can be loaded either from CDN (if you want portability and have web acces for presenting) or local files (to fully work offline). Many FP nice features (images, rich text, code highlight, presenters notes, links,...) are directly supported from freeplane mind map.

    The demo is actully a direct export of the following mindmap... to proof the concept ;)
    https://github.com/berteh/mindslide/blob/master/MindSlide-Export.mm

    Feedback and contributions welcome at https://github.com/berteh/mindslide/

    Some features still missing on which help is welcome: icons, node styles, summary and free nodes and some more (see documentation).

    B.

     

    Last edit: Berteh 2016-08-16
  • Berteh

    Berteh - 2016-08-15

    bloodwolf, i think turning this into a presenter mode inside FP would be nice... and an easy option would to "simply" embed a verey simple java http server... and serve the xslt export on the fly (as most webservers already can association a transformation to an xml file that seems even more powerful). One would "just" need to figure a good way to handle refererences to external files (images and links to other local files).

    I'm willing to help if somebody is interested.

     
  • Berteh

    Berteh - 2016-08-16

    and screenshots are available at https://github.com/berteh/mindslide#screenshots:

    from any given mindmap
    sample mind map

    the export generates a few slides to be seen in any browser, like that for the particular node expanded above: (or view it online)
    slide for "features" node

    allong with an "overview" mode that allows for non-linear 2D navigation, a.o.:
    overview mode

    many themes are readily available, and easy to modify to create your own visual style.
    some visual themes

     

    Last edit: Berteh 2016-08-16
  • Quinbus

    Quinbus - 2016-08-16

    Berteh,

    Amazing. Very nice feature. As a non-programmer, installation looks a little daunting, but the benefit of having a presentation tool like this might make that worth the trouble. It could also, if/when implemented as standard FP feature, solve the current problem with documentation. It allows a mindmap to be "channelized," by which I mean providing a path through the map that helps focus a reader's attention on specific elements of the bigger map. The ability to hide slides is huge!

    I'm not sure I understand the complexity associated with building a set of speaker's notes, timers, etc. Sounds tricky, but what a feature!

    Thanks for your work in this area. I'm excited to see how this unfolds!

    Q!

     
  • zipizap

    zipizap - 2016-08-16

    Berteh, this is great! Thanks for taking the time to share it and expose it.

    Now I understand the euforic enthusiasm of BloodWolf - this is a great complement: its like a "mind-map cinema" :)

    Well done, again - there is a lot of hours and efforth put into this, and looks great :)

     
  • Quinbus

    Quinbus - 2016-08-16

    Berteh,

    I just went over and attempted to install mindslide per the instructions supplied. But at this point, the export to "Animation Mindslide" doesn't show up in the export options. I've checked and the required config files are in place in the Freeplane 1.5 directory. Is there a setting within Freeplane that I need to change to allow these files to be read?

    Thanks,

    Q!

     
    • Quinbus

      Quinbus - 2016-08-16

      Got it! I was putting the xml config files in the user file directory opened by Tools->Open User Directory instead of the program file stored elsewhere on the harddrive. Normally I make changes in the user directory, but in this case it's the actual program directory.

      I must say, this is a fantastic addition! I'm going to start playing around with various themes and slide transitions to see what's possible. But as it is "right out of the box" it's amazing!

      Thanks for your work!

      I, for one, would strongly support the idea of making this feature a standard part of Freeplane. Great "killer app" for new users!

      Q!

       
    • Quinbus

      Quinbus - 2016-08-16

      One thing I am noticing. Grandchildren in my map (level 2) present their first child (level 3) as perhaps "subtitles" that look different in the slide than the other siblings. I've attached a screenshot that shows the parent as title, the first child as a subtitle (centered and no bullet) and the remaining children as bulleted items. This isn't happening with level 1 children, so I assume this is perhaps a style preference? I looked through the config.xml settings and didn't see anything that would suggest some settting to change?

      I've looked at the demonstration slideshow and this is happening there as well, so I think it is a design element.

      Is there some way to override this as an option? To use the first child in this way is a nice feature, but it requires that the mindmap be constructed with this in mind (i.e., the first child is different than it's siblings). Most of my maps aren't, of course, constructed in this way and I would prefer to have the first node present just like the others (i.e., bulleted).

      Thanks!

      Q!

      Also, I'm having trouble getting "slide_hide" to work. None of the nodes marked with this attribute are being excluded from the presentation...

       

      Last edit: Quinbus 2016-08-16
  • maggv

    maggv - 2016-08-16

    Berteh, very nice addition of possibilities!

     
  • Volker Börchers

    Berteh, your tool is a great contribution to the Freeplane ecosystem!

    Normally I find the idea of converting mind maps to bullet point lists a very bad idea - at least after having read Presentation Zen but your solution has the potential to be much more than the average mindmap to Powerpoint conversion at least once the inclusion of images and icons is provided.

    I'm thinking about what could be done to make it easier to use mindslide. Some ideas:

    • we could create an add-on that bundles all necessary JARs
    • we could write an http server either based on JRE builtin or other means (see here and here) that could serve all requests to URIs that Freeplane understands - it would be pretty simple since Freeplane naturally has everything to load its own URIs.
    • we could use something like the Pack & Go add-on to extend the export to encapsulate all requisites of a map. Then python -m SimpleHTTPServer 8000 executed in the base dir of the export directory would suffice to make all URIs available.

    Volker

     
  • Berteh

    Berteh - 2016-08-16

    @Quinbus: it's "slide-hide" with a dash (-), not an underscore (see documentation). And I put your request for handling the first nodes as any other node in the issue tracker at https://github.com/berteh/mindslide/issues/19 . Kindly subscribe there if you wanna be notified when it's done (quick fix is provided in the meanwhile)... and feel free to propose a pull request that implements it as an option if you feel like it!

    @Volker: thanks for the suggestions. Is Python shipped with FP? if not I'd rather go with a java-only solution for a better cross-platform support. I've seen quite a few minimalist http servers in java (nanohttpd, simple, jetty and more), but none that already includes xsl transformations and url rewrite (as that seems a possible way to handle links to resources).

    On a related matter: reveal.js has the potential to do multiplexing as well (ie: one master presenter, many clients getting a synchronized view of the slideshow: https://github.com/hakimel/reveal.js#multiplexing). It requires a webserver on the master, and the use of a socket.io server for synchronisation. Would you see this possible/useful, or is the audience for this (very) advanced feature so thin that we can focus on more simple uses?

    What do you mean by " Freeplane naturally has everything to load its own URIs"? in the maps there may be relative (or absolute) links to images and other mindmaps that may be located in parents of the current map... and thus outside of the reach or a securely-configured webserver. Therefore the location of all needed resources may be a bit tricky, afaik. Unless we consider security is not an issue (and warn the user accordingly)... then the whole disk could be made accessible.

    If possible I'd like to avoid the need to "pack and deploy", as it would be much faster if we could simply find a good way to link to the original resources. Users willing to pack for offline use on another machine could still pack and then export.

    One scenario that seems appealing to me would be to configure, in FP, a webserver with a handler for .mm files (with correct mime-type?) that would associate the existing xsl transformation to serve them. Thereby even other mind maps linked from one you are currently viewing as a slideshow would show as a slideshow when you follow the link to open them in your browser... seems impressive ;) but I have no clue if/how that would be possible with java. any pointers?

     

    Last edit: Berteh 2016-08-16
    • Volker Börchers

      What do you mean by " Freeplane naturally has everything to load its own URIs"? in the maps there may be relative (or absolute) links to images and other mindmaps that may be located in parents of the current map... and thus outside of the reach or a securely-configured webserver. Therefore the location of all needed resources may be a bit tricky, afaik.

      The provisioning of all resources that a mindmap needs (icons, images, ... - everything that is described by an URI) is implemented in freeplane of course. So it is pretty easy to implement a web server using this functionality that could provide all you need (without the need for a transformation I guess).

      Security wise this would be as save or unsafe as the map itself although things get more difficult if you give others access to the server. But this can be handled as well.

      Volker

       
    • Quinbus

      Quinbus - 2016-08-17

      That fixed it! Thanks so much for the quick response. The "patch" works fine. Just what I needed.

      Very nice work. Thank you.

      Q!

       
    • Montaque

      Montaque - 2018-05-22

      i for one would love to see the multiplexing feature added. I have been attempting to make the changes myself but I am not a coder so nothing has work thus far. Not sure what i am doing wrong.

       
  • Berteh

    Berteh - 2016-08-16

    if you can please rename this topic into something like "turn mindmap into animated slideshow" ... or something similar, because I can't and the title is now misleading.

     
    • Volker Börchers

      Renaming of topics is unfortunately not supported by the forum software (as far as I know).

      Volker

       
    • Quinbus

      Quinbus - 2016-08-17

      You could go ahead and create a new topic and embed links in both old and new pointing to new discussion.

      Q!