+showUsage() {
+ cat <<'EOF'
+ USAGE:
+ cmd | bklog [ options ]
+
+ OPTIONS:
+ -h, --help
+ Display help information.
+ --version
+ Display script version.
+ -v, --verbose
+ Display debugging info.
+ -e, --encrypt
+ Encrypt output.
+ -r, --recipient [ string pubkey ]
+ Specify recipient. May be age or ssh pubkey.
+ May be specified multiple times for multiple pubkeys.
+ See https://github.com/FiloSottile/age
+ -o, --output [ path dir ]
+ Specify output directory to save logs. This option is required
+ to save log data.
+ -p, --process-string [ filter command ] [ output file extension]
+ Specify how to create and name a processed version of the stdin.
+ For example, if stdin is 'nmea' location data:
+
+ -p "gpsbabel -i nmea -f - -o gpx -F - " ".gpx"
+
+ This option would cause the stdin to 'bklog' to be piped into
+ the 'gpsbabel' command, interpreted as 'nmea' data, converted
+ into 'gpx' format, and then appended to the output tar file
+ as a file with a '.gpx' extension.
+ This option may be specified multiple times in order to output
+ results of multiple different processing methods.
+ -l, --label [ string ]
+ Specify a label to be included in all output file names.
+ Ex: 'location' if stdin is location data.
+ -w, --store-raw [ file extension ]
+ Specify file extension of file within output tar that contains
+ raw stdin data. The default behavior is to always save raw stdin
+ data in a '.stdin' file. Example usage when 'bklog' receives
+ 'nmea' data from 'gpspipe -r':
+
+ -w ".nmea"
+
+ Stdin data is saved in a '.nmea' file within the output tar.
+ -W, --no-store-raw
+ Do not store raw stdin in output tar.
+ -c, --compress
+ Compress output with gzip (before encryption if enabled).
+ -z, --time-zone
+ Specify time zone. (ex: "America/New_York")
+ -t, --temp-dir [path dir]
+ Specify parent directory for temporary working directory.
+ Default: "/dev/shm"
+ -R, --recipient-dir [path dir]
+ Specify directory containing files whose first lines are
+ to be interpreted as pubkey strings (see '-r' option). Only
+ one directory may be specified.
+ -b, --buffer-ttl [integer]
+ Specify custom buffer period in seconds (default: 300 seconds)
+ -B, --script-ttl [time element string]
+ Specify custom script time-to-live in seconds (default: "day")
+ Valid values: "day", "hour"
+
+ EXAMPLE: (bash script lines)
+ $ gpspipe -r | /bin/bash bklog -v -e -c -z "UTC" -t "/dev/shm" \
+ -r age1mrmfnwhtlprn4jquex0ukmwcm7y2nxlphuzgsgv8ew2k9mewy3rs8u7su5 \
+ -r age1ala848kqrvxc88rzaauc6vc5v0fqrvef9dxyk79m0vjea3hagclswu0lgq \
+ -R ~/.config/bklog/recipients -w ".nmea" -b 300 -B "day" \
+ -o ~/Sync/Logs -l "location" \
+ -p "gpsbabel -i nmea -f - -o gpx -F - " ".gpx" \
+ -p "gpsbabel -i nmea -f - -o kml -F - " ".kml"
+EOF
+} # Display information on how to use this script.