From: Daniel Karbach Date: Sun, 24 Feb 2013 21:19:52 +0000 (+0100) Subject: improved issues script and added wiki script X-Git-Url: https://git.localhorst.tv/?a=commitdiff_plain;h=a49be7b8db5f9c5c1073d0a3e3da62f99324d0f1;p=l2e.git improved issues script and added wiki script --- diff --git a/.gitignore b/.gitignore index 0473e9b..8661138 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ shots/ bin/* l2e.depend l2e.layout +wiki.html diff --git a/scripts/issues.php b/scripts/issues.php index 2e6c6b1..5d210aa 100755 --- a/scripts/issues.php +++ b/scripts/issues.php @@ -199,6 +199,11 @@ function writeTicket(CSVReader $csv, $filename) { array("\r\n", "\r", "\n"), array("\n", "\n", PHP_EOL), $description))); fputs($file, $description.PHP_EOL); fclose($file); + $updated = DateTime::createFromFormat( + 'm/d/Y h:i a', // 01/03/2013 05:56 am + $csv->getNamed('Updated'), + new DateTimeZone('Europe/Berlin'))->getTimestamp(); + touch($filename, $updated); } $dir = dirname(dirname(__FILE__)).'/issues'; @@ -229,7 +234,7 @@ while ($csv->next()) { 'm/d/Y h:i a', // 01/03/2013 05:56 am $csv->getNamed('Updated'), new DateTimeZone('Europe/Berlin'))->getTimestamp(); - if ($updated > ($modified - 60)) { + if ($updated > $modified) { echo 'updating: ', $filename, PHP_EOL; writeTicket($csv, $filepath); } diff --git a/scripts/wiki.sh b/scripts/wiki.sh new file mode 100755 index 0000000..9270e1b --- /dev/null +++ b/scripts/wiki.sh @@ -0,0 +1,3 @@ +#!/bin/sh +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )" +wget -O "$DIR"/wiki.html "http://luke/redmine/projects/l2e/wiki/export.html"