generated from felixm/defaultpy
29 lines
576 B
Python
29 lines
576 B
Python
import logging
|
|
|
|
from rich.logging import RichHandler
|
|
|
|
from toldg.process import process_csv_files, process_ldg_files
|
|
from toldg.utils import load_config, remove_if_exists, write_meta
|
|
|
|
|
|
def init_logging():
|
|
logging.basicConfig(
|
|
level=logging.INFO,
|
|
format="%(message)s",
|
|
datefmt="[%X]",
|
|
handlers=[RichHandler()],
|
|
)
|
|
|
|
|
|
def main():
|
|
init_logging()
|
|
config = load_config()
|
|
remove_if_exists(config.output_file)
|
|
write_meta(config)
|
|
process_ldg_files(config)
|
|
process_csv_files(config)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|