Blame examples/README.1ST

Packit 98cdb6
GTK Example Code - Tony Gale <gale@gtk.org> 980623
Packit 98cdb6
--------------------------------------------------
Packit 98cdb6
Packit 98cdb6
I have written an awk script to automatically extract the code
Packit 98cdb6
examples from the GTK Tutorial (in sgml), so they only have to be
Packit 98cdb6
changed in one place.
Packit 98cdb6
Packit 98cdb6
It's called 'extract.awk', and there is a shell wrapper to invoke
Packit 98cdb6
it called 'extract.sh'
Packit 98cdb6
Packit 98cdb6
It takes the following switches:
Packit 98cdb6
 -c : Just do checking rather than output files
Packit 98cdb6
 -f <filename> : Extract a specific file
Packit 98cdb6
 -d : Extract file(s) to current directory
Packit 98cdb6
Packit 98cdb6
Without the -d switch, the code will be placed in the appropriate
Packit 98cdb6
sub-directory. Those sub-directories will be created if they do not
Packit 98cdb6
exist.
Packit 98cdb6
Packit 98cdb6
Without the -f switch, all code examples will be extracted.
Packit 98cdb6
Packit 98cdb6
The shell wrapper assumes that the GTK Tutorial is in the 
Packit 98cdb6
file "../docs/gtk_tut.sgml"
Packit 98cdb6
Packit 98cdb6
It works by looking for sections of text in the tutorial surrounded
Packit 98cdb6
by, for example:
Packit 98cdb6
Packit 98cdb6
/* example-start helloworld helloworld.c */
Packit 98cdb6
Packit 98cdb6
and
Packit 98cdb6
Packit 98cdb6
/* example-end */
Packit 98cdb6
Packit 98cdb6
Where "helloworld" is the directory into which the file will be
Packit 98cdb6
placed (which can also be a directory spec like hello/hello1), and
Packit 98cdb6
"helloworld.c" is the file name for the code.
Packit 98cdb6
Packit 98cdb6
So, the code between these lines would be extracted to the file
Packit 98cdb6
helloworld/helloworld.c
Packit 98cdb6
Packit 98cdb6
It also handles replacing the sgml tag '&' with '&'