script
This commit is contained in:
parent
1faf45d452
commit
d263b82a1c
29
newpoem.sh
Executable file
29
newpoem.sh
Executable 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
|
Loading…
Reference in New Issue
Block a user