emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rick Frankel <rick@rickster.com>
To: news1142@karl-voit.at
Cc: emacs-orgmode@gnu.org
Subject: Re: Process diagrams with dot and some glue using Org-mode
Date: Wed, 26 Jun 2013 11:44:49 -0400	[thread overview]
Message-ID: <5b90a6852c7b87d077016cbb0479ff23@mail.rickster.com> (raw)
In-Reply-To: <2013-06-26T17-08-48@devnull.Karl-Voit.at>

On 2013-06-26 11:23, Karl Voit wrote:
> Hi!
> 
> 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):
> 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.
> 

Two things:

	1. You don't need to write table parsing code, as passing in a
	   table as an argument to a code block will convert it to an
	   array. For example:

	   #+name: ptable
| head1 | head2 |
|-------+-------|
| a     |     1 |
| b     |     2 |

	   #+BEGIN_SRC python :var t=ptable :results value
	     return t
	   #+END_SRC

	   #+RESULTS:
| a | 1 |
| b | 2 |

	   and the python code generated (view w/
	   `org-babel-expand-src-block'):

		   t=[["a", 1], ["b", 2]]
		   return t

	2. You can also use the pydot or pygraphviz libraries for
	   generating the graph directly from python instead of generating
	   dot code.

rick

  parent reply	other threads:[~2013-06-26 15:44 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5b90a6852c7b87d077016cbb0479ff23@mail.rickster.com \
    --to=rick@rickster.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=news1142@karl-voit.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).