Contributing
The xml-coreutils are
open source, and are licensed under the
GNU General Public
License (version 3 or later). There are several ways you can
contribute (thank you!), if you wish:
Mailing list
There's a mailing list for discussions, help, criticisms, and bug reports.
The mailing list archive is here.
RPMs and DEBs
There are no prebuilt RPMs or DEBs for xml-coreutils at this time.
To build your own RPM package, a simple SPEC file is available
here.
Hacking
If you'd like to start hacking the code, you should probably first go
to the src directory and look
for the files xml-strings.c and xml-wc.c, which are the simplest to understand.
The xml-coreutils rely on the expat library for parsing XML input. The
function stdparse() handles parsing for most commands, and is
defined in stdparse.c. You might wish to read the informal
design_requirements.txt
which can be found in the doc directory.
There is a simple testing framework in the src/test directory. Each
test file (sometest.testin) contains three important pieces: an INPUT file,
a COMMAND line and an OUTPUT file. This is converted by compile_test.sh
into a test script (sometest.sh). The test script runs the command
"cat INPUT | COMMAND" and compares its STDOUT with OUTPUT. The test is
successful if STDOUT and OUTPUT are identical. The command "make check"
is used to run all the tests. Now go read the *.testin files.
Code patches
A list of available patches is here.
You can submit code patches to the mailing list. If you don't know
how to make a patch, here's an example:
First download an official tarball, let's say xml-coreutils-0.8.tar.gz,
and extract it to your working directory. You should rename the extracted
directory to make it easier to identify.
% tar xfz xml-coreutils-0.8.tar.gz
% mv xml-coreutils-0.8 xml-coreutils-0.8xyz
% cd xml-coreutils-0.8xyz
Now edit files, compile, debug, etc. When you're ready to create the
patch, do the following:
% cd ..
% tar xfz xml-coreutils-0.8.tar.gz
This will create a new ("official") xml-coreutils-0.8 directory beside
your modified xml-coreutils-0.8xyz (that's why you renamed it earlier).
% diff -Naur xml-coreutils-0.8 xml-coreutils-0.8xyz > xyz.patch
The above command has created the patch file xyz.patch, which
contains everything needed to convert the official xml-coreutils-0.8
source tree into your own xml-coreutils-0.8xyz tree.
When you chare the patch file with others, tell them which official
tarball you used (xml-coreutils-0.8.tar.gz here). Then they can
dowload it, and type:
% tar xfz xml-coreutils-0.8.tar.gz
% cd xml-coreutils-0.8
% patch -Np1 < ../xyz.patch
Now the xml-coreutils-0.8 source tree is identical with the original
xml-coreutils-0.8xyz tree (but note the directory name is
xml-coreutils-0.8 not xml-coreutils-0.8xyz).
If patch prints out errors then most likely the wrong official
tarball was downloaded.
|