X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;ds=inline;f=scripts%2Fpod2diogenes;fp=scripts%2Fpod2diogenes;h=21e6a325607828eb38f2e9ca92fc0b630a1b534e;hb=66a0db100b8c65b7d85255cee529cbf7c3333324;hp=0000000000000000000000000000000000000000;hpb=7d7400eafcf18fddfd6df14b7d0a3a1700455ea7;p=diogenes.git diff --git a/scripts/pod2diogenes b/scripts/pod2diogenes new file mode 100755 index 0000000..21e6a32 --- /dev/null +++ b/scripts/pod2diogenes @@ -0,0 +1,160 @@ +#!/usr/bin/php +barrel; + + $pid = $barrel->makePath($docdir, $caller); + $page = Diogenes_Barrel_Page::fromDb($barrel, $pid); + if (!$page->props['PID']) { + echo "failed to get Page $pid\n"; + exit(1); + } + + # produce HTML from POD + $pod = realpath($pod); + if (($tmpdir = System::mktemp('-d')) == false) { + $this->kill("Error : could not create temporary directory!"); + } + $content = shell_exec("cd $tmpdir && pod2html --htmlroot=FOODOCBASE --infile=".escapeshellarg($pod)); + $content = str_replace('