jekyll-to-hugo/main.py

26 lines
541 B
Python
Raw Normal View History

2023-05-29 18:35:38 +00:00
import logging
2023-05-29 18:58:32 +00:00
from app.config import Configurator
2023-05-29 18:35:38 +00:00
from app.converter import Converter
def main():
2023-05-29 18:58:32 +00:00
# Configurator
configurator = Configurator()
2023-05-29 18:35:38 +00:00
# Logging configuration
logging.basicConfig(
format="%(asctime)s %(process)d %(levelname)s %(message)s",
2023-05-29 18:58:32 +00:00
level=configurator.logging_level,
2023-05-29 18:35:38 +00:00
datefmt="%Y-%m-%d %H:%M:%S",
)
# Converter
2023-05-29 18:58:32 +00:00
converter = Converter(configurator)
2023-05-29 18:35:38 +00:00
converter.convert()
# Press the green button in the gutter to run the script.
if __name__ == "__main__":
main()