mirror of https://github.com/eyhc1/rendercv.git
fix entry point
This commit is contained in:
parent
324bda2363
commit
842a749f08
|
@ -1,7 +1,7 @@
|
||||||
[project]
|
[project]
|
||||||
name = 'rendercv'
|
name = 'rendercv'
|
||||||
description = 'LaTeX CV generator from a YAML/JSON file'
|
description = 'LaTeX CV generator from a YAML/JSON file'
|
||||||
version = '0.3'
|
version = '1.0'
|
||||||
authors = [{ name = 'Sina Atalay' }]
|
authors = [{ name = 'Sina Atalay' }]
|
||||||
requires-python = '>=3.10'
|
requires-python = '>=3.10'
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
@ -23,7 +23,7 @@ classifiers = [
|
||||||
"Intended Audience :: Education",
|
"Intended Audience :: Education",
|
||||||
"Topic :: Text Processing :: Markup :: LaTeX",
|
"Topic :: Text Processing :: Markup :: LaTeX",
|
||||||
"Topic :: Printing",
|
"Topic :: Printing",
|
||||||
"Development Status :: 4 - Beta",
|
"Development Status :: 5 - Production/Stable",
|
||||||
"Programming Language :: Python :: 3.10",
|
"Programming Language :: Python :: 3.10",
|
||||||
"Programming Language :: Python :: 3.11",
|
"Programming Language :: Python :: 3.11",
|
||||||
"Programming Language :: Python :: 3.12",
|
"Programming Language :: Python :: 3.12",
|
||||||
|
@ -36,7 +36,7 @@ Documentation = 'https://sinaatalay.github.io/rendercv/'
|
||||||
Source = 'https://github.com/sinaatalay/rendercv'
|
Source = 'https://github.com/sinaatalay/rendercv'
|
||||||
|
|
||||||
[project.scripts]
|
[project.scripts]
|
||||||
rendercv = 'rendercv.__main__:main'
|
rendercv = 'rendercv.__main__:cli'
|
||||||
|
|
||||||
[project.optional-dependencies]
|
[project.optional-dependencies]
|
||||||
docs = ["mkdocs", "mkdocs-material", "mkdocstrings-python"]
|
docs = ["mkdocs", "mkdocs-material", "mkdocstrings-python"]
|
||||||
|
|
|
@ -25,6 +25,11 @@ def render(
|
||||||
typer.Argument(help="Name of the YAML input file"),
|
typer.Argument(help="Name of the YAML input file"),
|
||||||
]
|
]
|
||||||
):
|
):
|
||||||
|
"""Generate a LaTeX CV from a YAML input file.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
input_file (str): Name of the YAML input file
|
||||||
|
"""
|
||||||
try:
|
try:
|
||||||
file_path = os.path.abspath(input_file)
|
file_path = os.path.abspath(input_file)
|
||||||
data = read_input_file(file_path)
|
data = read_input_file(file_path)
|
||||||
|
@ -37,6 +42,11 @@ def render(
|
||||||
|
|
||||||
@app.command(help="Generate a YAML input file to get started")
|
@app.command(help="Generate a YAML input file to get started")
|
||||||
def new(name: Annotated[str, typer.Argument(help="Full name")]):
|
def new(name: Annotated[str, typer.Argument(help="Full name")]):
|
||||||
|
"""Generate a YAML input file to get started.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
name (str): Full name
|
||||||
|
"""
|
||||||
try:
|
try:
|
||||||
environment = Environment(
|
environment = Environment(
|
||||||
loader=PackageLoader("rendercv", os.path.join("templates")),
|
loader=PackageLoader("rendercv", os.path.join("templates")),
|
||||||
|
@ -58,5 +68,9 @@ def new(name: Annotated[str, typer.Argument(help="Full name")]):
|
||||||
typer.Abort()
|
typer.Abort()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
def cli():
|
||||||
|
"""Start the CLI application.
|
||||||
|
|
||||||
|
This function is the entry point for RenderCV.
|
||||||
|
"""
|
||||||
app()
|
app()
|
||||||
|
|
Loading…
Reference in New Issue