diff --git a/rendercv/__init__.py b/rendercv/__init__.py index 2e6402d..85ed487 100644 --- a/rendercv/__init__.py +++ b/rendercv/__init__.py @@ -6,7 +6,6 @@ $\LaTeX$ file and renders it with [TinyTeX](https://yihui.org/tinytex/). """ import logging import os -import sys class LoggingFormatter(logging.Formatter): @@ -36,9 +35,10 @@ class LoggingFormatter(logging.Formatter): formatter = logging.Formatter(log_fmt) return formatter.format(record) -os.system('COLOR 0') # enable colors in Windows terminal + +os.system("COLOR 0") # enable colors in Windows terminal logger = logging.getLogger() logger.setLevel(logging.DEBUG) stdout_handler = logging.StreamHandler() stdout_handler.setFormatter(LoggingFormatter()) -logger.addHandler(stdout_handler) \ No newline at end of file +logger.addHandler(stdout_handler) diff --git a/rendercv/__main__.py b/rendercv/__main__.py index 3645325..712a9e1 100644 --- a/rendercv/__main__.py +++ b/rendercv/__main__.py @@ -57,5 +57,6 @@ def new(name: Annotated[str, typer.Argument(help="Full name")]): logger.critical(e) typer.Abort() + if __name__ == "__main__": app() diff --git a/rendercv/data_model.py b/rendercv/data_model.py index 1a05864..9525146 100644 --- a/rendercv/data_model.py +++ b/rendercv/data_model.py @@ -60,7 +60,7 @@ dictionary = [ "grammarly", "css", "html", - "markdown" + "markdown", ] diff --git a/run_rendercv.py b/run_rendercv.py index 1ae2c1a..77e4cfd 100644 --- a/run_rendercv.py +++ b/run_rendercv.py @@ -1,6 +1,4 @@ -import os from rendercv.__main__ import render -from rendercv.data_model import generate_json_schema input_file_path = "John_Doe_CV.yaml" render(input_file_path) @@ -12,4 +10,3 @@ render(input_file_path) # Generate schema.json # generate_json_schema(os.path.join(os.path.dirname(__file__))) - diff --git a/setup.py b/setup.py deleted file mode 100644 index b9dd729..0000000 --- a/setup.py +++ /dev/null @@ -1,14 +0,0 @@ -from setuptools import setup, find_packages - -setup( - name="rendercv", - version="1.0", - author="Sina Atalay", - description="A Python package to generate a CV as a PDF from a YAML or JSON file.", - packages=find_packages(), - entry_points={ - "console_scripts": [ - "rendercv = rendercv.cli:main", - ] - }, -)