This commit is contained in:
Sina Atalay 2023-10-20 19:45:08 +02:00
parent 36fd2b9d4b
commit 12c7288d68
5 changed files with 5 additions and 21 deletions

View File

@ -6,7 +6,6 @@ $\LaTeX$ file and renders it with [TinyTeX](https://yihui.org/tinytex/).
""" """
import logging import logging
import os import os
import sys
class LoggingFormatter(logging.Formatter): class LoggingFormatter(logging.Formatter):
@ -36,9 +35,10 @@ class LoggingFormatter(logging.Formatter):
formatter = logging.Formatter(log_fmt) formatter = logging.Formatter(log_fmt)
return formatter.format(record) 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 = logging.getLogger()
logger.setLevel(logging.DEBUG) logger.setLevel(logging.DEBUG)
stdout_handler = logging.StreamHandler() stdout_handler = logging.StreamHandler()
stdout_handler.setFormatter(LoggingFormatter()) stdout_handler.setFormatter(LoggingFormatter())
logger.addHandler(stdout_handler) logger.addHandler(stdout_handler)

View File

@ -57,5 +57,6 @@ def new(name: Annotated[str, typer.Argument(help="Full name")]):
logger.critical(e) logger.critical(e)
typer.Abort() typer.Abort()
if __name__ == "__main__": if __name__ == "__main__":
app() app()

View File

@ -60,7 +60,7 @@ dictionary = [
"grammarly", "grammarly",
"css", "css",
"html", "html",
"markdown" "markdown",
] ]

View File

@ -1,6 +1,4 @@
import os
from rendercv.__main__ import render from rendercv.__main__ import render
from rendercv.data_model import generate_json_schema
input_file_path = "John_Doe_CV.yaml" input_file_path = "John_Doe_CV.yaml"
render(input_file_path) render(input_file_path)
@ -12,4 +10,3 @@ render(input_file_path)
# Generate schema.json # Generate schema.json
# generate_json_schema(os.path.join(os.path.dirname(__file__))) # generate_json_schema(os.path.join(os.path.dirname(__file__)))

View File

@ -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",
]
},
)