From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: Export ascii-images using ditaa when targeting HTML? Date: Tue, 11 Nov 2008 17:57:29 -0800 Message-ID: <87ej1hso3a.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L058Y-0007Xe-5j for emacs-orgmode@gnu.org; Tue, 11 Nov 2008 21:07:18 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L058W-0007WE-KT for emacs-orgmode@gnu.org; Tue, 11 Nov 2008 21:07:16 -0500 Received: from [199.232.76.173] (port=39688 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L058W-0007WB-FV for emacs-orgmode@gnu.org; Tue, 11 Nov 2008 21:07:16 -0500 Received: from rv-out-0708.google.com ([209.85.198.250]:14080) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L058W-0001HE-CJ for emacs-orgmode@gnu.org; Tue, 11 Nov 2008 21:07:16 -0500 Received: by rv-out-0708.google.com with SMTP id k29so212137rvb.6 for ; Tue, 11 Nov 2008 18:07:14 -0800 (PST) In-Reply-To: (Mac's message of "Thu, 6 Nov 2008 16:12:06 +0000 (UTC)") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Mac Cc: emacs-orgmode@gnu.org Hi Mac, That's an interesting utility. I have been working on an org-mode add-on for the specialized processing of #+begin_* blocks. Since this is very similar to the need you expressed below, I implemented ditaa processing as one of the examples in the initial implementation of this add-on. If you want to grab the org-exp-block.el file from http://github.com/eschulte/org-contrib/tree/master/org-exp-blocks.el you can use it to export ditaa blocks to images when exporting an org file to html. There are instruction in the top of the elisp file, mainly you just need to load the file, and set `ditaa-jar-path' to the path to ditaa.jar on your system. Then if you setup a block like the following #+begin_ditaa blue.png -r -S +---------+ | cBLU | | | | +----+ | |cPNK| | | | +----+----+ #+end_ditaa The ascii inside the block will be exported to an image in blue.png passing any following options as command line options to ditaa.jar. Hope this is helpful. Cheers -- Eric Mac writes: > I would like to convert my ASCII-images inside my document.org before exporting > the document to HTML. > > I've found this converter, ditaa, which is a java program that takes an ASCII > text file and creates a png file (http://ditaa.sourceforge.net/). > > I intend to find my ASCII figure, save it as a separate text file, and run ditaa > on it. In my document.org I'll comment the ASCII-art so it won't be exported and > add a link so the image will be included in the html file. > > [[file:figure_1.png]] > #+BEGIN_COMMENT > V,mA > | > +-----+ > |40140| > +-----+ > | > | +----+ > +--------|4561|----------> PC > | +----+ > +----+ > |4060| > +----+ > | > Relay Out > #+END_COMMENT > > Before reinventing the wheel, anyone done anything similar, or have ideas? > > > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode