switch to day view
This commit is contained in:
@@ -38,8 +38,10 @@ function print_data(start, dur, end, summary, cmd, collection) {
|
||||
gsub("\\\\;", ";", summary);
|
||||
gsub("\\\\\\\\", "\\", summary);
|
||||
depth = split(FILENAME, path, "/");
|
||||
fpath = path[depth-1] "/" path[depth]
|
||||
collection = depth > 1 ? path[depth-1] : "";
|
||||
collection = collection in collection2label ? collection2label[collection] : collection;
|
||||
collection = collection2label[path[depth-1]]
|
||||
end = dur ? start " " end : end
|
||||
cmd = "date -d '" start "' +\"%s\""
|
||||
cmd | getline start
|
||||
@@ -47,7 +49,7 @@ function print_data(start, dur, end, summary, cmd, collection) {
|
||||
cmd = "date -d '" end "' +\"%s\""
|
||||
cmd | getline end
|
||||
close(cmd)
|
||||
print start, end, collection, summary
|
||||
print start, end, fpath, collection, summary
|
||||
}
|
||||
|
||||
BEGIN {
|
||||
@@ -58,13 +60,6 @@ BEGIN {
|
||||
split(mapping[map], m, "=");
|
||||
collection2label[m[1]] = m[2];
|
||||
}
|
||||
# Colors
|
||||
GREEN = "\033[1;32m";
|
||||
RED = "\033[1;31m";
|
||||
WHITE = "\033[1;97m";
|
||||
CYAN = "\033[1;36m";
|
||||
FAINT = "\033[2m";
|
||||
OFF = "\033[m";
|
||||
}
|
||||
/^END:VEVENT/ && inside { print_data(start, dur, end, summary, cmd, collection); exit }
|
||||
/^DTSTART/ && inside { start = parse( dt) }
|
||||
|
Reference in New Issue
Block a user