This commit is contained in:
theo1 2021-05-03 19:51:11 +02:00
parent 1faf45d452
commit d263b82a1c

29
newpoem.sh Executable file
View File

@ -0,0 +1,29 @@
title=$1
date=`date --rfc-3339=date`
slug=`echo $title | tr '[:upper:]' '[:lower:]'|sed 's/\ /-/'`
echo "Title: $title"
echo "Author: theo"
echo "Date: $date"
echo "Modified: $date"
echo "Category: poèmes"
echo "Tags:"
echo "Slug: $slug"
touch "./content/poems/$slug.md"
echo "Title: $title" >> "./content/poems/$slug.md"
echo "Author: theo" >> "./content/poems/$slug.md"
echo "Date: $date" >> "./content/poems/$slug.md"
echo "Modified: $date" >> "./content/poems/$slug.md"
echo "Category: poèmes" >> "./content/poems/$slug.md"
echo "Tags:" >> "./content/poems/$slug.md"
echo "Slug: $slug" >> "./content/poems/$slug.md"
# Title: Ravage
# Authors: theo
# Date: 2021-04-12
# Modified: 2021-04-12
# Category: poèmes
# Tags:
# Class: monospace-this
# Slug: ravage