From 85e4fd5e7bf8f7df622f1b31b5fdeb40ffdc521d Mon Sep 17 00:00:00 2001 From: paul Date: Thu, 22 Sep 2011 01:01:02 +0000 Subject: [PATCH] basic user interface for creating a task svn path=/trunk/; revision=12 --- Tasks.css | 17 ++++++++++++ Tasks.page | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+) create mode 100644 Tasks.css create mode 100644 Tasks.page diff --git a/Tasks.css b/Tasks.css new file mode 100644 index 0000000..e7b8f24 --- /dev/null +++ b/Tasks.css @@ -0,0 +1,17 @@ +.Task{ + margin: .5em; + width: 95%; + background-color: #DDF; + color: #000; + padding: .5em; + border-width: 1px; + border-color: #00A; + border-style: solid solid solid solid; +} +.Task h1{ + margin: 0em; + text-size: 2em; +} +.Task div{ + position: absolute; +} diff --git a/Tasks.page b/Tasks.page new file mode 100644 index 0000000..6274be8 --- /dev/null +++ b/Tasks.page @@ -0,0 +1,81 @@ +#!/bin/zsh + +info="$(egrep -o '(^|&)(i=)[0-9]{10}_[0-9]{3}(&|$)' <<<"${QUERY_STRING}" |tr -d '&i=')" +edit="$(egrep -o '(^|&)(e=)[0-9]{10}_[0-9]{3}(&|$)' <<<"${QUERY_STRING}" |tr -d '&e=')" +search="$(egrep -o '(^|&)(s=).+(&|$)' <<<"${QUERY_STRING}" |sed -r 's:^&?s=::;s:\+: :g;s:%:\\x:g')" +search="$(echo -e "${search}" |sed 's:\t: :g;s:\r::g;s:\\:\\\\:g' |head -n1)" +new="$(egrep -o '(^|&)(n=).+(&|$)' <<<"${QUERY_STRING}" |sed -r 's:^&?n=::;s:\+: :g;s:%:\\x:g')" +new="$(echo -e "${new}" |sed 's:\t: :g;s:\r::g;s:\\:\\\\:g' |head -n1)" + +cat < +
+ +
+ +
+
+TasksEND +if [ -n "$search" ]; then + echo "

Tasks search results for: $search

" + for each in $(grep -ile "$search" Tasks/<0000000000-9999999999>_<000-999>.task); do + id=$(sed -r 's:^.*/::;s:.task$::' <<<$each) + echo "' + done + echo '
' +fi +echo '
' + +[ -n "$new" ] && cat < +

$new

+ + +
+ Description:
+ +
+ Section:
+
+ other section:
+ + +
+ +TaskEnd + +[ -z "$new" ] && stat -c '' Tasks/<0000000000-9999999999>_<000-999>.meta && for each in Tasks/<0000000000-9999999999>_<000-999>.meta(.om); do + headline="$(egrep -x 'headline=.+' "$each" |sed 's:headline=::')" + status="$(egrep -x 'status=.+' "$each" |sed 's:status=::')" + section="$(egrep -x 'section=.+' "$each" |sed 's:section=::')" + attendant="$(egrep -x 'attendant=.+' "$each" |sed 's:attendant=::')" + cat < + $headline
+ Status: $status + Section: $Section + Attendant: $attendant +
+TasksEND +done + +echo ' ' -- 2.39.2