X-Git-Url: http://git.plutz.net/?p=busy;a=blobdiff_plain;f=Tasks.page;h=7ca263d5b08cf9901e8630af5bac2d3bb149493d;hp=20f5e0f776bdb04b011b1451a6e8f4a6cf49c6e8;hb=f519a60fe642332db20d13b6d199861a9a689f50;hpb=09f3ddead92e8716eabbe3e4dccd415c5a3472b0 diff --git a/Tasks.page b/Tasks.page index 20f5e0f..7ca263d 100644 --- a/Tasks.page +++ b/Tasks.page @@ -1,6 +1,6 @@ #!/bin/zsh -info="$(sed -rn 's:(^|.*&)i=([0-9]{10}_[0-9]{3}).*|.*:\2:;s:&.*::' <<<"${QUERY_STRING}")" +info="$(sed -r 's:(^|.*&)i=([0-9]{10}_[0-9]{3}).*|.*:\2:;s:&.*::' <<<"${QUERY_STRING}")" edit="$(sed -r 's:(^|.*&)e=([0-9]{10}_[0-9]{3}).*|.*:\2:;s:&.*::' <<<"${QUERY_STRING}")" search="$(sed -r 's:(^|.*&)s=(.*)|.*:\2:;s:&.*::;s:\+: :g;s:%:\\x:g' <<<"${QUERY_STRING}")" search="$(echo -e "${search}" |sed -rn '1{s:\t: :g;s:\r::g;s:\\:\\\\:g;p}')" @@ -28,7 +28,34 @@ if [ -n "$search" ]; then fi echo '
' -[ -n "$new" ] && cat < +
+

$headline

+ $(_wiki "$datafile") +
+ + + + +
Status
+ $taskstatus
Section
+ $section
Attendant
+ $attendant
+
+TasksEND +fi + +[ -z "$info" -a -n "$new" ] && cat <

$new

@@ -50,12 +77,14 @@ echo '
' TaskEnd -[ -z "$new" ] && stat -c '' Tasks/<0000000000-9999999999>_<000-999>.meta && for each in Tasks/<0000000000-9999999999>_<000-999>.meta(.om); do +[ -z "$info" -a -z "$new" ] && stat -c '' Tasks/<0000000000-9999999999>_<000-999>.meta && for each in Tasks/<0000000000-9999999999>_<000-999>.meta(.om); do info="$(basename "$each" |sed 's:.meta$::')" headline="$(sed -rn '/^headline=/{s:^[a-z]+=(.+)$:\1:p;q}' "$each")" taskstatus="$(sed -rn '/^status=/{s:^[a-z]+=(.+)$:\1:p;q}' "$each")" section="$(sed -rn '/^section=/{s:^[a-z]+=(.+)$:\1:p;q}' "$each")" attendant="$(sed -rn '/^attendant=/{s:^[a-z]+=(.+)$:\1:p;q}' "$each")" + [ -z "$section" ] && section='(none)' + [ -z "$attendant" ] && attendant='(none)' cat < $headline