From 671e2af554be035ad937aadce4ef37797d794f63 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 18 Nov 2020 20:06:54 -0600 Subject: Initial commit --- gemshimfeed | 152 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 152 insertions(+) create mode 100644 gemshimfeed diff --git a/gemshimfeed b/gemshimfeed new file mode 100644 index 0000000..a3eb3c0 --- /dev/null +++ b/gemshimfeed @@ -0,0 +1,152 @@ +#!/bin/sh +# generate a Atom feed from a directory, recursively +# using POSIX sh +# AUTHOR: Case Duckworth +# LICENSE: MIT + +usage() { + cat < + +$FEED_TITLE +$FEED_SUBTITLE + + +$FEED_ID + +$ENTRY_URL + +$ENTRY_TITLE +$ENTRY_SUMMARY +$ENTRY_UPDATED +$ENTRY_AUTHOR + + +END +} + +main() { + CONFIGFILE="$PWD/gemshimfeed.conf.sh" + case "$1" in + -h) + usage + exit 0 + ;; + -c) + CONFIGFILE="$2" + shift 2 + ;; + esac + + . "$CONFIGFILE" || : + + atom_header + for DIR; do + for entry in $(recent_files "$DIR" -type f); do + if skip_file "$entry"; then continue; fi + + atom_entry "$entry" + done + done + atom_footer +} -- cgit 1.4.1-21-gabe81