File size: 337 Bytes
aaf086e 41b0e01 aaf086e 41b0e01 aaf086e |
1 2 3 4 5 6 7 8 9 10 11 12 |
import glob
import os
all_articles = glob.glob('./articles/*.json')
file_names = [os.path.splitext(os.path.basename(path))[0] for path in all_articles]
_TIMES = sorted(file_names) + ['all']
times_string = "_TIMES = " + repr(_TIMES)
# Write the string to a Python file
with open('configs.py', 'w') as file:
file.write(times_string) |