public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: Mohammed Haris Minai <mhminai-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: Graphviz python filter without using pygraphviz
Date: Wed, 21 Jan 2015 03:52:02 -0800 (PST)	[thread overview]
Message-ID: <03f2dced-9b1e-4a37-ac4b-52d2c7727b8e@googlegroups.com> (raw)
In-Reply-To: <CA+u6gbzNcjOfitQ4hqYbYQARer3_yX-txc=oRb6KyivgAmD2pA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>


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


The code is here 
<https://github.com/jgm/pandocfilters/blob/master/examples/graphviz.py>. 
From what I could understand:

   1. It creates an object of type pygraphviz.AGraph feeling it the 
   enclosed code from the code block marked as .graphviz
   2. Creates the file name that needs to be written to by reading other 
   arguments from the code block
   3. Writes the "png/pdf" file via pygraphviz to this file.
   4. Modifies the markdown to be an image link pointing to this new file

I would like to get rid of the dependency on pygraphviz, so instead if the 
filter could replace step 3 with a run on "dot" program, something like 
"dot -T{filetype} -o{src} < {code}"
everything should work without depending upon pygraphviz. Note that all 
text delimited by {} is already being formed by the filter.

On Tuesday, January 20, 2015 at 5:35:52 PM UTC+5:30, Ivan Miljenovic wrote:
>
> What does the graphviz filter do?  Just take the raw Dot code and run 
> it through dot/neato? 
>
> (clipped for brevity)

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/03f2dced-9b1e-4a37-ac4b-52d2c7727b8e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 2360 bytes --]

  parent reply	other threads:[~2015-01-21 11:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-20 11:47 Mohammed Haris Minai
     [not found] ` <229bfb34-a5bd-4b31-8511-ef9573585990-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-01-20 12:05   ` Ivan Lazar Miljenovic
     [not found]     ` <CA+u6gbzNcjOfitQ4hqYbYQARer3_yX-txc=oRb6KyivgAmD2pA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-01-21 11:52       ` Mohammed Haris Minai [this message]
2015-01-21 12:00       ` Mohammed Haris Minai
     [not found]         ` <1b3951ec-ae53-4943-a4a9-ed5362dc9434-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-01-21 12:12           ` Ivan Lazar Miljenovic
     [not found]             ` <CA+u6gbwc2CGBzyuY1SKbC15kYAk9LZOH5tP8yaG=N+doNCxLGA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-01-21 14:58               ` Mohammed Haris Minai
     [not found]                 ` <b96d2e46-4be0-4725-9276-ed1790ea8c6c-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-01-22  9:49                   ` Mohammed Haris Minai
     [not found]                     ` <ff78de30-d031-4b5b-9021-be32c111db2b-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-01-22 10:18                       ` Ivan Lazar Miljenovic

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

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

  git send-email \
    --in-reply-to=03f2dced-9b1e-4a37-ac4b-52d2c7727b8e@googlegroups.com \
    --to=mhminai-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /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.
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 NNTP newsgroup(s).