⚡ ajout de générateur de structure, complétion de documentation, script de mise à jour du dépot de livre
This commit is contained in:
parent
60bc5ca9d0
commit
ef5d038486
11 changed files with 85 additions and 5 deletions
23
structure_generator.py
Normal file
23
structure_generator.py
Normal file
|
@ -0,0 +1,23 @@
|
|||
# python script.py --number_chapters 7 --number_parts 2 --objective_words 600 --objective_chapter 1800
|
||||
|
||||
|
||||
import argparse
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('--objective_words', type=int, default=500)
|
||||
parser.add_argument('--objective_chapter', type=int, default=1500)
|
||||
parser.add_argument('--number_chapters', type=int, default=5)
|
||||
parser.add_argument('--number_parts', type=int, default=3)
|
||||
args = parser.parse_args()
|
||||
book_content = ''
|
||||
|
||||
print(args)
|
||||
|
||||
for i in range(args.number_chapters):
|
||||
book_content += f"\n\n### Chapitre {i+1} :title:target_{args.objective_words}:"
|
||||
for j in range(args.number_parts):
|
||||
book_content += f"\n\n### Chapitre {i+1} - Partie {j+1} :title:target_{args.objective_words}:"
|
||||
|
||||
print("--------------")
|
||||
print(book_content)
|
||||
print("--------------")
|
||||
print("vous pouvez copier cette cascade de parties de livre dans livre.org")
|
Loading…
Add table
Add a link
Reference in a new issue