johanwk / elot

Emacs Literate Ontology Tool
GNU General Public License v3.0
7 stars 3 forks source link

plantuml installation/invocation #6

Closed VladimirAlexiev closed 4 months ago

VladimirAlexiev commented 7 months ago

(A bit related to #4)

https://plantuml.com/emacs lists some other options. In particular an interesting way is to use the https://plantuml.com/plantuml server:

VladimirAlexiev commented 7 months ago

I have this in my dot-emacs

(eval-after-load "ob-plantuml"
  ' (progn
      (add-to-list 'org-babel-default-header-args:plantuml
                   '(:cache . "yes"))
      (add-to-list 'org-babel-default-header-args:plantuml
                   ;; http://plantuml.sourceforge.net/unicode.html
                   ;; -config /prog/bin/plantuml.cfg"))
                   '(:cmdline . "-charset UTF-8"))
      (add-to-list 'org-babel-default-header-args:plantuml
                   '(:prologue . "
hide circle
hide empty attributes
hide empty methods"))))
johanwk commented 6 months ago

The defaults look nice, I've never tried that before. So these would be defaults, but easily overridden with header arguments? I've found it's useful to have a couple of different config files available -- in named org blocks; not least for rdfpuml use, as graphs tend to grow large and need tweaking. Some alternatives could be added for the tool. I need to get some examples out to show what I mean. Coming up.

VladimirAlexiev commented 6 months ago

:prologue is not needed anymore, since rdfpuml.pl has a bit richer default now:

hide empty members
hide circle
skinparam classAttributeIconSize 0

This can be overridden inside the Turtle block with [] puml:options """...""".

johanwk commented 6 months ago

Major update with https://github.com/johanwk/elot/issues/34#issuecomment-2030867470, it would be great to do some testing.

johanwk commented 5 months ago

@VladimirAlexiev, @mhodki I've added a "quick start" guide, with screenshots, to the README.

As you see, I've reused the coloured circles from IDO. Comments?

VladimirAlexiev commented 5 months ago

Should we close this?

@johanwk

coloured circles from IDO

Do you mean this diagram? image I like them!

johanwk commented 5 months ago

I like them too! This is why rdfpuml is the best, and a big reason to care about ELOT :)

I put a line in the README where I used the term "home directory" instead of $HOME, in an attempt to be less alienating to new users.. also on Windows, it will be %UserProfile% or even some other environment variable, cf here.

I need to check the charset utf-8. I've had this before, but recently found that it wasn't needed to make characters go through properly. It really needs a check.

And no, I don't think the PlantUML server is a good default, at least. In general, and in line with #45, we should offer a tool that doesn't need to access external resources. This is not quite achievable -- ROBOT, for instance, produces lots of error messages when converting Maintenance to Turtle, since the ontology has imports that are retrieved from the web and found to be not entirely bug-free. But I think we must offer a solution that can be run "locally". Since rdfpuml requires Perl and needs to be installed, to install PlantUML as well isn't much extra effort.

johanwk commented 5 months ago

I could mention that both PlantUML and rdfpuml run much faster in WSL (Ubuntu) than in native Windows. There's something like a 10x difference. 10 seconds for making an svg, currently on my fairly old laptop, in Windows. But since these diagrams are not going to be made in very large numbers, I think users (like myself) will put up with it.

johanwk commented 4 months ago

Seems like this is ok, closing