diff --git a/Makefile b/Makefile index 366854f..5565e5a 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,9 @@ pandoc=$(shell command -v pandoc) pandoc_version=$(shell pandoc --version | sed -e 's/.* // ; 1q') awk=$(shell command -v awk) +templates_directory="./templates" +notes_directory="./notes" + .PHONY: help deps help: ## Display this help @@ -27,3 +30,10 @@ ifeq ($(strip ($awk)),) else @echo "awk is installed" endif + +new: ## Create a new file + $(info Creating a new file) + date=$(shell date +%Y) + name=$(date).md + @echo $(name) + cp $(templates_directory)/default.md $(notes_directory)/$(name) diff --git a/notes/default.md b/notes/default.md new file mode 100644 index 0000000..1921555 --- /dev/null +++ b/notes/default.md @@ -0,0 +1,6 @@ +--- +date: +id: +--- + + diff --git a/templates/default.md b/templates/default.md new file mode 100644 index 0000000..1921555 --- /dev/null +++ b/templates/default.md @@ -0,0 +1,6 @@ +--- +date: +id: +--- + +