Generate a new docs translation directory for the language LANG.
(lang: str = typer.Argument(..., callback=lang_callback))
| 131 | |
| 132 | @app.command() |
| 133 | def new_lang(lang: str = typer.Argument(..., callback=lang_callback)): |
| 134 | """ |
| 135 | Generate a new docs translation directory for the language LANG. |
| 136 | """ |
| 137 | new_path: Path = Path("docs") / lang |
| 138 | if new_path.exists(): |
| 139 | typer.echo(f"The language was already created: {lang}") |
| 140 | raise typer.Abort() |
| 141 | new_path.mkdir() |
| 142 | new_llm_prompt_path: Path = new_path / "llm-prompt.md" |
| 143 | new_llm_prompt_path.write_text("", encoding="utf-8") |
| 144 | print(f"Successfully initialized: {new_path}") |
| 145 | update_languages() |
| 146 | |
| 147 | |
| 148 | @app.command() |
nothing calls this directly
no test coverage detected
searching dependent graphs…