Skip to content

Commit

Permalink
✨ generate accepts targets as parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
vokimon committed Nov 7, 2024
1 parent 8d2c0e2 commit b7064f4
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions legaltexts/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,15 +215,17 @@ def reintegrate(translation_yaml: list[Path]):
markdown_file.write_text(content)

@app.command()
def generate():
generate_web_pdf(
master_path=Path('indexed-tariff-specific-conditions'),
output_prefix='web-pdf'
)
generate_webforms_html(
master_path=Path('general-conditions'),
output_prefix='webforms'
)
def generate(targets: list[str]):
if not targets or 'web-pdf' in targets:
generate_web_pdf(
master_path=Path('indexed-tariff-specific-conditions'),
output_prefix='web-pdf'
)
if not targets or 'webforms' in targets:
generate_webforms_html(
master_path=Path('general-conditions'),
output_prefix='webforms'
)

def generate_web_pdf(master_path: Path, output_prefix: str):
"""Generates a set of deployable files"""
Expand Down

0 comments on commit b7064f4

Please sign in to comment.