ravages/new.sh
2025-11-26 13:36:40 +01:00

23 lines
711 B
Bash
Executable File

title=$1
numero=$2
date=`date --rfc-3339=date`
slug=`echo $title | tr '[:upper:]' '[:lower:]'|sed 's/\ /-/g'|sed 's/é/e/g'|sed 's/è/e/g'|sed "s/'/-/g"`
echo "Title: $title"
echo "Author: ravages"
echo "Date: $date"
echo "Modified: $numero"
echo "Category: 03"
echo "Tags:"
echo "Weight:0"
echo "Slug: $slug"
touch "./content/$numero/$slug.md"
echo "Title: $title" >> "./content/$numero/$slug.md"
echo "Author: theo" >> "./content/$numero/$slug.md"
echo "Date: $date" >> "./content/$numero/$slug.md"
echo "Modified: $date" >> "./content/$numero/$slug.md"
echo "Category: poèmes" >> "./content/$numero/$slug.md"
echo "Tags:" >> "./content/$numero/$slug.md"
echo "Slug: $slug" >> "./content/$numero/$slug.md"