diff options
Diffstat (limited to 'scripts/generate_post_summary_xml.sh')
-rwxr-xr-x | scripts/generate_post_summary_xml.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/scripts/generate_post_summary_xml.sh b/scripts/generate_post_summary_xml.sh new file mode 100755 index 0000000..b409209 --- /dev/null +++ b/scripts/generate_post_summary_xml.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash +# Generate HTML post summary tags + +ORGIN=${1} +GENERATED_PREVIEW_FILE=${2} +PROJ_ROOT=$(git rev-parse --show-toplevel) + +source ${PROJ_ROOT}/scripts/org-metadata.sh +DISPLAY_DATE=$(date -d ${DATE} +'%a %b %d, %Y') +SORT_DATE=$(date -d ${DATE} +'%Y %m %d ') +PREVIEW_CONTENT=$(cat ${GENERATED_PREVIEW_FILE} | pandoc -f org -t html) + +echo -n "${SORT_DATE}" +echo -n "<item>" +echo -n "<title>${TITLE}</title>" +echo -n "<link>https://kennyballou.com${SLUG}</link>" +echo -n "<guid>${SLUG}</guid>" +echo -n "<pubDate>${DISPLAY_DATE}</pubDate>" +echo -n "<description>${DESCRIPTION}</description>" +echo -n "</item>" +echo "" |