1
0
Fork 0

table-generator: прибрав зайвий закоментований код з інструментів

This commit is contained in:
ІО-23 Шмуляр Олег 2024-04-30 19:44:15 +03:00
parent 47a3e33c03
commit 28fd966167
2 changed files with 0 additions and 55 deletions

View File

@ -1,35 +1,8 @@
#!/usr/bin/python3 #!/usr/bin/python3
'''
import shutil
import sys
import os
'''
import updater import updater
target_folder = "activities" target_folder = "activities"
converter_args = "-a -nv" converter_args = "-a -nv"
updater.process(target_folder, converter_args) updater.process(target_folder, converter_args)
'''
PYTHON_INTERPRETER = sys.executable
if os.path.exists(target_folder):
shutil.rmtree(target_folder)
os.mkdir(target_folder)
os.system(f"{PYTHON_INTERPRETER} convert.py use-cases/* {converter_args} -d {target_folder}/")
result_file = open(f"{target_folder}.md", "w")
try:
for i in os.listdir(target_folder):
with open(os.path.abspath(f"{target_folder}/{i}")) as f:
result_file.write(f.read())
result_file.write("\n")
except Exception as e:
print(f"File {target_folder}/{i} has raised exception {e}")
result_file.close()
'''

View File

@ -1,36 +1,8 @@
#!/usr/bin/python3 #!/usr/bin/python3
'''
import shutil
import sys
import os
'''
import updater import updater
target_folder = "tables" target_folder = "tables"
converter_args = "-nv" converter_args = "-nv"
updater.process(target_folder, converter_args) updater.process(target_folder, converter_args)
'''
PYTHON_INTERPRETER = sys.executable
if os.path.exists(target_folder):
shutil.rmtree(target_folder)
os.mkdir(target_folder)
os.system(f"{PYTHON_INTERPRETER} convert.py use-cases/* {converter_args} -d {target_folder}/")
result_file = open(f"{target_folder}.md", "w")
try:
for i in os.listdir(target_folder):
with open(os.path.abspath(f"{target_folder}/{i}")) as f:
result_file.write(f.read())
result_file.write("\n")
except Exception as e:
print(f"File {target_folder}/{i} has raised exception {e}")
result_file.close()
'''