Skip to content

Instantly share code, notes, and snippets.

@ezimuel
Created July 17, 2012 14:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ezimuel/3129733 to your computer and use it in GitHub Desktop.
Save ezimuel/3129733 to your computer and use it in GitHub Desktop.
Script to convert all the ZF2 docs from DocBook to reStructuredText
<?php
require 'RstConvert.php';
$zf2Bin = '/path_to_zf2/bin';
$docbookPath = '/path_to_zf2/documentation/manual/en/module_specs';
foreach (glob("$docbookPath/*.xml") as $filename) {
$fileout = RstConvert::xmlFileNameToRst(basename($filename));
echo "Generating...$fileout\n";
exec("$zf2Bin/doc2rst.php -d $filename -o /dirout/$fileout -n");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment