mirror of https://github.com/eyhc1/rendercv.git
refactor
This commit is contained in:
parent
36fd2b9d4b
commit
12c7288d68
|
@ -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,7 +35,8 @@ 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()
|
||||||
|
|
|
@ -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()
|
||||||
|
|
|
@ -60,7 +60,7 @@ dictionary = [
|
||||||
"grammarly",
|
"grammarly",
|
||||||
"css",
|
"css",
|
||||||
"html",
|
"html",
|
||||||
"markdown"
|
"markdown",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -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__)))
|
||||||
|
|
||||||
|
|
14
setup.py
14
setup.py
|
@ -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",
|
|
||||||
]
|
|
||||||
},
|
|
||||||
)
|
|
Loading…
Reference in New Issue