Skip to content

Commit

Permalink
chore: update template
Browse files Browse the repository at this point in the history
  • Loading branch information
locphan87 committed Jan 25, 2021
1 parent 56bbce0 commit 41b4ad5
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions bin/zt
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,16 @@ echo "Creating a new Zettel"
# YMD.HMS
DATE_FORMAT="%Y%m%d.%H%M%S"

read -p "Enter your title: " title
# Replace space by dash and convert to lowercase
newTitle=$(echo $title | tr " " "-" | tr '[:upper:]' '[:lower:]')

read -p "Enter your tags: " tags

# Making the file name
FILE_NAME=$(date +$DATE_FORMAT).$newTitle.md
# Add title and tags to the file
# echo "# $title\n$tags\n\n\n\n## Authors\n\n## Remarks\n\n## References\n" > $FILE_NAME
echo "---
tags: '$tags'
title: '$title'
title: $1
tags: '$2'
address: $3
parent: $4
authors:
---
Expand Down

0 comments on commit 41b4ad5

Please sign in to comment.