#!/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.