Archived
1
0
Fork 0
This repository has been archived on 2024-11-18. You can view files and clone it, but cannot push or open issues or pull requests.
noter/writer.sh

18 lines
430 B
Bash
Executable file

#!/bin/bash
# writer 1.2 - @k@layer8.space - mit
# Use the assigned editor, if any, else use nano
[[ ${EDITOR:-"unset"} == "unset" ]] && EDITOR=nano
nlog() {
local ORANGE='\033[0;33m'
local NO_COLOR='\033[0m'
echo -e "${ORANGE}[noter] | ${1} ${NO_COLOR}"
}
mkdir -p notes
current_date=$(date +%Y-%m-%d)
nlog "opening note notes/$current_time.txt"
filename="notes/${current_date}.txt"
$EDITOR "$filename"
./noter.sh