aboutsummaryrefslogtreecommitdiff
path: root/scripts/generate_post_summary_xml.sh
diff options
context:
space:
mode:
authorKenny Ballou <kballou@devnulllabs.io>2018-08-17 22:30:27 -0600
committerKenny Ballou <kballou@devnulllabs.io>2018-08-19 08:11:29 -0600
commitc818f2b61c75195cf7adb542dd443e37feea7b59 (patch)
tree6f7c89e834e1973209187abd668eaa360cb367a6 /scripts/generate_post_summary_xml.sh
parent28da2aee6b587e751d1ee60d9da80d9c9f200181 (diff)
downloadblog.kennyballou.com-c818f2b61c75195cf7adb542dd443e37feea7b59.tar.gz
blog.kennyballou.com-c818f2b61c75195cf7adb542dd443e37feea7b59.tar.xz
Convert to Org-mode and Pandoc
Create some fairly straight-forward conversion scripts to generate a static site from Emacs Org-mode files using Pandoc to generate HTML files.
Diffstat (limited to 'scripts/generate_post_summary_xml.sh')
-rwxr-xr-xscripts/generate_post_summary_xml.sh21
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 ""