diff --git a/newpoem.sh b/newpoem.sh new file mode 100755 index 0000000..2e685ae --- /dev/null +++ b/newpoem.sh @@ -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