From 6e5bd19a3235dad88859dc8087f7cfcd3b977ecc Mon Sep 17 00:00:00 2001 From: notkoutsie Date: Sun, 13 Aug 2023 03:35:03 +0300 Subject: [PATCH] oops did a revert :D --- noter.sh | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/noter.sh b/noter.sh index d4aa22d..f90048f 100755 --- a/noter.sh +++ b/noter.sh @@ -1,5 +1,5 @@ #!/bin/bash -# noter 1.1.0 - "the lazy update" - @k@layer8.space - mit +# noter 1.1.1 - "the oops im lazy update" - @k@layer8.space - mit nlog() { local ORANGE='\033[0;33m' @@ -12,6 +12,23 @@ if [ ! -d "notes" ]; then exit 1 fi +checksetting() { + # Use this function to check for a setting without repetition + # Eg: + # checksetting "yourmom" "$isyourmom" + if [ "$2" = true ]; then + echo "$1" >>"$output_file" + fi + +givefavicon() { + local file_path="$1" + + if [ -f "$file_path" ]; then + local base64_data="$(base64 -w 0 "$file_path")" + echo "data:image/png;base64,$base64_data" + fi +} + generate_note_html() { local note_date="$(date -d "$(basename "$1" .txt)" +"%B %d, %Y")" for img in $(grep -oP '(?<= - +