From 4cf160e7b2119f237b5ca9f3b6c25ddf138370d5 Mon Sep 17 00:00:00 2001 From: lukew3 Date: Wed, 6 Oct 2021 17:41:19 -0400 Subject: [PATCH] add futureGenerators and addFuture script --- futureGenerators.md | 5 +++++ scripts/addFuture.py | 16 ++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 futureGenerators.md create mode 100644 scripts/addFuture.py diff --git a/futureGenerators.md b/futureGenerators.md new file mode 100644 index 0000000..655175c --- /dev/null +++ b/futureGenerators.md @@ -0,0 +1,5 @@ +# Future Generators +Add to this list to suggest a generator that should be created in the future + +| Title | Example Problem | Example Solution | Further Explanation | +|-------|-----------------|------------------|---------------------| diff --git a/scripts/addFuture.py b/scripts/addFuture.py new file mode 100644 index 0000000..fae6364 --- /dev/null +++ b/scripts/addFuture.py @@ -0,0 +1,16 @@ +import os + +print("You are about to add a new generator to the table in futureGenerators.md") +print("Please fill out the following:") +title = input("> Title: ") +example_problem = input("> Example Problem: ") +example_solution = input("> Example Solution: ") +further_explanation = input("> Further explanation (optional): ") + +if os.getcwd()[-7:] == 'scripts': + file = '../futureGenerators.md' +else: + file = './futureGenerators.md' + +with open(file, 'a') as f: + f.writelines(f'| {title} | {example_problem} | {example_solution} | {further_explanation} |\n')