From a49be7b8db5f9c5c1073d0a3e3da62f99324d0f1 Mon Sep 17 00:00:00 2001 From: Daniel Karbach Date: Sun, 24 Feb 2013 22:19:52 +0100 Subject: [PATCH] improved issues script and added wiki script --- .gitignore | 1 + scripts/issues.php | 7 ++++++- scripts/wiki.sh | 3 +++ 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100755 scripts/wiki.sh 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" -- 2.39.2