bugfix: esc
This commit is contained in:
parent
83beaa3ad5
commit
caec86c5a0
@ -5,7 +5,6 @@
|
|||||||
|
|
||||||
# Functions
|
# Functions
|
||||||
|
|
||||||
# parse
|
|
||||||
# Time-zone aware parsing of the date/date-time entry at the current record.
|
# Time-zone aware parsing of the date/date-time entry at the current record.
|
||||||
#
|
#
|
||||||
# @local variables: dt
|
# @local variables: dt
|
||||||
@ -24,7 +23,6 @@ function parse( dt) {
|
|||||||
dt gensub(/^([0-9]{8})T([0-9]{2})([0-9]{2})([0-9]{2})(Z)?$/, "\\1 \\2:\\3:\\4\\5", "g", $NF)
|
dt gensub(/^([0-9]{8})T([0-9]{2})([0-9]{2})([0-9]{2})(Z)?$/, "\\1 \\2:\\3:\\4\\5", "g", $NF)
|
||||||
}
|
}
|
||||||
|
|
||||||
# parse_duration
|
|
||||||
# Map iCalendar duration specification into the format to be used in date (1).
|
# Map iCalendar duration specification into the format to be used in date (1).
|
||||||
#
|
#
|
||||||
# @local variables: dt, dta, i, n, a, seps
|
# @local variables: dt, dta, i, n, a, seps
|
||||||
@ -45,7 +43,6 @@ function parse_duration(duration, dt, dta, i, n, a, seps) {
|
|||||||
return dt
|
return dt
|
||||||
}
|
}
|
||||||
|
|
||||||
# fn
|
|
||||||
# Get relative file path.
|
# Get relative file path.
|
||||||
#
|
#
|
||||||
# @local variables: n, a
|
# @local variables: n, a
|
||||||
@ -56,7 +53,6 @@ function fn(path, n, a) {
|
|||||||
return a[n-1] "/" a[n]
|
return a[n-1] "/" a[n]
|
||||||
}
|
}
|
||||||
|
|
||||||
# title
|
|
||||||
# Generate title string that will be displayed to user. Here, the start date
|
# Generate title string that will be displayed to user. Here, the start date
|
||||||
# gets a monthly resolution.
|
# gets a monthly resolution.
|
||||||
#
|
#
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
|
|
||||||
# Functions
|
# Functions
|
||||||
|
|
||||||
# allday
|
|
||||||
# Return line for all-day event.
|
# Return line for all-day event.
|
||||||
#
|
#
|
||||||
# @input collection: Collection symbol
|
# @input collection: Collection symbol
|
||||||
@ -20,7 +19,6 @@ function allday(collection, desc) {
|
|||||||
return collection " " ITALIC FAINT " (allday) " OFF desc
|
return collection " " ITALIC FAINT " (allday) " OFF desc
|
||||||
}
|
}
|
||||||
|
|
||||||
# endstoday
|
|
||||||
# Return line for multi-day event, or event that starts at midnight, which ends today.
|
# Return line for multi-day event, or event that starts at midnight, which ends today.
|
||||||
#
|
#
|
||||||
# @input stop: Time at which the event ends
|
# @input stop: Time at which the event ends
|
||||||
@ -31,7 +29,6 @@ function endstoday(stop, collection, desc) {
|
|||||||
return collection " " CYAN " -- " stop OFF ": " desc
|
return collection " " CYAN " -- " stop OFF ": " desc
|
||||||
}
|
}
|
||||||
|
|
||||||
# slice
|
|
||||||
# Return line for event that starts sometime today.
|
# Return line for event that starts sometime today.
|
||||||
#
|
#
|
||||||
# @input start: Time at which the event starts
|
# @input start: Time at which the event starts
|
||||||
@ -46,7 +43,6 @@ function slice(start, stop, collection, desc) {
|
|||||||
return collection " " CYAN start OFF " -- " CYAN stop OFF ": " desc
|
return collection " " CYAN start OFF " -- " CYAN stop OFF ": " desc
|
||||||
}
|
}
|
||||||
|
|
||||||
# hrline
|
|
||||||
# Print line for a single hour entry.
|
# Print line for a single hour entry.
|
||||||
#
|
#
|
||||||
# @input hour: Hour of the entry
|
# @input hour: Hour of the entry
|
||||||
@ -55,7 +51,6 @@ function hrline(hour) {
|
|||||||
print today, hour, "", "", "", " " FAINT hour ":00 ----------------------" OFF
|
print today, hour, "", "", "", " " FAINT hour ":00 ----------------------" OFF
|
||||||
}
|
}
|
||||||
|
|
||||||
# hrlines
|
|
||||||
# Print lines for hour entries before an event that starts at `start` and stops
|
# Print lines for hour entries before an event that starts at `start` and stops
|
||||||
# at `stop`.
|
# at `stop`.
|
||||||
#
|
#
|
||||||
|
@ -5,20 +5,18 @@
|
|||||||
|
|
||||||
# Functions
|
# Functions
|
||||||
|
|
||||||
# escape
|
|
||||||
# Escape string to be used as content in iCalendar files.
|
# Escape string to be used as content in iCalendar files.
|
||||||
#
|
#
|
||||||
# @input str: String to escape
|
# @input str: String to escape
|
||||||
# @return: Escaped string
|
# @return: Escaped string
|
||||||
function escape(str)
|
function escape(str)
|
||||||
{
|
{
|
||||||
gsub("\\\\", "\\\\", str)
|
gsub("\\\\", "\\\\", str)
|
||||||
gsub(";", "\\\\;", str)
|
gsub(";", "\\;", str)
|
||||||
gsub(",", "\\\\,", str)
|
gsub(",", "\\,", str)
|
||||||
return str
|
return str
|
||||||
}
|
}
|
||||||
|
|
||||||
# print_fold
|
|
||||||
# Print property with its content and fold according to the iCalendar
|
# Print property with its content and fold according to the iCalendar
|
||||||
# specification.
|
# specification.
|
||||||
#
|
#
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
|
|
||||||
# Functions
|
# Functions
|
||||||
|
|
||||||
# parse
|
|
||||||
# Time-zone aware parsing of the date/date-time entry at the current record.
|
# Time-zone aware parsing of the date/date-time entry at the current record.
|
||||||
#
|
#
|
||||||
# @local variables: dt
|
# @local variables: dt
|
||||||
@ -27,7 +26,6 @@ function parse( dt) {
|
|||||||
dt gensub(/^([0-9]{8})T([0-9]{2})([0-9]{2})([0-9]{2})(Z)?$/, "\\1 \\2:\\3:\\4\\5", "g", $NF)
|
dt gensub(/^([0-9]{8})T([0-9]{2})([0-9]{2})([0-9]{2})(Z)?$/, "\\1 \\2:\\3:\\4\\5", "g", $NF)
|
||||||
}
|
}
|
||||||
|
|
||||||
# parse_duration
|
|
||||||
# Map iCalendar duration specification into the format to be used in date (1).
|
# Map iCalendar duration specification into the format to be used in date (1).
|
||||||
#
|
#
|
||||||
# @local variables: dt, dta, i, n, a, seps
|
# @local variables: dt, dta, i, n, a, seps
|
||||||
@ -48,7 +46,6 @@ function parse_duration(duration, dt, dta, i, n, a, seps) {
|
|||||||
return dt
|
return dt
|
||||||
}
|
}
|
||||||
|
|
||||||
# print_data
|
|
||||||
# Print string of parsed data.
|
# Print string of parsed data.
|
||||||
#
|
#
|
||||||
# @local variables: cmd, collection, depth, path
|
# @local variables: cmd, collection, depth, path
|
||||||
|
@ -8,16 +8,15 @@
|
|||||||
|
|
||||||
# Functions
|
# Functions
|
||||||
|
|
||||||
# escape
|
|
||||||
# Escape string to be used as content.
|
# Escape string to be used as content.
|
||||||
#
|
#
|
||||||
# @input str: Content string
|
# @input str: Content string
|
||||||
# @return: Escaped string
|
# @return: Escaped string
|
||||||
function escape(str)
|
function escape(str)
|
||||||
{
|
{
|
||||||
gsub("\\\\", "\\\\", str)
|
gsub("\\\\", "\\\\", str)
|
||||||
gsub(";", "\\\\;", str)
|
gsub(";", "\\;", str)
|
||||||
gsub(",", "\\\\,", str)
|
gsub(",", "\\,", str)
|
||||||
return str
|
return str
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,20 +3,18 @@
|
|||||||
|
|
||||||
# Functions
|
# Functions
|
||||||
|
|
||||||
# escape
|
|
||||||
# Escape string to be used as content in iCalendar files.
|
# Escape string to be used as content in iCalendar files.
|
||||||
#
|
#
|
||||||
# @input str: String to escape
|
# @input str: String to escape
|
||||||
# @return: Escaped string
|
# @return: Escaped string
|
||||||
function escape(str)
|
function escape(str)
|
||||||
{
|
{
|
||||||
gsub("\\\\", "\\\\", str)
|
gsub("\\\\", "\\\\", str)
|
||||||
gsub(";", "\\\\;", str)
|
gsub(";", "\\;", str)
|
||||||
gsub(",", "\\\\,", str)
|
gsub(",", "\\,", str)
|
||||||
return str
|
return str
|
||||||
}
|
}
|
||||||
|
|
||||||
# print_fold
|
|
||||||
# Print property with its content and fold according to the iCalendar
|
# Print property with its content and fold according to the iCalendar
|
||||||
# specification.
|
# specification.
|
||||||
#
|
#
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
|
|
||||||
# Functions
|
# Functions
|
||||||
|
|
||||||
# c
|
|
||||||
# Compose line that will display a day in the week.
|
# Compose line that will display a day in the week.
|
||||||
#
|
#
|
||||||
# @return: Single-line string
|
# @return: Single-line string
|
||||||
|
Loading…
Reference in New Issue
Block a user