improvement: externalized files

This commit is contained in:
2025-06-18 13:49:56 +02:00
parent 8970e89cc0
commit 5a3668d6a9
20 changed files with 1114 additions and 1339 deletions

View File

@@ -3,40 +3,7 @@
##
## @assign uid: UID to use
# Functions
# Escape string to be used as content in iCalendar files.
#
# @input str: String to escape
# @return: Escaped string
function escape(str)
{
gsub("\\\\", "\\\\", str)
gsub(";", "\\;", str)
gsub(",", "\\,", str)
return str
}
# Print property with its content and fold according to the iCalendar
# specification.
#
# @local variables: i, s
# @input nameparam: Property name with optional parameters
# @input content: Escaped content
function print_fold(nameparam, content, i, s)
{
i = 74 - length(nameparam)
s = substr(content, 1, i)
print nameparam s
s = substr(content, i+1, 73)
i = i + 73
while (s)
{
print " " s
s = substr(content, i+1, 73)
i = i + 73
}
}
@include "lib/awk/icalendar.awk"
# AWK program
BEGIN {