mirror of
https://forge.chapril.org/tykayn/book_generator
synced 2025-06-20 01:34:43 +02:00
init avec readme
This commit is contained in:
commit
60bc5ca9d0
26 changed files with 1955 additions and 0 deletions
83
generate_book.sh
Executable file
83
generate_book.sh
Executable file
|
@ -0,0 +1,83 @@
|
|||
#!/bin/bash
|
||||
if [ -z "$1" ]; then
|
||||
echo "Erreur : Veuillez spécifier un argument." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$2" ]; then
|
||||
echo "Extension de fichiers générés au format org." >&2
|
||||
extension="org" # ou md
|
||||
fi
|
||||
function generate_uuid() {
|
||||
uuid=$(cat /proc/sys/kernel/random/uuid)
|
||||
echo "$uuid";
|
||||
return "$uuid";
|
||||
}
|
||||
|
||||
|
||||
livre_bidule=$1 # mettez le bon nom de votre livre
|
||||
echo "création du dossier de livre: $livre_bidule"
|
||||
|
||||
rm -rf "$livre_bidule"
|
||||
mkdir "$livre_bidule" -p
|
||||
cp *.py "$livre_bidule"
|
||||
cp *.sh "$livre_bidule"
|
||||
cp *.css "$livre_bidule"
|
||||
cd "$livre_bidule"
|
||||
mkdir assets inspirations
|
||||
touch "taches_$livre_bidule.$extension" \
|
||||
"livre.$extension" "intrigues.$extension" \
|
||||
"personnages.$extension" "notes_intention.$extension"
|
||||
|
||||
# On remplit les fiches avec un contenu de base:
|
||||
echo ":PROPERTIES:
|
||||
:ID: $(generate_uuid)
|
||||
:END:
|
||||
#+title: livre $livre_bidule
|
||||
#+AUTHOR: (votre nom)
|
||||
#+EMAIL: votre@email.com
|
||||
#+BEGIN_EXPORT epub
|
||||
:title \"Mon livre\"
|
||||
:author \"Votre nom\"
|
||||
:email \"votre@email.com\"
|
||||
:language \"fr\"
|
||||
:encoding \"UTF-8\"
|
||||
:subject \"Littérature\"
|
||||
:description \"Ceci est un livre écrit en Org-mode\"
|
||||
:keywords \"Org-mode, livre, électronique\"
|
||||
:cover \"image/cover.jpg\"
|
||||
#+END_EXPORT
|
||||
|
||||
|
||||
* Livre $livre_bidule :title:
|
||||
** Chapitre 1 :title:
|
||||
** Chapitre 2 :title:
|
||||
** Chapitre 3 :title:" > "livre.$extension"
|
||||
|
||||
echo ":PROPERTIES:
|
||||
:ID: $(generate_uuid)
|
||||
:END:
|
||||
#+title: notes d'intention de $livre_bidule
|
||||
|
||||
* Notes d'intention
|
||||
** Thématiques globales
|
||||
** Sources d'inspiration
|
||||
" > "notes_intention.$extension"
|
||||
|
||||
echo ":PROPERTIES:
|
||||
:ID: $(generate_uuid)
|
||||
:END:
|
||||
#+title: personnages de $livre_bidule
|
||||
|
||||
* Personnages
|
||||
** Principal
|
||||
- personnalité
|
||||
- objectifs
|
||||
** Secondaire
|
||||
|
||||
" > "personnages.$extension"
|
||||
|
||||
cd ..
|
||||
ls -l $livre_bidule
|
||||
echo "fichiers du livre $livre_bidule créé"
|
||||
exit 0
|
Loading…
Add table
Add a link
Reference in a new issue