cvs: docweb /scripts gen_picture_info.php generation.sh rev.php

From: Date: Mon, 01 Nov 2004 10:36:22 +0000
Subject: cvs: docweb /scripts gen_picture_info.php generation.sh rev.php
Groups: php.doc.web 
Request: Send a blank email to doc-web+get-410@lists.php.net to get a copy of this message
nlopess Mon Nov 1 05:36:22 2004 EDT Modified files: /docweb/scripts gen_picture_info.php generation.sh rev.php Log: simplify the cron scripts use a central place to store the available languages http://cvs.php.net/diff.php/docweb/scripts/gen_picture_info.php?r1=1.7&r2=1.8&ty=u Index: docweb/scripts/gen_picture_info.php diff -u docweb/scripts/gen_picture_info.php:1.7 docweb/scripts/gen_picture_info.php:1.8 --- docweb/scripts/gen_picture_info.php:1.7 Sun Oct 31 20:20:25 2004 +++ docweb/scripts/gen_picture_info.php Mon Nov 1 05:36:17 2004 @@ -1,5 +1,5 @@ <?php -/* $Id: gen_picture_info.php,v 1.7 2004/11/01 01:20:25 didou Exp $ */ +/* $Id: gen_picture_info.php,v 1.8 2004/11/01 10:36:17 nlopess Exp $ */ include '../include/jpgraph/jpgraph.php'; include '../include/jpgraph/jpgraph_pie.php'; @@ -12,8 +12,16 @@ $self = array_shift($argv); $TYPE = array_shift($argv); // Type of documentation +$LANGS = $argv; -foreach( $argv as $lang ) { +// generate all languages +if (count($LANGS) == 0) { + include "../include/lib_proj_lang.inc.php"; + $LANGS = array_keys($LANGUAGES); +} + + +foreach ($LANGS as $lang) { if (!generation_image($TYPE, $lang) ) { echo "The $TYPE documentation for $lang language don't exist.\n"; } else { http://cvs.php.net/diff.php/docweb/scripts/generation.sh?r1=1.3&r2=1.4&ty=u Index: docweb/scripts/generation.sh diff -u docweb/scripts/generation.sh:1.3 docweb/scripts/generation.sh:1.4 --- docweb/scripts/generation.sh:1.3 Sun Oct 31 20:20:25 2004 +++ docweb/scripts/generation.sh Mon Nov 1 05:36:17 2004 @@ -7,32 +7,32 @@ # PHP echo "Generating PHP database" -/usr/bin/php4 -q ./rev.php php pt_BR zh hk tw cs nl fi fr de el he hu it kr pl ro ru sk sl es sv tr ja +php -q ./rev.php php echo "... done." echo "Generating PHP pictures" -/usr/bin/php4 -q ./gen_picture_info.php php pt_BR zh hk tw cs nl fi fr de el he hu it kr pl ro ru sk sl es sv tr ja +php -q ./gen_picture_info.php php echo "... done" # PEAR echo "Generating PEAR database" -/usr/bin/php4 -q ./rev.php pear nl fr hu ru ja +php -q ./rev.php pear echo "... done." echo "Generating PEAR pictures" -/usr/bin/php4 -q ./gen_picture_info.php pear pt_BR zh hk tw cs nl fi fr de el he hu it kr pl ro ru sk sl es sv tr ja +php -q ./gen_picture_info.php pear echo "... done" # SMARTY echo "Generating SMARTY database" -/usr/bin/php4 -q ./rev.php smarty pt_BR fr de ru +php -q ./rev.php smarty echo "... done." echo "Generating SMARTY pictures" -/usr/bin/php4 -q ./gen_picture_info.php smarty pt_BR zh hk tw cs nl fi fr de el he hu it kr pl ro ru sk sl es sv tr ja +php -q ./gen_picture_info.php smarty echo "... done" echo "Generating global graphs" -/usr/bin/php4 -q ./gen_picture_info_all_lang.php +php -q ./gen_picture_info_all_lang.php echo "... done" http://cvs.php.net/diff.php/docweb/scripts/rev.php?r1=1.8&r2=1.9&ty=u Index: docweb/scripts/rev.php diff -u docweb/scripts/rev.php:1.8 docweb/scripts/rev.php:1.9 --- docweb/scripts/rev.php:1.8 Sun Oct 31 20:20:26 2004 +++ docweb/scripts/rev.php Mon Nov 1 05:36:17 2004 @@ -32,10 +32,10 @@ // keep this call, we need it $self = array_shift($argv); -if ($argc < 3) { +if ($argc < 2) { ?> Usage: - <?php echo $self;?> type lang1 [lang2 [lang3 [..]]] + <?php echo $self;?> type [lang1 [lang2 [lang3 [..]]]] Checks the revision of translated files against the actual english xml files, and create an sqlite database to generate statisctics @@ -75,6 +75,12 @@ // $argv was shifted before $LANGS = $argv; +// generate all languages +if (count($LANGS) == 0) { + include "../include/lib_proj_lang.inc.php"; + $LANGS = array_keys($LANGUAGES); +} + // Test the languages : $langc = count($LANGS); for ($i = 0; $i < $langc; $i++) {

« previous php.doc.web (#410) next »