# 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")