From a0a4920deaf4ca645cdfee45edf00e614369882f Mon Sep 17 00:00:00 2001 From: dzwdz Date: Thu, 25 May 2023 21:54:37 +0200 Subject: initial commit --- src/atom.sh | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 src/atom.sh (limited to 'src/atom.sh') diff --git a/src/atom.sh b/src/atom.sh new file mode 100644 index 0000000..cf694b3 --- /dev/null +++ b/src/atom.sh @@ -0,0 +1,41 @@ +#!/bin/sh +# adapted from https://git.segvallday.org/ass2atom/file/ass2atom.html +# 0BSD License - Full text at the bottom of this file + +echo "" +echo "" +echo "dzwdz" +echo "$(date -Iseconds)" +echo "urn:uuid:677e5055-07e1-43d6-bd58-fda18d3c5277" + +to_atom_entry() { + while read line; do + entry_date=$(echo "$line" | cut -f1) + entry_url=$(echo "$line" | cut -f2) + entry_title=$(echo "$line" | cut -f3) + echo "" + echo "$entry_title" + echo "" + echo "${entry_date}T00:00Z" + echo "${entry_url}?${entry_date}" + echo "" + done +} + +grep -e "^[^#]" | sort -r | to_atom_entry +echo '' + +# BSD Zero Clause License +# +# Copyright (c) 2023 segvallday, adapted by dzwdz +# +# Permission to use, copy, modify, and/or distribute this software for any +# purpose with or without fee is hereby granted. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +# AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +# OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +# PERFORMANCE OF THIS SOFTWARE. -- cgit 1.4.1-2-gfad0