Seen dexy documentation tool?

120 views
Skip to first unread message

tfer

unread,
Nov 15, 2012, 11:37:44 AM11/15/12
to leo-e...@googlegroups.com
I've been looking for something to produce good looking commentaries for coding examples and have come across dexy.  It has some similarities to Leo conceptually as it has a template, (or boilerplate) file (in the mail-merge sense) that lets you pull in live code files, (or comment identified pieces from those files), run them through one or more "filters", and have the filter's output placed in your output document.

The filters you pick can do things like syntax coloring, (pygments is on of the available colorizing filters), running it through the console, or just running it and collecting the output.  Filters can be chained with the '|' symbol, (like unix pipes).

The document you are creating has the choice of a lot of different markup languages, filters exist to format the "pulled in" text to whichever one you are using, also, there are filters for a lot of different programming languages.

It is a command line system, so it looks to be a natural for Leo, all your code files, the "boilerplate" document, and .dexy config file, (that controls what gets feed to it), could be contained in a single .leo outline.  As dexy is a python application, script buttons could be made to invoke it, and, depending on what markup you where using, you might be able to preview the final output, (e.g. if you where using rst).

So far it is looking pretty interesting.

Tom




Edward K. Ream

unread,
Nov 16, 2012, 7:52:43 AM11/16/12
to leo-e...@googlegroups.com
On Thu, Nov 15, 2012 at 10:37 AM, tfer <tfeth...@aol.com> wrote:
> I've been looking for something to produce good looking commentaries for coding examples and have come across dexy.

My first thought is, Eureka! You have found it!

This "brings filters to programs", much like @button "brings scripts
to nodes". But filters are arbitrary Python scripts, so the effect is
the same. Only generalized. This could be momentous.

dexy is a Python package, so it should be able to be integrated into
Leo without much fuss.

I've only looked at dexy for five minutes, but it looks like something
that Leo has got to support.

Edward

tfer

unread,
Nov 17, 2012, 12:55:15 PM11/17/12
to leo-e...@googlegroups.com
Having just started to play with this inside of Leo, I'm finding that a lot of the filters as currently written do not work in windows, mostly due to using programs that are not ported to windows, most of the development is taking place in unix-y OS's, (i.e. linux and mac), but that does not mean that this has to remain the case, just waiting for some windows based attention.

People who are developing on linux/mac should be good to go.

There is a video on Vimeo by a web designer explaining how he uses dexy to document style-guides for teams working on a web site: http://vimeo.com/52851510

Todd Greenwood-Geer

unread,
Nov 30, 2012, 4:03:18 PM11/30/12
to leo-e...@googlegroups.com
Years ago, I was really into this vim plugin:

http://www.vim.org/scripts/script.php?script_id=1334

It allowed me to embed python code in a document, and have it both displayed, and have the output displayed, too. Not as cool as having an arbitrary set of filters applied, but still, very useful. I found that my whole coding strategy changed...I was really writing a large meta document, and embedding links to code snippets (python)...this allowed me to write a cohesive document at one level, and the build process was really, build -> run tests -> build doc -> doc runs code -> doc embeds code and results in doc -> doc formatted as html/pdf -> done.

This was really cool. But I think this project foundered...I only contributed bugs and whatnot b/c I couldn't stand to wade thru Bram's weird vimscript language. I kept thinking, 'if only he'd just used python instead...'.

-Todd


On Friday, November 16, 2012 7:52:44 AM UTC-5, Edward K. Ream wrote:
Reply all
Reply to author
Forward
0 new messages