summaryrefslogtreecommitdiff
path: root/awk
diff options
context:
space:
mode:
authorLeon Rische <leon.rische@me.com>2020-04-29 23:42:18 +0200
committerLeon Rische <leon.rische@me.com>2020-05-01 14:13:20 +0200
commitba0307070ccccdd195a96af9214b69340beecb1d (patch)
tree9b4e64f67f45b71275a5a71ec5b15824ae9d2072 /awk
parent7fd070d98a0425fa9f74fa6fd70074a1dd1fabde (diff)
Filter due cards in position indexer
Diffstat (limited to 'awk')
-rw-r--r--awk/filter_due.awk8
-rw-r--r--awk/index_positions.awk6
2 files changed, 5 insertions, 9 deletions
diff --git a/awk/filter_due.awk b/awk/filter_due.awk
deleted file mode 100644
index 0406847..0000000
--- a/awk/filter_due.awk
+++ /dev/null
@@ -1,8 +0,0 @@
-BEGIN {
- FS="\t";
- now = strftime("%FT%TZ", systime(), 1);
-}
-
-$4 == "0" && $9 < now {
- print $0
-}
diff --git a/awk/index_positions.awk b/awk/index_positions.awk
index 36e9cbe..e409f52 100644
--- a/awk/index_positions.awk
+++ b/awk/index_positions.awk
@@ -1,5 +1,6 @@
BEGIN {
FS="|";
+ now = strftime("%FT%TZ", systime(), 1);
fc_tag = ":" or_default(fc_tag, "fc") ":";
suspended_tag = ":" or_default(suspended_tag, "suspended") ":";
@@ -64,6 +65,9 @@ in_data && /^\|.*\|$/ {
box = trim($4);
interval = trim($5);
due = trim_surrounding($6);
- print FILENAME "\t" id "\t" type "\t" suspended "\t" position "\t" ease "\t" box "\t" interval "\t" due;
+
+ if (!(filter_due == "1") || (due < now && suspended == "0")) {
+ print FILENAME "\t" id "\t" type "\t" suspended "\t" position "\t" ease "\t" box "\t" interval "\t" due "\t" inherited_tags "\t" local_tags;
+ }
}
}