About

cat ~/usr/about-me.txt

I’m Satvik (ramblingenzyme), an undergrad CompSci student at UOW, born in the late 90’s. I enjoy programming and solving problems, and live most of my computing life in a terminal/shell. Here is a list of words that describe me:

cat ~/usr/about-blog.txt

This site is made up of markdown files with the HTML generated by pandoc and automated by a small bash script shown below. Of course this would need some refining, which would emerge over time as more posts are created and edge cases pop up.

#!/usr/bin/env bash
SOURCE_DIR="src"
INPUT_ARTICLE_DIR="articles"

BUILD_DIR="build"
OUTPUT_ARTICLE_DIR="blog"

IMAGES_DIR="images"
JS_DIR="js"

CSS_DIR="css"

PREFIX="Ramblings of an Enzyme"
TEMPLATE="./include/template.html"

rm -rf $BUILD_DIR
mkdir -p $BUILD_DIR/$OUTPUT_ARTICLE_DIR

cp -r $SOURCE_DIR/$JS_DIR $BUILD_DIR/
cp -r $SOURCE_DIR/$IMAGES_DIR $BUILD_DIR/
cp -r $SOURCE_DIR/$CSS_DIR $BUILD_DIR/

cp $SOURCE_DIR/CNAME $BUILD_DIR/CNAME
cp $SOURCE_DIR/keybase.txt $BUILD_DIR/keybase.txt

for FILE in $(find $SOURCE_DIR/$INPUT_ARTICLE_DIR -type f -printf "%f\n"); do
    echo "$FILE"
    OUTPUT="./$BUILD_DIR/$OUTPUT_ARTICLE_DIR/${FILE%%.*}.html"
    echo "$SOURCE_DIR/$INPUT_ARTICLE_DIR/$FILE"
    echo "$OUTPUT"

    pandoc "$SOURCE_DIR/$INPUT_ARTICLE_DIR/$FILE" \
        -o "$OUTPUT" \
        --template "$TEMPLATE" \
        --title-prefix "$PREFIX" \
        --highlight-style monochrome
done

for FILE in $(find $SOURCE_DIR -maxdepth 1 -name "*.md" -type f -printf "%f\n"); do
    echo "$FILE"
    OUTPUT="./$BUILD_DIR/${FILE%%.*}.html"

    pandoc "$SOURCE_DIR/$FILE" \
        -o "$OUTPUT" \
        --template "$TEMPLATE" \
        --title-prefix "$PREFIX" \
        --highlight-style monochrome
done