diff --git a/noter.sh b/noter.sh index d6278a3..87ece8f 100755 --- a/noter.sh +++ b/noter.sh @@ -1,17 +1,22 @@ #!/bin/bash -# noter 1.2.2 - "feeds, holy shit!" - @k@layer8.space - mit +# noter 1.2.3 - "nice styles" - @k@layer8.space - mit showgenerator="true" backtotop="true" lastupdated="true" #rssfeed="true" + +# a pretty nifty little logging utility! nlog() { local ORANGE='\033[0;33m' local NO_COLOR='\033[0m' - echo -e "${ORANGE}[noter] | ${1} ${NO_COLOR}" + local calling_function=${FUNCNAME[1]} + + echo -e "${ORANGE}[noter] ${calling_function} | ${1} ${NO_COLOR}" } + if [ ! -d "notes" ]; then nlog "Error: 'notes' folder not found!" exit 1 @@ -22,6 +27,7 @@ checksetting() { # Eg: # checksetting "yourmom" "$isyourmom" if [ "$2" = true ]; then + nlog "$1 set to $2" echo "$1" >>"$output_file" fi } @@ -53,7 +59,7 @@ generate_note_html() { echo "
$(cat "$1")" + echo "$(cat "$1")" echo "" } @@ -78,6 +84,7 @@ generate_top_year_bar() { # im faster than Google at getting a # feed going goddamit! generate_rss_feed() { + nlog "generating rss feed" local rss_file="feed.xml" local rss_title="koutsies telenotes" local rss_description="thoughts about mainly computers... maybe recipes and cats too?" @@ -101,18 +108,18 @@ generate_rss_feed() {