mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 06:25:23 +01:00
add futureGenerators and addFuture script
This commit is contained in:
16
scripts/addFuture.py
Normal file
16
scripts/addFuture.py
Normal 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')
|
||||
Reference in New Issue
Block a user