Browse Source

ical2org.awk: Place date below properties

Affects only the case condense=0.  This is following the rules for a
valid org.
Marco Wahl 10 months ago
parent
commit
6bf5eb3517
1 changed files with 3 additions and 2 deletions
  1. 3 2
      code/awk/ical2org.awk

+ 3 - 2
code/awk/ical2org.awk

@@ -269,7 +269,7 @@ BEGIN {
         if (condense)
             print "* <" date "> " gensub("^[ ]+", "", "", gensub("\\\\,", ",", "g", gensub("\\\\n", " ", "g", summary)))
         else
-            print "* " gensub("^[ ]+", "", "", gensub("\\\\,", ",", "g", gensub("\\\\n", " ", "g", summary))) "\n<" date ">"
+            print "* " gensub("^[ ]+", "", "", gensub("\\\\,", ",", "g", gensub("\\\\n", " ", "g", summary)))
         print ":PROPERTIES:"
         print     ":ID:       " id
         if(length(location))
@@ -277,7 +277,8 @@ BEGIN {
         if(length(status))
             print ":STATUS:   " status
         print ":END:"
-
+        if (! condense)
+            print "<" date ">"
         print ""
         # translate \n sequences to actual newlines and unprotect commas (,)
         if(length(entry)>1)