emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Process diagrams with dot and some glue using Org-mode
@ 2013-06-26 15:23 Karl Voit
  2013-06-26 15:41 ` Karl Voit
                   ` (4 more replies)
  0 siblings, 5 replies; 18+ messages in thread
From: Karl Voit @ 2013-06-26 15:23 UTC (permalink / raw)
  To: emacs-orgmode

Hi!

I was looking for a reasonable simple method to define processes and
work-flows within Org-mode. My research did not result in anything
existing I found useful. Therefore, I started to read about dot[1]
and found [2].

I would like to define my diagram with the following two tables: one
for the node definitions and one for the interconnections between
notes. The syntax should be pretty self-explanatory (or at least I
hope so):

  #+name: foobar-node-table
  | *node*     | *label*        | *shape* | *fillcolor* |
  |------------+----------------+---------+-------------|
  | S_start    | start          | ellipse | green       |
  | S_fill     | fill form      |         |             |
  | S_send     | send form      |         |             |
  | S_complete | form complete? | diamond | yellow      |
  | S_do       | do task        |         | red         |
  | S_end      | end            | ellipse |             |
  
  #+name: foobar-graph-table
  |            | S_start | S_fill | S_send | S_complete | S_do | S_end |
  | S_start    |         | -      |        |            |      |       |
  | S_fill     |         |        | >      |            |      |       |
  | S_send     |         |        |        | >          |      |       |
  | S_complete |         | N>     |        |            | Y>   |       |
  | S_do       |         |        |        |            |      | >     |
  | S_end      |         |        |        |            |      |       |

Some (still missing) glue should use these two tables and
automatically generate the dot script:

  #+BEGIN_SRC dot :file ~/test-dot.png :exports results
    digraph {
      //rankdir=LR;
      S_start [label ="start", shape = "ellipse", style=filled, fillcolor="green"];
      S_fill [label ="fill form", shape = "box"];
      S_send [label ="send form", shape = "box"];
      S_complete [label ="form complete?", shape = "diamond", style=filled, fillcolor="yellow"];
      S_do [label ="do task", shape = "box", style=filled, fillcolor="red"];
      S_end [label ="end", shape = "ellipse"];
      S_start -- S_fill;
      S_fill -> S_send;
      S_send -> S_complete;
      S_complete -> S_do [taillabel = "Y"];
      S_do -> S_end;
      S_complete -> S_fill [taillabel = "N"];
    }
  #+END_SRC

The question is: is somebody with decent ELISP knowledge able to
implement the missing method? :-)

I (not an ELISP hacker) would have to use Python and write a table
parsing class which will get too complicated for my taste :-(
However, my guess is that this could be implemented in ELISP with
much less effort.

I would be happy to document this method and provide it on Worg. In
my opinion, this would be very handy for many Org-mode users.

Thanks!

  1. https://en.wikipedia.org/wiki/DOT_language
  2. http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-dot.html
-- 
mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
       > get Memacs from https://github.com/novoid/Memacs <

https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github

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

end of thread, other threads:[~2013-07-05 16:15 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-26 15:23 Process diagrams with dot and some glue using Org-mode Karl Voit
2013-06-26 15:41 ` Karl Voit
2013-06-26 15:44 ` Rick Frankel
2013-06-26 17:03   ` Karl Voit
2013-06-26 18:25     ` Rick Frankel
2013-06-27  6:47       ` Karl Voit
2013-06-27 13:06         ` Rick Frankel
2013-06-27 13:56           ` Bastien
2013-06-28  9:20       ` Karl Voit
2013-06-28 15:34         ` Rick Frankel
2013-07-01 17:44           ` Karl Voit
2013-06-26 16:40 ` Eric S Fraga
2013-06-27  6:56   ` Karl Voit
2013-06-26 16:54 ` Thorsten Jolitz
2013-06-27  6:36   ` Karl Voit
2013-07-03 19:18 ` Karl Voit
2013-07-03 20:57   ` Nick Dokos
2013-07-05 16:15   ` Eric S Fraga

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