Hi!

I wonder how I could integrate something along the lines of codeextractor into asciidoc. I'd really like the inclusion of code snippets to be handled inside the asciidoc execution, and not by pre-parsing the files before running asciidoc.

Right now I'm using a syntax similar to this one:

["snippet", source="Source.java", tag="tag1"]
----
----

What annoys me is the empty block, but I couldn't get it to work without it. Any ideas how this could be done in a better way?

I'd prefer a syntax close to the include:: macro, but couldn't find out if/how that could be done.


/anders


2010-12-23 14:01, Ed Keith skrev:
--- On Thu, 12/23/10, wimalopaan<[email protected]>  wrote:

From: wimalopaan<[email protected]>
Subject: Extracting code snippets from source files and include them
To: "asciidoc"<[email protected]>
Date: Thursday, December 23, 2010, 12:39 AM
Hi,

is there a possibiliy to extract code snippets from
external source
files and include them in asciidoc documents - perhaps like
the boost
quickbook snippets?

The following source file
-------
#include<iostream>
//[main
int main() {
}
//]
-------

imported in quickbook and selection of the snippet [main]
will only
render the function main (with the special comments
removed).

Any hints? Thanks!


I wrote a tool to do this. It can be found at
https://developer.berlios.de/projects/codeextactor/

Hope it helps,

     -EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com







--
You received this message because you are subscribed to the Google Groups 
"asciidoc" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/asciidoc?hl=en.

Reply via email to