handle split class

master
Y 2019-12-02 08:51:53 +01:00
parent 0154918c71
commit 86887ac7a3
1 changed files with 6 additions and 6 deletions

View File

@ -52,8 +52,8 @@ ENDOFTEXT
| awk -vmon=$mon -vtue=$tue -vwed=$wed -vthu=$thu -vfri=$fri -vid="epsi2ics/${1}@${HOSTNAME}" -vdtstamp=$dtstamp -F$'\t' '
function out() {
if (from!="" && to!="" && ase!="") printf( \
"BEGIN:VEVENT\nUID:%s/%s\nDTSTAMP:%s\nDTSTART:%s\nDTEND:%s\nSUMMARY:%s\nLOCATION:%s\nDESCRIPTION:🗣 %s 👥 %s\nEND:VEVENT\n", \
from, id, dtstamp, from, to, ase, where, prof, who)
"BEGIN:VEVENT\nUID:%s/%s/%s\nDTSTAMP:%s\nDTSTART:%s\nDTEND:%s\nSUMMARY:%s\nLOCATION:%s\nDESCRIPTION:🗣 %s 👥 %s\nEND:VEVENT\n", \
from, id, prof, dtstamp, from, to, ase, where, prof, who)
from=""
to=""
ase=""
@ -79,10 +79,10 @@ ENDOFTEXT
/class="Case"/ {
out()
pc=gensub(".*left *: *([0-9]+)[%.].*", "\\1", 1)
if (pc < 110) tmpd=mon
else if (pc < 130) tmpd=tue
else if (pc < 150) tmpd=wed
else if (pc < 170) tmpd=thu
if (pc < 115) tmpd=mon
else if (pc < 135) tmpd=tue
else if (pc < 155) tmpd=wed
else if (pc < 175) tmpd=thu
else tmpd=fri
day=substr(tmpd, 1, 9)
zoneH=substr(tmpd, 10, 3)+0