]> git.localhorst.tv Git - l2e.git/commitdiff
improved issues script and added wiki script
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Sun, 24 Feb 2013 21:19:52 +0000 (22:19 +0100)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Sun, 24 Feb 2013 21:19:52 +0000 (22:19 +0100)
.gitignore
scripts/issues.php
scripts/wiki.sh [new file with mode: 0755]

index 0473e9b08ce534bacd968cba1220ea3ab71010f0..8661138cc0ce90d5a0aa389cd29dd1767ebda089 100644 (file)
@@ -14,3 +14,4 @@ shots/
 bin/*
 l2e.depend
 l2e.layout
+wiki.html
index 2e6c6b181a5d19e50010c94be3c24d04ab061c49..5d210aaa8bac5221b470e67a5feafe351754f3c0 100755 (executable)
@@ -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 (executable)
index 0000000..9270e1b
--- /dev/null
@@ -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"