gtk example code extraction
- From: Trog <trog gtk org>
- To: otaylor gtk org
- Cc: gtk-list redhat com
- Subject: gtk example code extraction
- Date: Fri, 12 Jun 1998 14:00:47 +0100 (BST)
Err... I should have mentioned this earlier, but I have just
noticed that some people are still updating the examples/* code in the
CVS by hand.
I have written an awk script and placed it in the examples directory
in cvs to automatically extract the code examples from the tutorial,
so they only have to be changed once. It's called 'extract.awk', and
there is a shell wrapper to invoke it called 'extract.sh'
It takes the following switches:
-c : Just do checking rather than output files
-f <filename> : Extract a specific file
-d : Extract files to current directory
Without the -d switch, the code will be placed in the appropriate
sub-directory.
It works by looking for sections of text in the tutorial surrounded
by, for example:
/* example-start helloworld helloworld.c */
and
/* example-end */
So, the code between these lines would be extracted to the file
helloword/helloworld.c
It also handles replacing the sgml tag '&' with '&'
Comments welcome
Thanks
Tony
---
E-Mail: trog@gtk.org
ISO applications:
A solution in search of a problem!
Go Bezerk! http://www.gtk.org/~trog
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]