emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* PATCH: Add new output formats to plantuml
@ 2016-05-02  9:14 Rainer M Krug
  2016-05-03 17:16 ` Nicolas Goaziou
  0 siblings, 1 reply; 6+ messages in thread
From: Rainer M Krug @ 2016-05-02  9:14 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 106 bytes --]

Hi

attached please find a patch which adds additional output file types for
plantuml.


Cheers,

Rainer


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: Add support for new output file types --]
[-- Type: text/x-patch, Size: 1899 bytes --]

From 839cb3194e6a40e577c5cab3b0a69961238924c9 Mon Sep 17 00:00:00 2001
From: "Rainer M. Krug" <R.M.Krug@gmail.com>
Date: Mon, 2 May 2016 11:00:23 +0200
Subject: [PATCH] lisp/op-plantuml.el: Add new output formats

* lisp/ob-paltuml (org-babel-execute:plantuml): add new output formats
  of plantuml:
  - pdf : this needs extra java mudules to run which are mentioned on the
    plantml website (http://fr.plantuml.com/pdf.html)
  - vdx
  - xmi
  - scxml
  - html
  - txt (ascii art)
  - utxt (ascii art using unicode)

  The output format is based on the extension of the output file.
---
 lisp/ob-plantuml.el | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/lisp/ob-plantuml.el b/lisp/ob-plantuml.el
index 0e07f2d..6cc55a2 100644
--- a/lisp/ob-plantuml.el
+++ b/lisp/ob-plantuml.el
@@ -59,10 +59,26 @@ This function is called by `org-babel-execute-src-block'."
 		(concat "java " java " -jar "
 			(shell-quote-argument
 			 (expand-file-name org-plantuml-jar-path))
+			(if (string= (file-name-extension out-file) "png")
+			    " -tpng" "")
 			(if (string= (file-name-extension out-file) "svg")
 			    " -tsvg" "")
 			(if (string= (file-name-extension out-file) "eps")
 			    " -teps" "")
+			(if (string= (file-name-extension out-file) "pdf")
+			    " -tpdf" "")
+			(if (string= (file-name-extension out-file) "vdx")
+			    " -tvdx" "")
+			(if (string= (file-name-extension out-file) "xmi")
+			    " -txmi" "")
+			(if (string= (file-name-extension out-file) "scxml")
+			    " -tscxml" "")
+			(if (string= (file-name-extension out-file) "html")
+			    " -thtml" "")
+			(if (string= (file-name-extension out-file) "txt")
+			    " -ttxt" "")
+			(if (string= (file-name-extension out-file) "utxt")
+			    " -utxt" "")
 			" -p " cmdline " < "
 			(org-babel-process-file-name in-file)
 			" > "
-- 
2.8.2


[-- Attachment #1.3: Type: text/plain, Size: 419 bytes --]


-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :       +33 - (0)9 53 10 27 44
Cell:       +33 - (0)6 85 62 59 98
Fax :       +33 - (0)9 58 10 27 44

Fax (D):    +49 - (0)3 21 21 25 22 44

email:      Rainer@krugs.de

Skype:      RMkrug

PGP: 0x0F52F982

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 454 bytes --]

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: PATCH: Add new output formats to plantuml
  2016-05-02  9:14 PATCH: Add new output formats to plantuml Rainer M Krug
@ 2016-05-03 17:16 ` Nicolas Goaziou
  2016-05-09  7:24   ` Rainer M Krug
  2016-05-10 10:08   ` Rainer M Krug
  0 siblings, 2 replies; 6+ messages in thread
From: Nicolas Goaziou @ 2016-05-03 17:16 UTC (permalink / raw)
  To: Rainer M Krug; +Cc: emacs-orgmode

Hello,

Rainer M Krug <Rainer@krugs.de> writes:

> attached please find a patch which adds additional output file types for
> plantuml.

Applied. Thank you.

Could you provide an entry for ORG-NEWS?

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: PATCH: Add new output formats to plantuml
  2016-05-03 17:16 ` Nicolas Goaziou
@ 2016-05-09  7:24   ` Rainer M Krug
  2016-05-10 10:08   ` Rainer M Krug
  1 sibling, 0 replies; 6+ messages in thread
From: Rainer M Krug @ 2016-05-09  7:24 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 397 bytes --]

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Hello,
>
> Rainer M Krug <Rainer@krugs.de> writes:
>
>> attached please find a patch which adds additional output file types for
>> plantuml.
>
> Applied. Thank you.

Thanks

>
> Could you provide an entry for ORG-NEWS?

Will do.

Rainer

>
> Regards,

-- 
Rainer M. Krug
email: Rainer<at>krugs<dot>de
PGP: 0x0F52F982

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 454 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: PATCH: Add new output formats to plantuml
  2016-05-03 17:16 ` Nicolas Goaziou
  2016-05-09  7:24   ` Rainer M Krug
@ 2016-05-10 10:08   ` Rainer M Krug
  2016-05-10 20:20     ` Nicolas Goaziou
  1 sibling, 1 reply; 6+ messages in thread
From: Rainer M Krug @ 2016-05-10 10:08 UTC (permalink / raw)
  To: emacs-orgmode, Nicolas Goaziou


[-- Attachment #1.1: Type: text/plain, Size: 1501 bytes --]

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Hello,
>
> Rainer M Krug <Rainer@krugs.de> writes:
>
>> attached please find a patch which adds additional output file types for
>> plantuml.
>
> Applied. Thank you.
>
> Could you provide an entry for ORG-NEWS?

Here it is - hopefully in the right format. The link to the RESULT of
the example needs to be adjusted, image attached.

Cheers,

Rainer

--8<---------------cut here---------------start------------->8---
*** Support for additional plantuml output formats 
The support for output formats of [[http://plantuml.com/][plantuml]] has been extended to now include:

All Diagrams:
- png ::
- svg ::
- eps ::
- pdf ::
- vdx ::
- txt :: ASCII art
- utxt :: ASCII art using unicode characters

Class Diagrams:
- xmi ::
- html ::

State Diagrams:
- scxml ::

The output formats are determined by the file extension specified using the :file property:

#+begin_src plantuml :file diagram.png
@startuml
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response

Alice -> Bob: Another authentication Request
Alice <-- Bob: another authentication Response
@enduml
#+end_src

#+RESULTS:
[[file:/Users/rainerkrug/diagram.png]]

Please note that *pdf* *does not work out of the box* and needss
additional setup in addition to plantuml. See
[[http://plantuml.com/pdf.html]] for details and setup information.
--8<---------------cut here---------------end--------------->8---



[-- Attachment #1.2: diagram.png --]
[-- Type: image/png, Size: 7014 bytes --]

[-- Attachment #1.3: Type: text/plain, Size: 88 bytes --]


>
> Regards,

-- 
Rainer M. Krug
email: Rainer<at>krugs<dot>de
PGP: 0x0F52F982

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 454 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: PATCH: Add new output formats to plantuml
  2016-05-10 10:08   ` Rainer M Krug
@ 2016-05-10 20:20     ` Nicolas Goaziou
  2016-05-10 20:37       ` Bug: missing header argument does not work any longer [8.3.4 (8.3.4-47-gaf853d-elpaplus <at> c:/Users/harald/AppData/Roaming/.emacs.d/elpa/org-plus-contrib-20160502/)] Harald Sanftmann
  0 siblings, 1 reply; 6+ messages in thread
From: Nicolas Goaziou @ 2016-05-10 20:20 UTC (permalink / raw)
  To: Rainer M Krug; +Cc: emacs-orgmode

Hello,

Rainer M Krug <Rainer@krugs.de> writes:

> Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
>
>> Hello,
>>
>> Rainer M Krug <Rainer@krugs.de> writes:
>>
>>> attached please find a patch which adds additional output file types for
>>> plantuml.
>>
>> Applied. Thank you.
>>
>> Could you provide an entry for ORG-NEWS?
>
> Here it is - hopefully in the right format. The link to the RESULT of
> the example needs to be adjusted, image attached.

Thank you. I didn't include the results of the code block, tho.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Bug: missing header argument does not work any longer [8.3.4 (8.3.4-47-gaf853d-elpaplus <at> c:/Users/harald/AppData/Roaming/.emacs.d/elpa/org-plus-contrib-20160502/)]
  2016-05-10 20:20     ` Nicolas Goaziou
@ 2016-05-10 20:37       ` Harald Sanftmann
  0 siblings, 0 replies; 6+ messages in thread
From: Harald Sanftmann @ 2016-05-10 20:37 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/html, Size: 4153 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-05-10 20:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-02  9:14 PATCH: Add new output formats to plantuml Rainer M Krug
2016-05-03 17:16 ` Nicolas Goaziou
2016-05-09  7:24   ` Rainer M Krug
2016-05-10 10:08   ` Rainer M Krug
2016-05-10 20:20     ` Nicolas Goaziou
2016-05-10 20:37       ` Bug: missing header argument does not work any longer [8.3.4 (8.3.4-47-gaf853d-elpaplus <at> c:/Users/harald/AppData/Roaming/.emacs.d/elpa/org-plus-contrib-20160502/)] Harald Sanftmann

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).