Blame examples/README.1ST

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