From 820782f5767a90cb734eb237c20a84f01ea5e02e Mon Sep 17 00:00:00 2001 From: yctct Date: Sat, 10 May 2025 19:45:46 +0200 Subject: Shorten name --- build.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 build.sh (limited to 'build.sh') diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..1302352 --- /dev/null +++ b/build.sh @@ -0,0 +1,24 @@ +#!/bin/bash +echo Welcome to the markdown to html converter. +markdown_file="$1" +echo file is "$markdown_file" + +if [[ -z "$markdown_file" ]]; then + printf "Usage: %s \n" "$0" + exit 1 + fi + + # output_dir="$(dirname "$markdown_file")" + # output_file="$output_dir/${markdown_file%%.*}.html" + output_file="${markdown_file%%.*}.html" + + pandoc "$markdown_file" -f markdown+hard_line_breaks \ + -t html5 -H "header.html" \ + --template="default.html5" \ + -o "$output_file" --verbose --highlight-style=breezedark + + + printf "markdown_file: %s\n" "$markdown_file" + printf "output_file: %s\n" "$output_file" + + echo We did it capitan, we converted to html. -- cgit v1.2.3