#!/usr/bin/env bash

# This script should be sourced

BOOK_DIR=$1
lightbrown="\[\033[1;38;5;94m\]"
darkbrown="\[\033[38;5;95m\]"

# export PERIOD=30
export MANUSKRIPT_BIN="$HOME/.Books/manuskript/bin/manuskript"
# export MANUSKRIPT_BIN="manuskript"

alias atmo="$HOME/.Books/atmo.sh"
alias compile="$HOME/.Books/compile.sh"
alias download="$HOME/.Books/download.sh"
alias manuskript="$HOME/.Books/write.sh"
alias rollback="$HOME/.Books/rollback.sh"
alias upload="$HOME/.Books/upload.sh"
alias write="$HOME/.Books/write.sh"
alias wryte="$HOME/.Books/write.sh"

# mkdir -p /tmp/manuskriptbackups
# find /tmp/manuskriptbackups/ -ctime +1 | xargs -I% rm % # remove backups older than a day

bookmoji=$(echo -e "\U1F4D6")
PS1=$(echo -e "$bookmoji $lightbrown-Books-\[\033[0m\] $darkbrown")
which guake &>/dev/null && guake -r $bookmoji
history -c
history -r "$HOME/.Books/history"
cd $BOOK_DIR
#$HOME/.Books/download.sh
clear
