aboutsummaryrefslogtreecommitdiff
path: root/bin/biblio-yml
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2024-06-10 16:21:34 +0100
committerSilvio Rhatto <rhatto@riseup.net>2024-06-10 16:21:34 +0100
commit6cf6f3fc219b210cb2a450dc69134fc0786f7e76 (patch)
tree34104aae45dadc1bfbe71b613a8383321d2d1b04 /bin/biblio-yml
parentdd3c246fbc3d3dbb829e1a5e4b2dadfa87286d7f (diff)
downloadbookup-6cf6f3fc219b210cb2a450dc69134fc0786f7e76.tar.gz
bookup-6cf6f3fc219b210cb2a450dc69134fc0786f7e76.tar.bz2
Feat: improved bibliography handling
Diffstat (limited to 'bin/biblio-yml')
-rwxr-xr-xbin/biblio-yml28
1 files changed, 28 insertions, 0 deletions
diff --git a/bin/biblio-yml b/bin/biblio-yml
new file mode 100755
index 0000000..83355b4
--- /dev/null
+++ b/bin/biblio-yml
@@ -0,0 +1,28 @@
+#!/usr/bin/env bash
+#
+# Markdown inclusion generator that can be easily symlinked/copied by
+# Pandoc-compatible works.
+#
+
+# Parameters
+BASENAME="`basename $0`"
+DIRNAME="`dirname $0`"
+BASEDIR="$DIRNAME/.."
+PREFIX="${1:-biblio}"
+HEADER="${2:-true}"
+
+# Go to main folder
+cd $BASEDIR
+
+# Header
+if [ "$HEADER" != "false" ]; then
+ echo "# Bibliography sources"
+ echo "# Automatically generated by $BASENAME"
+ echo "bibliography:"
+fi
+
+# Compile
+#for file in *.bib; do
+find -name '*.bib' | sed -e 's|^./||' | while read file; do
+ echo " - $PREFIX/$file"
+done