Some quick docutils runs

Chuck Hagenbuch <[email protected]> Fri, 13 Jun 2003 21:50:55 -0400
Newsgroups gmane.comp.horde.documentation
Message-ID <[email protected]>
Here are the results of running docutils (html.py) on */docs/* :

http://marina.horde.org/wip/hordedocs/

Lots of errors and roughness, but some things - INSTALL, especially - parse
really well. CHANGES, not so well. :)

Here's the script I whipped up to do it: (I have some python issues, which
is why the python2.2 hardcoding)

#!/usr/local/bin/php
<?php

error_reporting(E_ALL);

$DOCUTIL = 'python2.2 /usr/local/src/docutils/tools/html.py';
$HORDE = '/var/www/horde';
$OUTDIR = '/var/www/wip/hordedocs';

exec('ls -1 -I CVS ' . $HORDE . '/docs', $hordefiles);
exec('ls -1 -I CVS ' . $HORDE . '/*/docs', $appfiles);

@mkdir($OUTDIR);

$curdir = $OUTDIR . DIRECTORY_SEPARATOR . 'horde';
@mkdir($curdir);
foreach ($hordefiles as $file) {
    if (!empty($file)) {
        system($DOCUTIL . ' ' . $HORDE . '/docs/' . $file . ' ' . $curdir .
DIRECTORY_SEPARATOR . $file . '.html');
    }
}

$new = true;
foreach ($appfiles as $file) {
    if (empty($file)) {
        $new = true;
        continue;
    }

    if ($new) {
        $sourcedir = substr($file, 0, -1);
        $curdir = str_replace('/docs', '', $sourcedir);
        $curdir = str_replace($HORDE, $OUTDIR, $curdir);
        @mkdir($curdir);

        $new = false;
        continue;
    }

    system($DOCUTIL . ' ' . $sourcedir . '/' . $file . ' ' . $curdir .
DIRECTORY_SEPARATOR . $file . '.html');
}

-chuck

--
Charles Hagenbuch, <[email protected]>
The alligators were there, too, in a bathtub inside the house.


-- 
Documentation mailing list
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: [email protected]