update the man page accordingly to the latest changes - ics2txt - convert icalendar .ics file to plain text
(HTM) git clone git://bitreich.org/ics2txt git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/ics2txt
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Tags
(DIR) README
---
(DIR) commit d7db0e47dcfa9f3445f560d8cfebc75189e87fa4
(DIR) parent fef052ed4c0f485f6c87b75555dc2df664bb602e
(HTM) Author: Josuah Demangeon <me@josuah.net>
Date: Wed, 24 Jun 2020 23:12:40 +0200
update the man page accordingly to the latest changes
Diffstat:
M ics2txt.1 | 33 ++++++++++++++++++-------------
1 file changed, 19 insertions(+), 14 deletions(-)
---
(DIR) diff --git a/ics2txt.1 b/ics2txt.1
@@ -34,21 +34,21 @@ write to stdout.
.Pp
.The
.Pa file.tsv
-files have one line per event, all with the following fields,
-separated by one tab:
-.
-.Bl -offset 1n -width 1n -enum -compact
-.It
-Begining (epoch)
-.It
-End (epoch)
-.It
+have one line per event, with the first line declaring fields order
+and presence, among:
+.
+.Bl -tag -width xxxxx -offset 1n -compact
+.It Dq beg
+Begining of event (epoch)
+.It Dq end
+End of event (epoch)
+.It Dq cat
Category
-.It
+.It Dq loc
Location
-.It
+.It Dq sum
Summary
-.It
+.It Dq des
Description
.El
.
@@ -59,7 +59,7 @@ Convert a calendar from HTTP
.Pa .ics
to custom
.Pa .txt
-sorted by beginning date:
+sorted by start date:
.Dl curl "$url.ics" | ics2tsv | sort -n -k 1,1 | tsv2txt
.
.Pp
@@ -75,7 +75,12 @@ Split an
.ics
file according to the category, saved as
.Pa .tsv :
-.Dl tcal2tsv cal.txt | awk -F '\et' '{ f = $3".tsv"; print >>f }'
+.Bd -literal
+ics2tsv cal.txt | awk -F '\et' '
+ NR == 1 { for (i = 1; i <= NF; i++) F[$i] = i; next }
+ { print >>($F["cat"]".tsv") }
+\'
+.Ed
.
.
.Sh SEE ALSO