summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeon Rische <leon.rische@me.com>2020-10-03 16:04:53 +0200
committerLeon Rische <leon.rische@me.com>2020-10-03 16:04:53 +0200
commit32a7d992644386f0c9aac55608edd692c9be09a8 (patch)
tree6832725322d69d9e619d69a8910bdcb25073590a
parent4e189b3916b846c1e14ee57642248350234055c3 (diff)
Print file header for all files
-rw-r--r--awk/index.awk20
1 files changed, 5 insertions, 15 deletions
diff --git a/awk/index.awk b/awk/index.awk
index eacb659..257b489 100644
--- a/awk/index.awk
+++ b/awk/index.awk
@@ -33,15 +33,14 @@ BEGINFILE {
parent_tags[0] = "";
state = state_file;
- # Track if we've printed the file "header"
- file_needs_opening = 1;
- file_needs_closing = 0;
+ print " (" \
+ ":path " escape_string(FILENAME) \
+ " :title " (file_title ? escape_string(file_title) : "nil") \
+ " :cards (";
}
ENDFILE {
- if (file_needs_closing) {
- print " ))";
- }
+ print " ))";
}
## File Tags
@@ -112,15 +111,6 @@ $0 ~ review_data_drawer {
if (state == state_properties) {
state = state_properties_done;
} else if (state == state_review_data) {
- if (file_needs_opening) {
- print " (" \
- ":path " escape_string(FILENAME) \
- " :title " (file_title ? escape_string(file_title) : "nil") \
- " :cards (";
- file_needs_opening = 0;
- file_needs_closing = 1;
- }
-
state = state_review_data_done;
# Card header
inherited_tags = "";