DPR-blocked-sites/update.py

23 lines
477 B
Python
Raw Normal View History

2022-08-26 13:02:52 +03:00
import glob
import importlib
import os
2022-08-26 13:02:52 +03:00
import subprocess
import sys
RUNNER_FOLDER = 'runners'
scripts = glob.glob(f"./{RUNNER_FOLDER}/*.py")
2022-08-26 13:02:52 +03:00
scripts.sort()
modules = [os.path.basename(x)[:-3] for x in scripts]
file_data = []
for m in modules:
runner = importlib.import_module('.' + m, package=RUNNER_FOLDER)
file_data = runner.main(file_data)
2022-08-26 13:02:52 +03:00
'''
2022-08-26 13:02:52 +03:00
for script in scripts:
runner = importlib.import_module('.' + script[:3], package=__name__)
runner.main()
'''