make: create a new file
- Creates a templates and a notes directory. - Fixes #9. Co-Authored-by: iGor milhit <igor@milhit.ch>
parent
a388b69b41
commit
7a62ee2f91
10
Makefile
10
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)
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
date:
|
||||
id:
|
||||
---
|
||||
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
date:
|
||||
id:
|
||||
---
|
||||
|
||||
|
Loading…
Reference in New Issue