add futureGenerators and addFuture script

This commit is contained in:
lukew3
2021-10-06 17:41:19 -04:00
parent b760880d29
commit 4cf160e7b2
2 changed files with 21 additions and 0 deletions

16
scripts/addFuture.py Normal file
View File

@@ -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')