mirror of
https://github.com/koloideal/Argenta.git
synced 2026-06-10 18:15:28 +03:00
Compare commits
257 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| da06099990 | |||
| 8ff9944d37 | |||
| c07ee92371 | |||
| a21570e779 | |||
| f1034ff447 | |||
| fcff6f4263 | |||
| 417e0e2905 | |||
| 31dc49a1bf | |||
| f859451069 | |||
| 24aa75eb37 | |||
| 5f6b3368e1 | |||
| d03ce5061b | |||
| 107530a4b1 | |||
| 9aa99352fe | |||
| 2a9281a421 | |||
| 0567a3f4a3 | |||
| dfe482c545 | |||
| 46c1ec02fd | |||
| 70bbbd76ce | |||
| 19bbaab1ee | |||
| 1c54f11f31 | |||
| 2ad86dbedd | |||
| f27f7b135b | |||
| f9a85da430 | |||
| 2f557b99b0 | |||
| 63c4443ff6 | |||
| 30761749b4 | |||
| 0c3048266a | |||
| 088c1720c4 | |||
| 838f33db87 | |||
| b8e9fdcb9c | |||
| 295e260a46 | |||
| 3fa7b17de9 | |||
| a174e0d5ab | |||
| 9d250fde9c | |||
| e7d064908f | |||
| ba9a7b5539 | |||
| 69e871a639 | |||
| 1648a8206a | |||
| 2e5b19f4d8 | |||
| 6aa6b0f179 | |||
| 00cb94ffe2 | |||
| 285ea39fa9 | |||
| 30e5fd6ebe | |||
| 18f62d3e7c | |||
| 3cd74fc186 | |||
| 9bde1321e1 | |||
| 0f8b1c05fc | |||
| cd3dd10d11 | |||
| b8d8c44bdd | |||
| 4957de95d3 | |||
| c5dab43c87 | |||
| 56189be6ab | |||
| 725a1f2e40 | |||
| 22970f7115 | |||
| 6598fb7fa6 | |||
| 183f069766 | |||
| 75b1efb259 | |||
| cb6549452d | |||
| 425342c059 | |||
| 9423034a08 | |||
| dee328525d | |||
| 1d2ab6f6bb | |||
| a2ef2652ed | |||
| 2423f57000 | |||
| 913e7f16ca | |||
| 20b638c421 | |||
| b0e6127c1e | |||
| 67bc8960e7 | |||
| 6b9cb586d5 | |||
| ce7e24b924 | |||
| 5c933ab656 | |||
| e1327c278c | |||
| a57ea45c6f | |||
| baebeca55b | |||
| 6be0a94ba9 | |||
| 087c76fed3 | |||
| 723ed2210f | |||
| c6fd01b7bc | |||
| 9179eb8468 | |||
| be083bb64d | |||
| eeb5a752ec | |||
| 9d420af0c5 | |||
| d4129e27e7 | |||
| 974d35fb82 | |||
| da1ee9269a | |||
| dca320297e | |||
| 08660f81d7 | |||
| 52139e5405 | |||
| 2a0ec209c3 | |||
| cd3095f42e | |||
| 2800a7ffc2 | |||
| e6645730f0 | |||
| eae8cdbb58 | |||
| 7c20bf296b | |||
| 2ff47398ba | |||
| 19906c1b1b | |||
| 2a96dfcabe | |||
| 47fda23431 | |||
| d3bf5e703d | |||
| be178b10c7 | |||
| 1eaf2b6333 | |||
| e5be7b5d99 | |||
| 2e76f68d4a | |||
| 8edd59c1b8 | |||
| 16e7cc21fb | |||
| 4da876b774 | |||
| 7b85b0f08d | |||
| 270e91f705 | |||
| 767d742060 | |||
| b37096d790 | |||
| ad8c3af532 | |||
| 02b02793d0 | |||
| f0a18e89c8 | |||
| 6f90712a17 | |||
| 239e582241 | |||
| 4967ec3d7f | |||
| 7e02694cb0 | |||
| 9c58c10152 | |||
| 64c984a704 | |||
| 15f97eab61 | |||
| df7313912c | |||
| acddb1fbc6 | |||
| 9b28ef17ff | |||
| e4a5c6d398 | |||
| 0598f6e7a5 | |||
| c3395a3922 | |||
| b0924a9e89 | |||
| 1f15b4c093 | |||
| bc6cb583a7 | |||
| 7b40fff4c5 | |||
| fc8597504f | |||
| 667aeccc38 | |||
| c88c1ac1cc | |||
| ec42e63d80 | |||
| 4f5481fa70 | |||
| f38da15bdb | |||
| 90e80d3454 | |||
| 8a8a1739e7 | |||
| bf6fe0f9ee | |||
| 9ac24926af | |||
| 6fa431a27a | |||
| 87d232e835 | |||
| 1314b11827 | |||
| d146fc6b6b | |||
| 9ff00ee785 | |||
| 5d54375f14 | |||
| 02bc775148 | |||
| af73b9067d | |||
| 67ac8c53ca | |||
| dcbe03d08a | |||
| 5b5668593c | |||
| f52932dc2e | |||
| b6e5c57b8a | |||
| 8324d3e5a2 | |||
| a5af8337f3 | |||
| a2ac6a608f | |||
| e4bff84c38 | |||
| cd58f2a5d3 | |||
| 182467502d | |||
| db04a5bba7 | |||
| d37688392a | |||
| a25ede147f | |||
| c87a0ce547 | |||
| 4e30aae916 | |||
| 051b6f8b50 | |||
| 5c14f9b8bc | |||
| c38d539e33 | |||
| cbf9c11a63 | |||
| dfec91c509 | |||
| eb18730789 | |||
| 19716bdb5e | |||
| 02687f5acd | |||
| 7f5234b67a | |||
| a4543cee92 | |||
| 074ace7d54 | |||
| e68a6c48ac | |||
| fba2021114 | |||
| 51d54ee9c8 | |||
| 6359479b5b | |||
| 4db3573292 | |||
| 0cb41628dd | |||
| 648f9da2c6 | |||
| 79e768f943 | |||
| 2275ec1d00 | |||
| bd37fab1ce | |||
| 6e3da8b4e4 | |||
| f696805bc6 | |||
| 0fca3af35d | |||
| a5e72161ef | |||
| 36b4d16610 | |||
| 4a895df52c | |||
| 35707e078e | |||
| 078cbdc4a8 | |||
| 462a8088e9 | |||
| e2753ef904 | |||
| 8dfb95ec91 | |||
| e67d08970f | |||
| 1e5b220a22 | |||
| 6f4f8c407a | |||
| 2b76bea318 | |||
| e481ee8775 | |||
| 0a1d462090 | |||
| b3b5e2e8a8 | |||
| 0bdc3f07c2 | |||
| 77416cf22c | |||
| b6c84f1a91 | |||
| c2d235e576 | |||
| f7f5db58aa | |||
| 73303b1c08 | |||
| 22f1171192 | |||
| a844095fdc | |||
| a7c6a14705 | |||
| cfdb37330e | |||
| aef6a9ca38 | |||
| c8e0729be8 | |||
| c2bbc5f15d | |||
| 0acbf54e44 | |||
| c3d9541330 | |||
| f6561de9b3 | |||
| bebd84969b | |||
| 365347ea7f | |||
| 33cb528b1d | |||
| fd287c5da0 | |||
| 45f410e3e8 | |||
| 8b06e9cd39 | |||
| c38fe10006 | |||
| 03cbc64f48 | |||
| cbf7d3c578 | |||
| ea2d068022 | |||
| 5991851207 | |||
| f628c3b5b5 | |||
| 05379712f4 | |||
| ed1cbf0fcf | |||
| 471f05369b | |||
| 13f7e33db1 | |||
| 9a78aa9263 | |||
| 58ccd6b26d | |||
| 73144f7ba4 | |||
| 650f4c9036 | |||
| 393f5c7d81 | |||
| 9eb2bb6c46 | |||
| 79b275eac7 | |||
| 07ac2af71e | |||
| c4b3aa7db8 | |||
| 61ef6a6466 | |||
| 477f3a7dec | |||
| adf3431388 | |||
| 83955aa046 | |||
| 5a17e916eb | |||
| 1159dda16e | |||
| 315508a36e | |||
| 9d6598c4e0 | |||
| eb43806da6 | |||
| e076dbf84f | |||
| 2f090b6b47 | |||
| c9dbf2bbae |
@@ -0,0 +1,31 @@
|
|||||||
|
name: mypy
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ "main" ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ "main" ]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- uses: actions/setup-python@v3
|
||||||
|
with:
|
||||||
|
python-version: "3.13"
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install uv
|
||||||
|
uv sync --group typecheckers
|
||||||
|
|
||||||
|
- name: Run type checker
|
||||||
|
run: uv run python -m mypy -p argenta
|
||||||
@@ -2,9 +2,9 @@ name: ruff
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "kolo" ]
|
branches: [ "main" ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ "kolo" ]
|
branches: [ "main" ]
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
@@ -24,7 +24,8 @@ jobs:
|
|||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install ruff
|
pip install uv
|
||||||
|
uv sync --group linters
|
||||||
|
|
||||||
- name: Run linter
|
- name: Run linter
|
||||||
run: ruff check ./argenta
|
run: uv run python -m ruff check ./src
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ name: tests
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "kolo" ]
|
branches: [ "main" ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ "kolo" ]
|
branches: [ "main" ]
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
@@ -13,19 +13,22 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
python-version: ["3.12", "3.13", "3.14"]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- uses: actions/setup-python@v3
|
- uses: actions/setup-python@v3
|
||||||
with:
|
with:
|
||||||
python-version: "3.13"
|
python-version: ${{ matrix.python-version }}
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install poetry
|
pip install uv
|
||||||
poetry install
|
uv sync --group tests
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: poetry run python -m unittest discover
|
run: uv run python -m pytest tests
|
||||||
|
|||||||
+323
-8
@@ -1,9 +1,324 @@
|
|||||||
.venv
|
#### joe made this: http://goel.io/joe
|
||||||
.idea
|
|
||||||
dist
|
|
||||||
uv.lock
|
|
||||||
*__pycache__/
|
|
||||||
*.hist*
|
|
||||||
build
|
|
||||||
source
|
|
||||||
|
|
||||||
|
metrics/reports/diagrams
|
||||||
|
|
||||||
|
#### python ####
|
||||||
|
# Byte-compiled / optimized / DLL files
|
||||||
|
__pycache__/
|
||||||
|
*.py[codz]
|
||||||
|
*$py.class
|
||||||
|
|
||||||
|
# C extensions
|
||||||
|
*.so
|
||||||
|
|
||||||
|
# Distribution / packaging
|
||||||
|
.Python
|
||||||
|
build/
|
||||||
|
develop-eggs/
|
||||||
|
dist/
|
||||||
|
downloads/
|
||||||
|
eggs/
|
||||||
|
.eggs/
|
||||||
|
lib/
|
||||||
|
lib64/
|
||||||
|
parts/
|
||||||
|
sdist/
|
||||||
|
var/
|
||||||
|
wheels/
|
||||||
|
share/python-wheels/
|
||||||
|
*.egg-info/
|
||||||
|
.installed.cfg
|
||||||
|
*.egg
|
||||||
|
MANIFEST
|
||||||
|
|
||||||
|
# PyInstaller
|
||||||
|
# Usually these files are written by a python script from a template
|
||||||
|
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||||
|
*.manifest
|
||||||
|
*.spec
|
||||||
|
|
||||||
|
# Installer logs
|
||||||
|
pip-log.txt
|
||||||
|
pip-delete-this-directory.txt
|
||||||
|
|
||||||
|
# Unit test / coverage reports
|
||||||
|
htmlcov/
|
||||||
|
.tox/
|
||||||
|
.nox/
|
||||||
|
.coverage
|
||||||
|
.coverage.*
|
||||||
|
.cache
|
||||||
|
nosetests.xml
|
||||||
|
coverage.xml
|
||||||
|
*.cover
|
||||||
|
*.py.cover
|
||||||
|
.hypothesis/
|
||||||
|
.pytest_cache/
|
||||||
|
cover/
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
*.mo
|
||||||
|
*.pot
|
||||||
|
|
||||||
|
# Django stuff:
|
||||||
|
*.log
|
||||||
|
local_settings.py
|
||||||
|
db.sqlite3
|
||||||
|
db.sqlite3-journal
|
||||||
|
|
||||||
|
# Flask stuff:
|
||||||
|
instance/
|
||||||
|
.webassets-cache
|
||||||
|
|
||||||
|
# Scrapy stuff:
|
||||||
|
.scrapy
|
||||||
|
|
||||||
|
# Sphinx documentation
|
||||||
|
docs/_build/
|
||||||
|
|
||||||
|
# PyBuilder
|
||||||
|
.pybuilder/
|
||||||
|
target/
|
||||||
|
|
||||||
|
# Jupyter Notebook
|
||||||
|
.ipynb_checkpoints
|
||||||
|
|
||||||
|
# IPython
|
||||||
|
profile_default/
|
||||||
|
ipython_config.py
|
||||||
|
|
||||||
|
# pyenv
|
||||||
|
# For a library or package, you might want to ignore these files since the code is
|
||||||
|
# intended to run in multiple environments; otherwise, check them in:
|
||||||
|
# .python-version
|
||||||
|
|
||||||
|
# pipenv
|
||||||
|
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
||||||
|
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
||||||
|
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
||||||
|
# install all needed dependencies.
|
||||||
|
# Pipfile.lock
|
||||||
|
|
||||||
|
# UV
|
||||||
|
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
||||||
|
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
||||||
|
# commonly ignored for libraries.
|
||||||
|
# uv.lock
|
||||||
|
|
||||||
|
# poetry
|
||||||
|
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
||||||
|
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
||||||
|
# commonly ignored for libraries.
|
||||||
|
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
||||||
|
# poetry.lock
|
||||||
|
# poetry.toml
|
||||||
|
|
||||||
|
# pdm
|
||||||
|
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
||||||
|
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
||||||
|
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
||||||
|
# pdm.lock
|
||||||
|
# pdm.toml
|
||||||
|
.pdm-python
|
||||||
|
.pdm-build/
|
||||||
|
|
||||||
|
# pixi
|
||||||
|
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
||||||
|
# pixi.lock
|
||||||
|
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
||||||
|
# in the .venv directory. It is recommended not to include this directory in version control.
|
||||||
|
.pixi
|
||||||
|
|
||||||
|
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
||||||
|
__pypackages__/
|
||||||
|
|
||||||
|
# Celery stuff
|
||||||
|
celerybeat-schedule
|
||||||
|
celerybeat.pid
|
||||||
|
|
||||||
|
# Redis
|
||||||
|
*.rdb
|
||||||
|
*.aof
|
||||||
|
*.pid
|
||||||
|
|
||||||
|
# RabbitMQ
|
||||||
|
mnesia/
|
||||||
|
rabbitmq/
|
||||||
|
rabbitmq-data/
|
||||||
|
|
||||||
|
# ActiveMQ
|
||||||
|
activemq-data/
|
||||||
|
|
||||||
|
# SageMath parsed files
|
||||||
|
*.sage.py
|
||||||
|
|
||||||
|
# Environments
|
||||||
|
.env
|
||||||
|
.envrc
|
||||||
|
.venv
|
||||||
|
env/
|
||||||
|
venv/
|
||||||
|
ENV/
|
||||||
|
env.bak/
|
||||||
|
venv.bak/
|
||||||
|
|
||||||
|
# Spyder project settings
|
||||||
|
.spyderproject
|
||||||
|
.spyproject
|
||||||
|
|
||||||
|
# Rope project settings
|
||||||
|
.ropeproject
|
||||||
|
|
||||||
|
# mkdocs documentation
|
||||||
|
/site
|
||||||
|
|
||||||
|
# mypy
|
||||||
|
.mypy_cache/
|
||||||
|
.dmypy.json
|
||||||
|
dmypy.json
|
||||||
|
|
||||||
|
# Pyre type checker
|
||||||
|
.pyre/
|
||||||
|
|
||||||
|
# pytype static type analyzer
|
||||||
|
.pytype/
|
||||||
|
|
||||||
|
# Cython debug symbols
|
||||||
|
cython_debug/
|
||||||
|
|
||||||
|
# PyCharm
|
||||||
|
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
||||||
|
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
||||||
|
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
||||||
|
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
||||||
|
# .idea/
|
||||||
|
|
||||||
|
# Abstra
|
||||||
|
# Abstra is an AI-powered process automation framework.
|
||||||
|
# Ignore directories containing user credentials, local state, and settings.
|
||||||
|
# Learn more at https://abstra.io/docs
|
||||||
|
.abstra/
|
||||||
|
|
||||||
|
# Visual Studio Code
|
||||||
|
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
||||||
|
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
||||||
|
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
||||||
|
# you could uncomment the following to ignore the entire vscode folder
|
||||||
|
# .vscode/
|
||||||
|
|
||||||
|
# Ruff stuff:
|
||||||
|
.ruff_cache/
|
||||||
|
|
||||||
|
# PyPI configuration file
|
||||||
|
.pypirc
|
||||||
|
|
||||||
|
# Marimo
|
||||||
|
marimo/_static/
|
||||||
|
marimo/_lsp/
|
||||||
|
__marimo__/
|
||||||
|
|
||||||
|
# Streamlit
|
||||||
|
.streamlit/secrets.toml
|
||||||
|
#### joe made this: http://goel.io/joe
|
||||||
|
|
||||||
|
#### visualstudiocode ####
|
||||||
|
.vscode/
|
||||||
|
!.vscode/settings.json
|
||||||
|
!.vscode/tasks.json
|
||||||
|
!.vscode/launch.json
|
||||||
|
!.vscode/extensions.json
|
||||||
|
!.vscode/*.code-snippets
|
||||||
|
!*.code-workspace
|
||||||
|
|
||||||
|
# Built Visual Studio Code Extensions
|
||||||
|
*.vsix
|
||||||
|
#### joe made this: http://goel.io/joe
|
||||||
|
|
||||||
|
#### jetbrains ####
|
||||||
|
# Covers JetBrains IDEs: IntelliJ, GoLand, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
|
||||||
|
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||||
|
|
||||||
|
.idea/
|
||||||
|
|
||||||
|
# User-specific stuff
|
||||||
|
.idea/**/workspace.xml
|
||||||
|
.idea/**/tasks.xml
|
||||||
|
.idea/**/usage.statistics.xml
|
||||||
|
.idea/**/dictionaries
|
||||||
|
.idea/**/shelf
|
||||||
|
|
||||||
|
# AWS User-specific
|
||||||
|
.idea/**/aws.xml
|
||||||
|
|
||||||
|
# Generated files
|
||||||
|
.idea/**/contentModel.xml
|
||||||
|
|
||||||
|
# Sensitive or high-churn files
|
||||||
|
.idea/**/dataSources/
|
||||||
|
.idea/**/dataSources.ids
|
||||||
|
.idea/**/dataSources.local.xml
|
||||||
|
.idea/**/sqlDataSources.xml
|
||||||
|
.idea/**/dynamic.xml
|
||||||
|
.idea/**/uiDesigner.xml
|
||||||
|
.idea/**/dbnavigator.xml
|
||||||
|
|
||||||
|
# Gradle
|
||||||
|
.idea/**/gradle.xml
|
||||||
|
.idea/**/libraries
|
||||||
|
|
||||||
|
# Gradle and Maven with auto-import
|
||||||
|
# When using Gradle or Maven with auto-import, you should exclude module files,
|
||||||
|
# since they will be recreated, and may cause churn. Uncomment if using
|
||||||
|
# auto-import.
|
||||||
|
# .idea/artifacts
|
||||||
|
# .idea/compiler.xml
|
||||||
|
# .idea/jarRepositories.xml
|
||||||
|
# .idea/modules.xml
|
||||||
|
# .idea/*.iml
|
||||||
|
# .idea/modules
|
||||||
|
# *.iml
|
||||||
|
# *.ipr
|
||||||
|
|
||||||
|
# CMake
|
||||||
|
cmake-build-*/
|
||||||
|
|
||||||
|
# Mongo Explorer plugin
|
||||||
|
.idea/**/mongoSettings.xml
|
||||||
|
|
||||||
|
# File-based project format
|
||||||
|
*.iws
|
||||||
|
|
||||||
|
# IntelliJ
|
||||||
|
out/
|
||||||
|
|
||||||
|
# mpeltonen/sbt-idea plugin
|
||||||
|
.idea_modules/
|
||||||
|
|
||||||
|
# JIRA plugin
|
||||||
|
atlassian-ide-plugin.xml
|
||||||
|
|
||||||
|
# Cursive Clojure plugin
|
||||||
|
.idea/replstate.xml
|
||||||
|
|
||||||
|
# SonarLint plugin
|
||||||
|
.idea/sonarlint/
|
||||||
|
.idea/sonarlint.xml # see https://community.sonarsource.com/t/is-the-file-idea-idea-idea-sonarlint-xml-intended-to-be-under-source-control/121119
|
||||||
|
|
||||||
|
# Crashlytics plugin (for Android Studio and IntelliJ)
|
||||||
|
com_crashlytics_export_strings.xml
|
||||||
|
crashlytics.properties
|
||||||
|
crashlytics-build.properties
|
||||||
|
fabric.properties
|
||||||
|
|
||||||
|
# Editor-based HTTP Client
|
||||||
|
.idea/httpRequests
|
||||||
|
http-client.private.env.json
|
||||||
|
|
||||||
|
# Android studio 3.1+ serialized cache file
|
||||||
|
.idea/caches/build_file_checksums.ser
|
||||||
|
|
||||||
|
# Apifox Helper cache
|
||||||
|
.idea/.cache/.Apifox_Helper
|
||||||
|
.idea/ApifoxUploaderProjectSetting.xml
|
||||||
|
|
||||||
|
.zed
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
version: 2
|
||||||
|
|
||||||
|
build:
|
||||||
|
os: ubuntu-22.04
|
||||||
|
tools:
|
||||||
|
python: "3.12"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
post_install:
|
||||||
|
- sphinx-intl build --locale-dir docs/locales
|
||||||
|
|
||||||
|
sphinx:
|
||||||
|
configuration: docs/conf.py
|
||||||
|
|
||||||
|
python:
|
||||||
|
install:
|
||||||
|
- requirements: docs/requirements.txt
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
|
||||||
|
<a id='changelog-1.2.0'></a>
|
||||||
|
## 1.2.0 — 2026-02-07
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- 100% coverage of the code base with tests
|
||||||
|
- 100% coverage with typhints
|
||||||
|
- 100% coverage of public API documentation in two languages - Russian and English
|
||||||
|
- cli attributes: highlighting valid commands, redesigned input history with auto-completion, interactive autocomplete selection menu for multiple candidates
|
||||||
|
- a metrics module that allows you to test the performance of various library units
|
||||||
|
- implementing a dependency injection pattern through an ioc container
|
||||||
|
- implementation of a context object for transferring data between handlers within a session
|
||||||
|
- adding a changelog
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- increased performance by several times (there will be real numbers in the next releases)
|
||||||
|
- reworking the internal API, highlighting different layers and reducing connectivity
|
||||||
|
- reworking the README and adding a translation for it
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
# Code of Conduct - Argenta
|
||||||
|
|
||||||
|
## Our Pledge
|
||||||
|
|
||||||
|
In the interest of fostering an open and welcoming environment, we as
|
||||||
|
contributors and maintainers pledge to make participation in our project and
|
||||||
|
our community a harassment-free experience for everyone, regardless of age, body
|
||||||
|
size, disability, ethnicity, sex characteristics, level of experience, education,
|
||||||
|
socio-economic status, nationality, personal appearance, race and religion.
|
||||||
|
|
||||||
|
## Our Standards
|
||||||
|
|
||||||
|
Examples of behaviour that contributes to a positive environment for our
|
||||||
|
community include:
|
||||||
|
|
||||||
|
* Demonstrating empathy and kindness toward other people
|
||||||
|
* Being respectful of differing opinions, viewpoints, and experiences
|
||||||
|
* Giving and gracefully accepting constructive feedback
|
||||||
|
* Accepting responsibility and apologising to those affected by our mistakes,
|
||||||
|
and learning from the experience
|
||||||
|
* Focusing on what is best not just for us as individuals, but for the
|
||||||
|
overall community
|
||||||
|
|
||||||
|
Examples of unacceptable behaviour include:
|
||||||
|
|
||||||
|
* Trolling, insulting or derogatory comments, and personal or political attacks
|
||||||
|
* Public or private harassment
|
||||||
|
* Publishing others' private information, such as a physical or email
|
||||||
|
address, without their explicit permission
|
||||||
|
* Other conduct which could reasonably be considered inappropriate in a
|
||||||
|
professional setting
|
||||||
|
|
||||||
|
## Our Responsibilities
|
||||||
|
|
||||||
|
Project maintainers are responsible for clarifying and enforcing our standards of
|
||||||
|
acceptable behaviour and will take appropriate and fair corrective action in
|
||||||
|
response to any instances of unacceptable behaviour.
|
||||||
|
|
||||||
|
Project maintainers have the right and responsibility to remove, edit, or reject
|
||||||
|
comments, commits, code, wiki edits, issues, and other contributions that are
|
||||||
|
not aligned to this Code of Conduct, or to ban
|
||||||
|
temporarily or permanently any contributor for other behaviours that they deem
|
||||||
|
inappropriate, threatening, offensive, or harmful.
|
||||||
|
|
||||||
|
## Scope
|
||||||
|
|
||||||
|
This Code of Conduct applies within all community spaces, and also applies when
|
||||||
|
an individual is officially representing the community in public spaces.
|
||||||
|
Examples of representing our community include using an official e-mail address,
|
||||||
|
posting via an official social media account, or acting as an appointed
|
||||||
|
representative at an online or offline event.
|
||||||
|
|
||||||
|
## Enforcement
|
||||||
|
|
||||||
|
Instances of abusive, harassing, or otherwise unacceptable behaviour may be
|
||||||
|
reported to the community leaders responsible for enforcement at .
|
||||||
|
All complaints will be reviewed and investigated promptly and fairly.
|
||||||
|
|
||||||
|
All community leaders are obligated to respect the privacy and security of the
|
||||||
|
reporter of any incident.
|
||||||
|
|
||||||
|
## Attribution
|
||||||
|
|
||||||
|
This Code of Conduct is adapted from the [Contributor Covenant](https://contributor-covenant.org/), version
|
||||||
|
[1.4](https://www.contributor-covenant.org/version/1/4/code-of-conduct/code_of_conduct.md) and
|
||||||
|
[2.0](https://www.contributor-covenant.org/version/2/0/code_of_conduct/code_of_conduct.md)
|
||||||
+264
@@ -0,0 +1,264 @@
|
|||||||
|
<!-- omit in toc -->
|
||||||
|
# Contributing to Argenta
|
||||||
|
|
||||||
|
First off, thanks for taking the time to contribute! ❤️
|
||||||
|
|
||||||
|
All types of contributions are encouraged and valued. Please make sure to read the relevant section before making your contribution. It will make it a lot easier for us maintainers and smooth out the experience for all involved. The community looks forward to your contributions. 🎉
|
||||||
|
|
||||||
|
> And if you like the project, but just don't have time to contribute, that's fine. There are other easy ways to support the project and show your appreciation, which we would also be very happy about:
|
||||||
|
> - Star the project
|
||||||
|
> - Tweet about it
|
||||||
|
> - Refer this project in your project's readme
|
||||||
|
> - Mention the project at local meetups and tell your friends/colleagues
|
||||||
|
|
||||||
|
<!-- omit in toc -->
|
||||||
|
## Table of Contents
|
||||||
|
|
||||||
|
- [Code of Conduct](#code-of-conduct)
|
||||||
|
- [I Have a Question](#i-have-a-question)
|
||||||
|
- [I Want To Contribute](#i-want-to-contribute)
|
||||||
|
- [Reporting Bugs](#reporting-bugs)
|
||||||
|
- [Suggesting Enhancements](#suggesting-enhancements)
|
||||||
|
- [Your First Code Contribution](#your-first-code-contribution)
|
||||||
|
- [Improving The Documentation](#improving-the-documentation)
|
||||||
|
- [Styleguides](#styleguides)
|
||||||
|
- [Commit Messages](#commit-messages)
|
||||||
|
- [Join The Project Team](#join-the-project-team)
|
||||||
|
|
||||||
|
|
||||||
|
## Code of Conduct
|
||||||
|
|
||||||
|
This project and everyone participating in it is governed by the
|
||||||
|
[Argenta Code of Conduct](https://github.com/koloideal/Argenta/blob/main/CODE_OF_CONDUCT.md).
|
||||||
|
By participating, you are expected to uphold this code. Please report unacceptable behavior
|
||||||
|
to .
|
||||||
|
|
||||||
|
-----
|
||||||
|
|
||||||
|
## I Have a Question
|
||||||
|
|
||||||
|
> If you want to ask a question, we assume that you have read the available [Documentation](https://argenta.readthedocs.io).
|
||||||
|
|
||||||
|
Before you ask a question, it is best to search for existing [Issues](https://github.com/koloideal/Argenta/issues) that might help you. In case you have found a suitable issue and still need clarification, you can write your question in this issue. It is also advisable to search the internet for answers first.
|
||||||
|
|
||||||
|
If you then still feel the need to ask a question and need clarification, we recommend the following:
|
||||||
|
|
||||||
|
- Open an [Issue](https://github.com/koloideal/Argenta/issues/new).
|
||||||
|
- Provide as much context as you can about what you're running into.
|
||||||
|
- Provide project and platform versions (cpython, pip, etc), depending on what seems relevant.
|
||||||
|
|
||||||
|
We will then take care of the issue as soon as possible.
|
||||||
|
|
||||||
|
<!--
|
||||||
|
You might want to create a separate issue tag for questions and include it in this description. People should then tag their issues accordingly.
|
||||||
|
|
||||||
|
Depending on how large the project is, you may want to outsource the questioning, e.g. to Stack Overflow or Gitter. You may add additional contact and information possibilities:
|
||||||
|
- IRC
|
||||||
|
- Slack
|
||||||
|
- Gitter
|
||||||
|
- Stack Overflow tag
|
||||||
|
- Blog
|
||||||
|
- FAQ
|
||||||
|
- Roadmap
|
||||||
|
- E-Mail List
|
||||||
|
- Forum
|
||||||
|
-->
|
||||||
|
|
||||||
|
-----
|
||||||
|
|
||||||
|
## I Want To Contribute
|
||||||
|
|
||||||
|
> ### Legal Notice <!-- omit in toc -->
|
||||||
|
> When contributing to this project, you must agree that you have authored 100% of the content, that you have the necessary rights to the content and that the content you contribute may be provided under the project licence.
|
||||||
|
|
||||||
|
### Reporting Bugs
|
||||||
|
|
||||||
|
<!-- omit in toc -->
|
||||||
|
#### Before Submitting a Bug Report
|
||||||
|
|
||||||
|
A good bug report shouldn't leave others needing to chase you up for more information. Therefore, we ask you to investigate carefully, collect information and describe the issue in detail in your report. Please complete the following steps in advance to help us fix any potential bug as fast as possible.
|
||||||
|
|
||||||
|
- Make sure that you are using the latest version.
|
||||||
|
- Determine if your bug is really a bug and not an error on your side e.g. using incompatible environment components/versions (Make sure that you have read the [documentation](https://argenta.readthedocs.io). If you are looking for support, you might want to check [this section](#i-have-a-question)).
|
||||||
|
- To see if other users have experienced (and potentially already solved) the same issue you are having, check if there is not already a bug report existing for your bug or error in the [bug tracker](https://github.com/koloideal/Argenta/issues?q=label%3Abug).
|
||||||
|
- Also make sure to search the internet (including Stack Overflow) to see if users outside of the GitHub community have discussed the issue.
|
||||||
|
- Collect information about the bug:
|
||||||
|
- Stack trace (Traceback)
|
||||||
|
- OS, Platform and Version (Windows, Linux, macOS, x86, ARM)
|
||||||
|
- Version of the interpreter, compiler, SDK, runtime environment, package manager, depending on what seems relevant.
|
||||||
|
- Possibly your input and the output
|
||||||
|
- Can you reliably reproduce the issue? And can you also reproduce it with older versions?
|
||||||
|
|
||||||
|
<!-- omit in toc -->
|
||||||
|
#### How Do I Submit a Good Bug Report?
|
||||||
|
|
||||||
|
> You must never report security related issues, vulnerabilities or bugs including sensitive information to the issue tracker, or elsewhere in public. Instead sensitive bugs must be sent by email to .
|
||||||
|
<!-- You may add a PGP key to allow the messages to be sent encrypted as well. -->
|
||||||
|
|
||||||
|
We use GitHub issues to track bugs and errors. If you run into an issue with the project:
|
||||||
|
|
||||||
|
- Open an [Issue](https://github.com/koloideal/Argenta/issues/new). (Since we can't be sure at this point whether it is a bug or not, we ask you not to talk about a bug yet and not to label the issue.)
|
||||||
|
- Explain the behavior you would expect and the actual behavior.
|
||||||
|
- Please provide as much context as possible and describe the *reproduction steps* that someone else can follow to recreate the issue on their own. This usually includes your code. For good bug reports you should isolate the problem and create a reduced test case.
|
||||||
|
- Provide the information you collected in the previous section.
|
||||||
|
|
||||||
|
Once it's filed:
|
||||||
|
|
||||||
|
- The project team will label the issue accordingly.
|
||||||
|
- A team member will try to reproduce the issue with your provided steps. If there are no reproduction steps or no obvious way to reproduce the issue, the team will ask you for those steps and mark the issue as `needs-repro`. Bugs with the `needs-repro` tag will not be addressed until they are reproduced.
|
||||||
|
- If the team is able to reproduce the issue, it will be marked `needs-fix`, as well as possibly other tags (such as `critical`), and the issue will be left to be [implemented by someone](#your-first-code-contribution).
|
||||||
|
|
||||||
|
<!-- You might want to create an issue template for bugs and errors that can be used as a guide and that defines the structure of the information to be included. If you do so, reference it here in the description. -->
|
||||||
|
|
||||||
|
-----
|
||||||
|
|
||||||
|
### Suggesting Enhancements
|
||||||
|
|
||||||
|
This section guides you through submitting an enhancement suggestion for Argenta, **including completely new features and minor improvements to existing functionality**. Following these guidelines will help maintainers and the community to understand your suggestion and find related suggestions.
|
||||||
|
|
||||||
|
<!-- omit in toc -->
|
||||||
|
#### Before Submitting an Enhancement
|
||||||
|
|
||||||
|
- Make sure that you are using the latest version.
|
||||||
|
- Read the [documentation](https://argenta.readthedocs.io) carefully and find out if the functionality is already covered, maybe by an individual configuration.
|
||||||
|
- Perform a [search](https://github.com/koloideal/Argenta/issues) to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
|
||||||
|
- Find out whether your idea fits with the scope and aims of the project. It's up to you to make a strong case to convince the project's developers of the merits of this feature. Keep in mind that we want features that will be useful to the majority of our users and not just a small subset. If you're just targeting a minority of users, consider writing an add-on/plugin library.
|
||||||
|
|
||||||
|
<!-- omit in toc -->
|
||||||
|
#### How Do I Submit a Good Enhancement Suggestion?
|
||||||
|
|
||||||
|
Enhancement suggestions are tracked as [GitHub issues](https://github.com/koloideal/Argenta/issues).
|
||||||
|
|
||||||
|
- Use a **clear and descriptive title** for the issue to identify the suggestion.
|
||||||
|
- Provide a **step-by-step description of the suggested enhancement** in as many details as possible.
|
||||||
|
- **Describe the current behavior** and **explain which behavior you expected to see instead** and why. At this point you can also tell which alternatives do not work for you.
|
||||||
|
- You may want to **include screenshots or screen recordings** which help you demonstrate the steps or point out the part which the suggestion is related to. You can use [LICEcap](https://www.cockos.com/licecap/) to record GIFs on macOS and Windows, and the built-in [screen recorder in GNOME](https://help.gnome.org/users/gnome-help/stable/screen-shot-record.html.en) or [SimpleScreenRecorder](https://github.com/MaartenBaert/ssr) on Linux. <!-- this should only be included if the project has a GUI -->
|
||||||
|
- **Explain why this enhancement would be useful** to most Argenta users. You may also want to point out the other projects that solved it better and which could serve as inspiration.
|
||||||
|
|
||||||
|
<!-- You might want to create an issue template for enhancement suggestions that can be used as a guide and that defines the structure of the information to be included. If you do so, reference it here in the description. -->
|
||||||
|
|
||||||
|
-----
|
||||||
|
|
||||||
|
### Your First Code Contribution
|
||||||
|
|
||||||
|
Unsure where to begin contributing to Argenta? You can start by looking through `good first issue` and `help wanted` issues on our GitHub repository. These are issues that are well-suited for new contributors.
|
||||||
|
|
||||||
|
To get started with your first code contribution, please follow these steps to set up your local development environment.
|
||||||
|
|
||||||
|
1. Fork the `Argenta` repository on GitHub.
|
||||||
|
2. Clone your forked repository to your local machine:
|
||||||
|
```bash
|
||||||
|
git clone https://github.com/<YOUR_USERNAME>/Argenta.git
|
||||||
|
cd Argenta
|
||||||
|
```
|
||||||
|
3. Create and activate a Python virtual environment.
|
||||||
|
```bash
|
||||||
|
# For macOS/Linux
|
||||||
|
python3 -m venv .venv
|
||||||
|
source .venv/bin/activate
|
||||||
|
|
||||||
|
# For Windows
|
||||||
|
python -m venv .venv
|
||||||
|
.venv\Scripts\activate
|
||||||
|
```
|
||||||
|
4. Install the project dependencies, including the development tools.
|
||||||
|
```bash
|
||||||
|
pip install -e .[dev]
|
||||||
|
```
|
||||||
|
5. Create a new branch for your feature or bug fix. Use a descriptive name, like `fix/login-bug` or `feat/new-widget`.
|
||||||
|
```bash
|
||||||
|
git checkout -b your-new-branch-name
|
||||||
|
```
|
||||||
|
6. Make your changes! Write your code, and don't forget to add or update tests for your changes.
|
||||||
|
7. Run the test suite to ensure everything is working correctly.
|
||||||
|
```bash
|
||||||
|
python -m pytest tests
|
||||||
|
```
|
||||||
|
8. Commit your changes following our commit message styleguide and push them to your fork.
|
||||||
|
```bash
|
||||||
|
git add .
|
||||||
|
git commit -m "feat(widget): add the new super widget"
|
||||||
|
git push origin your-new-branch-name
|
||||||
|
```
|
||||||
|
9. Open a Pull Request from your forked branch to the `main` branch of the official Argenta repository. Provide a clear description of the problem and your solution. Include the relevant issue number if applicable.
|
||||||
|
|
||||||
|
-----
|
||||||
|
|
||||||
|
### Improving The Documentation
|
||||||
|
|
||||||
|
Good documentation is crucial for any project. We use Sphinx to generate our documentation from source files located in the `docs/` directory. We welcome any improvements, from fixing a simple typo to writing a whole new section.
|
||||||
|
|
||||||
|
We support documentation in two languages: Russian and English
|
||||||
|
|
||||||
|
To improve the documentation, you can follow a similar workflow as for code contributions:
|
||||||
|
|
||||||
|
1. Ensure your development environment is set up as described in the "Your First Code Contribution" section.
|
||||||
|
2. Navigate to the documentation directory.
|
||||||
|
```bash
|
||||||
|
cd docs
|
||||||
|
```
|
||||||
|
3. Make the necessary changes to the **Russian** version of the documentation - ``docs/index.rst`` and ``docs/root/*``
|
||||||
|
4. To build the documentation locally and see your changes, run:
|
||||||
|
```bash
|
||||||
|
make live-ru
|
||||||
|
```
|
||||||
|
5. Open `127.0.0.1:8000` in your web browser to preview the generated documentation.
|
||||||
|
6. Make your desired changes to the `.rst` or `.md` files in the `docs/source` directory.
|
||||||
|
7. After completing the work on the Russian documentation, it is necessary to create an English translation:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
make update-langs
|
||||||
|
```
|
||||||
|
8. After updating the translation template, update the necessary translation files located at ``docs/locales/en/LC_MESSAGES``
|
||||||
|
8. Once you are happy with your changes, commit them and open a Pull Request. Use the `docs:` prefix in your commit message.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Styleguides
|
||||||
|
|
||||||
|
### Commit Messages
|
||||||
|
|
||||||
|
We follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification for our commit messages. This leads to more readable messages that are easy to follow when looking through the project history and allows for automated changelog generation.
|
||||||
|
|
||||||
|
Each commit message consists of a **header**, a **body**, and a **footer**.
|
||||||
|
|
||||||
|
```
|
||||||
|
<type>(<scope>): <subject>
|
||||||
|
|
||||||
|
[optional body]
|
||||||
|
|
||||||
|
[optional footer]
|
||||||
|
```
|
||||||
|
|
||||||
|
The `<type>` must be one of the following:
|
||||||
|
|
||||||
|
* **feat**: A new feature for the user.
|
||||||
|
* **fix**: A bug fix for the user.
|
||||||
|
* **docs**: Documentation only changes.
|
||||||
|
* **style**: Changes that do not affect the meaning of the code (white-space, formatting, etc).
|
||||||
|
* **refactor**: A code change that neither fixes a bug nor adds a feature.
|
||||||
|
* **perf**: A code change that improves performance.
|
||||||
|
* **test**: Adding missing tests or correcting existing tests.
|
||||||
|
* **chore**: Changes to the build process or auxiliary tools and libraries.
|
||||||
|
|
||||||
|
#### Examples
|
||||||
|
|
||||||
|
A simple fix:
|
||||||
|
``fix: correct typo in user authentication flow``
|
||||||
|
|
||||||
|
A new feature with a scope:
|
||||||
|
``feat(api): add new endpoint for user profiles``
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Join The Project Team
|
||||||
|
|
||||||
|
We are always looking for enthusiastic and dedicated people to join our project team. If you are a regular contributor and have shown a deep understanding of the project's goals and architecture, you might be a good candidate to become a maintainer.
|
||||||
|
|
||||||
|
Active members of the community can become team members. This typically involves:
|
||||||
|
|
||||||
|
* Consistently contributing high-quality code and documentation.
|
||||||
|
* Helping other users by answering questions and triaging issues.
|
||||||
|
* Reviewing Pull Requests from other contributors with constructive feedback.
|
||||||
|
|
||||||
|
If you are interested in becoming a more permanent part of the team, the best way to start is by being an active and helpful member of the community. The existing maintainers will notice your efforts and may reach out with an invitation to join the team.
|
||||||
+108
@@ -0,0 +1,108 @@
|
|||||||
|

|
||||||
|
|
||||||
|
**Argenta** — это простой и элегантный фреймворк для создания модульных CLI-приложений. Он предоставляет чистый и интуитивный способ создания контекстно-зависимых инструментов командной строки с изолированными областями команд.
|
||||||
|
|
||||||
|
Argenta — это **"Самый простой"**, **"Самый модульный"** и **"Самый элегантный"** способ создания интерактивных CLI-приложений на Python.
|
||||||
|
|
||||||
|
📖 **Читайте полную документацию:** [argenta.readthedocs.io](https://argenta.readthedocs.io/)<br>
|
||||||
|
🌍 **Другие языки:** [EN](https://github.com/koloideal/Argenta/blob/main/README.md)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
**Argenta** позволяет создавать интерактивные CLI-приложения невероятно легко. Не нужно вручную парсить сложные структуры команд или управлять переходами состояний — просто используйте роутеры и команды!
|
||||||
|
|
||||||
|
## ✨ Установка Argenta
|
||||||
|
|
||||||
|
Argenta доступна на ``PyPI``:
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ python -m pip install argenta
|
||||||
|
```
|
||||||
|
|
||||||
|
или с использованием ``uv``:
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ uv add argenta
|
||||||
|
```
|
||||||
|
|
||||||
|
Argenta официально поддерживает Python 3.12+.
|
||||||
|
|
||||||
|
## 🚀 Поддерживаемые возможности и лучшие практики
|
||||||
|
|
||||||
|
Argenta готова к требованиям создания масштабируемых, надежных и поддерживаемых CLI-приложений.
|
||||||
|
|
||||||
|
- **Интерактивные сессии**: В отличие от традиционных CLI-инструментов, ``Argenta`` создаёт циклические сессии, позволяя пользователю выполнять команды последовательно, не перезапуская приложение.
|
||||||
|
- **Декларативный синтаксис**: Команды и их обработчики объявляются с помощью простых декораторов, что делает код интуитивно понятным и позволяет сосредоточиться на том, "что" вы хотите сделать, а не "как".
|
||||||
|
- **Нативный DI**: Благодаря интеграции с [dishka](https://dishka.readthedocs.io/en/stable/), вы можете легко внедрять зависимости прямо в обработчики команд, что упрощает их тестирование, позволяет избежать мутабельных глобалов и многое другое.
|
||||||
|
- **Автоматическая валидация и парсинг**: Библиотека берёт на себя обработку флагов и аргументов командной строки, включая их парсинг, валидацию и преобразование типов.
|
||||||
|
- **Гибкая настройка**: Вы можете легко кастомизировать системные сообщения, форматирование вывода, ссоздавать кастомные обработчики нестандартного поведения и т.д.
|
||||||
|
|
||||||
|
Нужно что-то еще? Создайте **issue**, мы открыты к предложениям.
|
||||||
|
|
||||||
|
## 📝 Зачем мы это создали?
|
||||||
|
|
||||||
|
Создание сложных CLI-приложений часто требует управления различными контекстами и областями команд. Например, при создании утилиты, подобной Metasploit Framework, пользователям нужно входить в определенные области (например, выбирать модуль сканирования), а затем получать доступ к командам, специфичным только для этого контекста.
|
||||||
|
|
||||||
|
Традиционные CLI-фреймворки не предоставляют элегантного способа обработки такой модульной, контекстно-зависимой архитектуры. Argenta была создана для решения этой проблемы, предоставляя простой и лаконичный способ инкапсуляции CLI-функциональности в изолированные, абстрагированные среды.
|
||||||
|
|
||||||
|
Мы считаем, что создание CLI-приложений должно быть таким же приятным, как создание веб-приложений с современными фреймворками. Argenta привносит паттерн роутеров и чистое разделение ответственности в мир CLI.
|
||||||
|
|
||||||
|
## 🚀 Быстрый старт
|
||||||
|
|
||||||
|
Вот простой пример для начала работы:
|
||||||
|
|
||||||
|
```python
|
||||||
|
# routers.py
|
||||||
|
from argenta import Router, Response
|
||||||
|
from argenta.command import Flag, Command
|
||||||
|
|
||||||
|
router = Router()
|
||||||
|
|
||||||
|
@router.command(Command("hello"))
|
||||||
|
def handler(response: Response):
|
||||||
|
"""Простая команда hello world"""
|
||||||
|
print("Привет, мир!")
|
||||||
|
|
||||||
|
@router.command(Command("greet", flags=Flag('name')))
|
||||||
|
def greet_handler(response: Response):
|
||||||
|
"""Поприветствовать пользователя по имени"""
|
||||||
|
name_flag = response.input_flags.get_flag_by_name('name')
|
||||||
|
if name_flag:
|
||||||
|
print(f"Привет, {name_flag.input_value}!")
|
||||||
|
else:
|
||||||
|
print("Привет, Незнакомец!")
|
||||||
|
```
|
||||||
|
|
||||||
|
```python
|
||||||
|
# main.py
|
||||||
|
from argenta import App, Orchestrator
|
||||||
|
from .routers import router
|
||||||
|
|
||||||
|
app = App()
|
||||||
|
orchestrator = Orchestrator()
|
||||||
|
|
||||||
|
def main() -> None:
|
||||||
|
# Подключите ваши роутеры
|
||||||
|
app.include_router(router)
|
||||||
|
|
||||||
|
# Запустите интерактивный CLI
|
||||||
|
orchestrator.start_polling(app)
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
||||||
|
```
|
||||||
|
|
||||||
|
Вот и всё! Теперь у вас есть полностью функциональное интерактивное CLI-приложение.
|
||||||
|
|
||||||
|
## 📚 Документация
|
||||||
|
|
||||||
|
Полная документация доступна на [argenta.readthedocs.io](https://argenta.readthedocs.io/)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
MIT 2025 kolo | made by [kolo](https://t.me/kolo_id)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
+54
@@ -0,0 +1,54 @@
|
|||||||
|
# Security Policy
|
||||||
|
|
||||||
|
The Argenta team takes security seriously. We appreciate your efforts to responsibly disclose your findings, and we will make every effort to acknowledge your contributions.
|
||||||
|
|
||||||
|
## Supported Versions
|
||||||
|
|
||||||
|
This table shows the versions of Argenta that are currently supported with security updates.
|
||||||
|
|
||||||
|
| Version | Supported |
|
||||||
|
|---------|-----------------|
|
||||||
|
| 1.1.x | ✅ |
|
||||||
|
| < 1.1 | ❌ |
|
||||||
|
|
||||||
|
## Reporting a Vulnerability
|
||||||
|
|
||||||
|
If you believe you have found a security vulnerability in Argenta, please report it to us through one of the following methods:
|
||||||
|
|
||||||
|
- **Email**: Send a detailed report to `kolo.is.main@gmailcom`.
|
||||||
|
- **GitHub Security Advisories**: You can create a new security advisory directly in the Argenta repository.
|
||||||
|
|
||||||
|
**Please do not report security vulnerabilities through public GitHub issues.**
|
||||||
|
|
||||||
|
### What to Include
|
||||||
|
|
||||||
|
To help us understand and resolve the issue quickly, please include the following information in your report:
|
||||||
|
|
||||||
|
- A clear and descriptive title.
|
||||||
|
- The affected version(s) of Argenta.
|
||||||
|
- A detailed description of the vulnerability.
|
||||||
|
- Step-by-step instructions to reproduce the issue (a Proof-of-Concept).
|
||||||
|
- The potential impact of the vulnerability.
|
||||||
|
- Any suggested mitigations or fixes, if you have any.
|
||||||
|
|
||||||
|
You can expect a response from us within 48 hours to acknowledge receipt of your report.
|
||||||
|
|
||||||
|
## Disclosure Process
|
||||||
|
|
||||||
|
1. Upon receiving a vulnerability report, we will assign it to a team member and begin our investigation.
|
||||||
|
2. We will confirm the vulnerability and determine its severity.
|
||||||
|
3. We will work on a patch to address the issue.
|
||||||
|
4. Once the patch is ready, we will coordinate with you to schedule a release and a public disclosure. We prefer to disclose vulnerabilities through a GitHub Security Advisory.
|
||||||
|
5. We will credit you for your discovery in the advisory, unless you prefer to remain anonymous.
|
||||||
|
|
||||||
|
## Security Best Practices
|
||||||
|
|
||||||
|
As a user of Argenta, we recommend the following best practices to keep your application secure:
|
||||||
|
|
||||||
|
- Always use the latest version of Argenta.
|
||||||
|
- Regularly scan your project's dependencies for known vulnerabilities.
|
||||||
|
- If your application handles sensitive data, ensure it is stored and transmitted securely.
|
||||||
|
|
||||||
|
## Bug Bounty Program
|
||||||
|
|
||||||
|
Currently, we do not have a formal bug bounty program. However, we deeply appreciate the work of security researchers and may offer non-monetary recognition for significant contributions.
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
_build/
|
||||||
|
_static/
|
||||||
|
*.mo
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
# Minimal makefile for Sphinx documentation
|
||||||
|
#
|
||||||
|
|
||||||
|
# You can set these variables from the command line, and also
|
||||||
|
# from the environment for the first two.
|
||||||
|
SPHINXOPTS ?=
|
||||||
|
SPHINXBUILD ?= sphinx-build
|
||||||
|
SOURCEDIR = .
|
||||||
|
BUILDDIR = _build
|
||||||
|
LANGUAGES = en ru
|
||||||
|
|
||||||
|
build-all:
|
||||||
|
sphinx-build -b html -D language=ru $(SOURCEDIR) $(BUILDDIR)/html/ru
|
||||||
|
sphinx-build -b html -D language=en $(SOURCEDIR) $(BUILDDIR)/html/en
|
||||||
|
|
||||||
|
# Put it first so that "make" without argument is like "make help".
|
||||||
|
help:
|
||||||
|
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||||
|
|
||||||
|
live-ru:
|
||||||
|
sphinx-autobuild -b html . _build/html/ru -D language=ru
|
||||||
|
|
||||||
|
live-en:
|
||||||
|
sphinx-autobuild -b html . _build/html/en -D language=en
|
||||||
|
|
||||||
|
update-langs:
|
||||||
|
sphinx-build -b gettext . _build/gettext
|
||||||
|
sphinx-intl update -p _build/gettext -l en
|
||||||
|
|
||||||
|
.PHONY: help Makefile serve-all
|
||||||
|
|
||||||
|
# Catch-all target: route all unknown targets to Sphinx using the new
|
||||||
|
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
||||||
|
%: Makefile
|
||||||
|
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
from argenta import App, Orchestrator
|
||||||
|
from argenta.orchestrator.argparser import ArgParser, BooleanArgument
|
||||||
|
|
||||||
|
arg_parser = ArgParser(
|
||||||
|
processed_args=[
|
||||||
|
BooleanArgument("dev")
|
||||||
|
]
|
||||||
|
)
|
||||||
|
orchestrator = Orchestrator(
|
||||||
|
arg_parser=arg_parser,
|
||||||
|
)
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
if arg_parser.parsed_argspace.get_by_name("dev"):
|
||||||
|
orchestrator.start_polling(App(initial_message="ArgentaDev"))
|
||||||
|
else:
|
||||||
|
orchestrator.start_polling(App())
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
from argenta import App, Orchestrator
|
||||||
|
from argenta.orchestrator.argparser import ArgParser, ValueArgument
|
||||||
|
|
||||||
|
arguments = [
|
||||||
|
ValueArgument("host", help="Server host", is_required=True),
|
||||||
|
ValueArgument("port", help="Server port", is_required=True),
|
||||||
|
]
|
||||||
|
|
||||||
|
argparser = ArgParser(processed_args=arguments, name="WebServer", description="Simple web server")
|
||||||
|
|
||||||
|
app = App()
|
||||||
|
orchestrator = Orchestrator(argparser)
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
argspace = argparser.parsed_argspace
|
||||||
|
|
||||||
|
host = argspace.get_by_name("host")
|
||||||
|
port = argspace.get_by_name("port")
|
||||||
|
|
||||||
|
print("Server configuration:")
|
||||||
|
print(f" Host: {host.value}")
|
||||||
|
print(f" Port: {port.value}")
|
||||||
|
|
||||||
|
orchestrator.start_polling(app)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
from argenta import Response, Router
|
||||||
|
from argenta.di import FromDishka
|
||||||
|
from argenta.orchestrator.argparser import ArgSpace
|
||||||
|
|
||||||
|
router = Router()
|
||||||
|
|
||||||
|
|
||||||
|
@router.command("get_args")
|
||||||
|
async def get_args(response: Response, argspace: FromDishka[ArgSpace]):
|
||||||
|
print(argspace.all_arguments)
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
from argenta import Response, Router
|
||||||
|
from argenta.di import FromDishka
|
||||||
|
from argenta.orchestrator.argparser import ArgSpace, BooleanArgument, ValueArgument
|
||||||
|
|
||||||
|
router = Router()
|
||||||
|
|
||||||
|
|
||||||
|
@router.command("get_args")
|
||||||
|
def get_args(response: Response, argspace: FromDishka[ArgSpace]):
|
||||||
|
# Get all boolean flags
|
||||||
|
boolean_flags = argspace.get_by_type(BooleanArgument)
|
||||||
|
print(f"Active flags: {[arg.name for arg in boolean_flags if arg.value]}")
|
||||||
|
|
||||||
|
# Get all value arguments
|
||||||
|
value_args = argspace.get_by_type(ValueArgument)
|
||||||
|
for arg in value_args:
|
||||||
|
print(f"{arg.name} = {arg.value}")
|
||||||
|
|
||||||
|
# Count arguments of each type
|
||||||
|
print(f"Boolean arguments: {len(argspace.get_by_type(BooleanArgument))}")
|
||||||
|
print(f"Value arguments: {len(argspace.get_by_type(ValueArgument))}")
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
from argenta import Response, Router
|
||||||
|
from argenta.di import FromDishka
|
||||||
|
from argenta.orchestrator.argparser import ArgSpace
|
||||||
|
|
||||||
|
router = Router()
|
||||||
|
|
||||||
|
|
||||||
|
@router.command("get_args")
|
||||||
|
def get_args(response: Response, argspace: FromDishka[ArgSpace]):
|
||||||
|
config_arg = argspace.get_by_name("config")
|
||||||
|
if config_arg:
|
||||||
|
print(f"Config path: {config_arg.value}")
|
||||||
|
|
||||||
|
verbose_arg = argspace.get_by_name("verbose")
|
||||||
|
if verbose_arg and verbose_arg.value:
|
||||||
|
print("Verbose mode enabled")
|
||||||
|
|
||||||
|
unknown_arg = argspace.get_by_name("nonexistent")
|
||||||
|
if unknown_arg is None:
|
||||||
|
print("Argument not found")
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
from argenta.orchestrator.argparser import ArgParser, ValueArgument
|
||||||
|
|
||||||
|
# Create arguments
|
||||||
|
config_arg = ValueArgument("config", help="Path to configuration file", default="config.yaml")
|
||||||
|
|
||||||
|
log_level_arg = ValueArgument(
|
||||||
|
"log-level",
|
||||||
|
help="Logging level",
|
||||||
|
possible_values=["DEBUG", "INFO", "WARNING", "ERROR"],
|
||||||
|
default="INFO",
|
||||||
|
)
|
||||||
|
|
||||||
|
host_arg = ValueArgument("host", help="Server host address", is_required=True)
|
||||||
|
|
||||||
|
# Register in ArgParser
|
||||||
|
parser = ArgParser(
|
||||||
|
processed_args=[config_arg, log_level_arg, host_arg],
|
||||||
|
name="MyApp",
|
||||||
|
description="My application with CLI arguments",
|
||||||
|
)
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
from argenta.orchestrator.argparser import ArgParser, BooleanArgument
|
||||||
|
|
||||||
|
# Create boolean arguments
|
||||||
|
verbose_arg = BooleanArgument("verbose", help="Enable verbose output")
|
||||||
|
debug_arg = BooleanArgument("debug", help="Enable debug mode")
|
||||||
|
no_cache_arg = BooleanArgument("no-cache", help="Disable caching")
|
||||||
|
|
||||||
|
# Register in ArgParser
|
||||||
|
parser = ArgParser(processed_args=[verbose_arg, debug_arg, no_cache_arg], name="MyApp")
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
from argenta import App
|
||||||
|
from argenta.app import AutoCompleter
|
||||||
|
|
||||||
|
# Setting up autocompletion with saving history to a file
|
||||||
|
my_autocompleter = AutoCompleter(history_filename="argenta_history.txt")
|
||||||
|
|
||||||
|
# Passing the configured autocompleter to the application
|
||||||
|
app = App(autocompleter=my_autocompleter)
|
||||||
|
|
||||||
|
# ... the rest of the application logic
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
from argenta.command import Flag, Flags, Command
|
||||||
|
|
||||||
|
# Simple command without flags
|
||||||
|
hello_cmd = Command("hello", description="Greet the user")
|
||||||
|
|
||||||
|
# Command with description and aliases
|
||||||
|
quit_cmd = Command("quit", description="Exit the application", aliases=["exit", "q"])
|
||||||
|
|
||||||
|
# Command with flags
|
||||||
|
deploy_cmd = Command(
|
||||||
|
"deploy",
|
||||||
|
description="Deploy application to server",
|
||||||
|
flags=Flags(
|
||||||
|
[
|
||||||
|
Flag("env", possible_values=["dev", "prod"]),
|
||||||
|
Flag("force"),
|
||||||
|
]
|
||||||
|
),
|
||||||
|
aliases=["dep"],
|
||||||
|
)
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
from argenta import Command, Response, Router
|
||||||
|
|
||||||
|
router = Router(title="User Management")
|
||||||
|
|
||||||
|
|
||||||
|
@router.command(Command("create-user", description="Create a new user account"))
|
||||||
|
def handle_create_user(response: Response):
|
||||||
|
print("Creating new user...")
|
||||||
|
|
||||||
|
|
||||||
|
@router.command(
|
||||||
|
Command(
|
||||||
|
"delete-user",
|
||||||
|
description="Delete existing user account",
|
||||||
|
aliases=["remove-user", "rm-user"],
|
||||||
|
)
|
||||||
|
)
|
||||||
|
def handle_delete_user(response: Response):
|
||||||
|
print("Deleting user...")
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
from argenta import Command, Response, Router
|
||||||
|
from argenta.command import Flag, Flags
|
||||||
|
|
||||||
|
router = Router(title="Server Management")
|
||||||
|
|
||||||
|
|
||||||
|
@router.command(
|
||||||
|
Command(
|
||||||
|
"start",
|
||||||
|
description="Start the server",
|
||||||
|
flags=Flags(
|
||||||
|
[
|
||||||
|
Flag("port"),
|
||||||
|
Flag("host"),
|
||||||
|
Flag("debug"),
|
||||||
|
]
|
||||||
|
),
|
||||||
|
aliases=["run"],
|
||||||
|
)
|
||||||
|
)
|
||||||
|
def handle_start(response: Response):
|
||||||
|
input_flags = response.input_flags
|
||||||
|
port_flag = input_flags.get_flag_by_name("port")
|
||||||
|
host_flag = input_flags.get_flag_by_name("host")
|
||||||
|
debug_flag = input_flags.get_flag_by_name("debug")
|
||||||
|
|
||||||
|
host = host_flag.input_value if host_flag else "localhost"
|
||||||
|
port = port_flag.input_value if port_flag else "8080"
|
||||||
|
debug = debug_flag and debug_flag.input_value
|
||||||
|
|
||||||
|
print(f"Starting server on {host}:{port}")
|
||||||
|
if debug:
|
||||||
|
print("Debug mode: ON")
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
from argenta.command import InputCommand
|
||||||
|
|
||||||
|
# Parse command without flags
|
||||||
|
cmd1 = InputCommand.parse("hello")
|
||||||
|
print(cmd1.trigger) # "hello"
|
||||||
|
print(len(cmd1.input_flags)) # 0
|
||||||
|
|
||||||
|
# Parse command with flags
|
||||||
|
cmd2 = InputCommand.parse("deploy --env prod --force")
|
||||||
|
print(cmd2.trigger) # "deploy"
|
||||||
|
print(len(cmd2.input_flags)) # 2
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
from argenta import Router, Command, Response
|
||||||
|
|
||||||
|
router = Router(title="System")
|
||||||
|
|
||||||
|
|
||||||
|
@router.command(
|
||||||
|
Command(
|
||||||
|
"shutdown",
|
||||||
|
description="Shutdown the system",
|
||||||
|
aliases=["poweroff", "halt", "stop"]
|
||||||
|
)
|
||||||
|
)
|
||||||
|
def handle_shutdown(response: Response):
|
||||||
|
print("Shutting down the system...")
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
from sqlite3 import Connection
|
||||||
|
from argenta import Response, Router
|
||||||
|
from argenta.di import FromDishka
|
||||||
|
|
||||||
|
router = Router()
|
||||||
|
|
||||||
|
@router.command("connect")
|
||||||
|
def connect_handler(response: Response, connection: FromDishka[Connection]):
|
||||||
|
connection.execute("...")
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
import sqlite3
|
||||||
|
from sqlite3 import Connection
|
||||||
|
from typing import Iterable
|
||||||
|
|
||||||
|
from dishka import Provider, Scope, provide
|
||||||
|
|
||||||
|
|
||||||
|
class ConnectionProvider(Provider):
|
||||||
|
@provide(scope=Scope.REQUEST)
|
||||||
|
def new_connection(self) -> Iterable[Connection]:
|
||||||
|
conn = sqlite3.connect(":memory:")
|
||||||
|
yield conn
|
||||||
|
conn.close()
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
from argenta import Orchestrator
|
||||||
|
|
||||||
|
orchestrator = Orchestrator(custom_providers=[ConnectionProvider()])
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
from argenta import Response, Router
|
||||||
|
from argenta.di import FromDishka
|
||||||
|
from argenta.orchestrator.argparser import ArgSpace
|
||||||
|
|
||||||
|
router = Router()
|
||||||
|
|
||||||
|
@router.command("info")
|
||||||
|
def connect_handler(response: Response, argspace: FromDishka[ArgSpace]):
|
||||||
|
print(argspace.get_by_name("type"))
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
from argenta import App
|
||||||
|
|
||||||
|
def empty_command_handler():
|
||||||
|
print("Empty command handler called")
|
||||||
|
|
||||||
|
app: App = App()
|
||||||
|
app.set_empty_command_handler(empty_command_handler)
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
from argenta import App
|
||||||
|
|
||||||
|
def incorrect_input_syntax_handler(raw_command: str):
|
||||||
|
print(f"Incorrect input syntax for command: {raw_command}")
|
||||||
|
|
||||||
|
app: App = App()
|
||||||
|
app.set_incorrect_input_syntax_handler(incorrect_input_syntax_handler)
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
from argenta import App
|
||||||
|
|
||||||
|
def repeated_input_flags_handler(raw_command: str):
|
||||||
|
print(f"Repeated input flags: {raw_command}")
|
||||||
|
|
||||||
|
app: App = App()
|
||||||
|
app.set_repeated_input_flags_handler(repeated_input_flags_handler)
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
from argenta import App
|
||||||
|
|
||||||
|
def empty_command_handler():
|
||||||
|
print("Empty input command")
|
||||||
|
|
||||||
|
app: App = App()
|
||||||
|
app.set_empty_command_handler(empty_command_handler)
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
from argenta import App
|
||||||
|
from argenta.command import InputCommand
|
||||||
|
|
||||||
|
def unknown_command_handler(command: InputCommand):
|
||||||
|
print(f"Unknown input command with trigger: {command.trigger}")
|
||||||
|
|
||||||
|
app: App = App()
|
||||||
|
app.set_unknown_command_handler(unknown_command_handler)
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
from argenta import App, Response
|
||||||
|
|
||||||
|
def exit_command_handler(response: Response):
|
||||||
|
print("Exit command handler")
|
||||||
|
|
||||||
|
app: App = App()
|
||||||
|
app.set_exit_command_handler(exit_command_handler)
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
from argenta.command import Flags, PredefinedFlags
|
||||||
|
|
||||||
|
# Using predefined flags when creating a command
|
||||||
|
command_flags = Flags(
|
||||||
|
[
|
||||||
|
PredefinedFlags.HELP,
|
||||||
|
PredefinedFlags.SHORT_HELP,
|
||||||
|
PredefinedFlags.INFO,
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
# Using Network Flags
|
||||||
|
network_flags = Flags(
|
||||||
|
[
|
||||||
|
PredefinedFlags.HOST,
|
||||||
|
PredefinedFlags.PORT,
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
# Validating the values of predefined flags
|
||||||
|
print(PredefinedFlags.HOST.validate_input_flag_value("192.168.1.1")) # True
|
||||||
|
print(PredefinedFlags.HOST.validate_input_flag_value("invalid")) # False
|
||||||
|
|
||||||
|
print(PredefinedFlags.PORT.validate_input_flag_value("8080")) # True
|
||||||
|
print(PredefinedFlags.PORT.validate_input_flag_value("99999")) # True
|
||||||
|
print(PredefinedFlags.PORT.validate_input_flag_value("abc")) # False
|
||||||
|
|
||||||
|
# Flags without values
|
||||||
|
print(PredefinedFlags.HELP.validate_input_flag_value(None)) # True
|
||||||
|
print(PredefinedFlags.HELP.validate_input_flag_value("something")) # False
|
||||||
|
|
||||||
|
# Checking string representations
|
||||||
|
print(PredefinedFlags.HELP.string_entity) # --help
|
||||||
|
print(PredefinedFlags.SHORT_HELP.string_entity) # -H
|
||||||
|
print(PredefinedFlags.HOST.string_entity) # --host
|
||||||
|
print(PredefinedFlags.SHORT_PORT.string_entity) # -P
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
import re
|
||||||
|
from argenta.command import Flag, PossibleValues
|
||||||
|
|
||||||
|
# Simple flag with any values
|
||||||
|
verbose_flag = Flag(name="verbose")
|
||||||
|
|
||||||
|
# Flag with short prefix
|
||||||
|
short_flag = Flag(name="v", prefix="-")
|
||||||
|
|
||||||
|
# Flag that does not take a value
|
||||||
|
help_flag = Flag(name="help", possible_values=PossibleValues.NEITHER)
|
||||||
|
|
||||||
|
# Flag with list of possible values
|
||||||
|
format_flag = Flag(name="format", possible_values=["json", "xml", "csv"])
|
||||||
|
|
||||||
|
# Flag with regexp for validation input value
|
||||||
|
email_flag = Flag(
|
||||||
|
name="email",
|
||||||
|
possible_values=re.compile(r"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$"),
|
||||||
|
)
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
import re
|
||||||
|
|
||||||
|
from argenta.command.flag.models import Flag, PossibleValues
|
||||||
|
|
||||||
|
# Flag with list of allowed values
|
||||||
|
format_flag = Flag(name="format", possible_values=["json", "xml", "csv"])
|
||||||
|
|
||||||
|
# Value validation
|
||||||
|
print(format_flag.validate_input_flag_value("json")) # True
|
||||||
|
print(format_flag.validate_input_flag_value("pdf")) # False
|
||||||
|
|
||||||
|
# Flag without value
|
||||||
|
help_flag = Flag(name="help", possible_values=PossibleValues.NEITHER)
|
||||||
|
print(help_flag.validate_input_flag_value(None)) # True
|
||||||
|
print(help_flag.validate_input_flag_value("value")) # False
|
||||||
|
|
||||||
|
# Flag with regular expression
|
||||||
|
port_flag = Flag(name="port", possible_values=re.compile(r"^\d{1,5}$"))
|
||||||
|
print(port_flag.validate_input_flag_value("8080")) # True
|
||||||
|
print(port_flag.validate_input_flag_value("abc")) # False
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
from argenta.command import Flag
|
||||||
|
|
||||||
|
help_flag = Flag(name="help")
|
||||||
|
version_flag = Flag(name="V", prefix="-")
|
||||||
|
|
||||||
|
print(help_flag) # --help
|
||||||
|
|
||||||
|
message = f"Use {help_flag} to see help"
|
||||||
|
print(message) # Use --help to see help
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
from argenta.command import Flag
|
||||||
|
|
||||||
|
verbose_flag = Flag(name="verbose", prefix="--")
|
||||||
|
short_flag = Flag(name="v", prefix="-")
|
||||||
|
|
||||||
|
# Debug presentation
|
||||||
|
print(repr(verbose_flag)) # Flag<prefix=--, name=verbose>
|
||||||
|
print(repr(short_flag)) # Flag<prefix=-, name=v>
|
||||||
|
|
||||||
|
# In an interactive console or debugger
|
||||||
|
# >>> verbose_flag
|
||||||
|
# Flag<prefix=--, name=verbose>
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
from argenta.command import Flag, PossibleValues
|
||||||
|
|
||||||
|
# Creating two flags with the same name and prefix
|
||||||
|
flag1 = Flag(name="verbose", prefix="--")
|
||||||
|
flag2 = Flag(name="verbose", prefix="--")
|
||||||
|
|
||||||
|
# Flag comparison
|
||||||
|
print(flag1 == flag2) # True
|
||||||
|
|
||||||
|
# Flags with different prefixes are not equal
|
||||||
|
flag3 = Flag(name="verbose", prefix="-")
|
||||||
|
print(flag1 == flag3) # False
|
||||||
|
|
||||||
|
# Flags with different names are not equal
|
||||||
|
flag4 = Flag(name="help", prefix="--")
|
||||||
|
print(flag1 == flag4) # False
|
||||||
|
|
||||||
|
# Different possible_values do not affect equality
|
||||||
|
flag5 = Flag(name="verbose", prefix="--", possible_values=PossibleValues.NEITHER)
|
||||||
|
flag6 = Flag(name="verbose", prefix="--", possible_values=["value1", "value2"])
|
||||||
|
print(flag5 == flag6)
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
from argenta import Router, Response
|
||||||
|
from argenta.command import Command, Flag, PossibleValues
|
||||||
|
from argenta.command.flag import ValidationStatus
|
||||||
|
|
||||||
|
router = Router()
|
||||||
|
|
||||||
|
|
||||||
|
@router.command(Command("deploy", flags=Flag("verbose", possible_values=PossibleValues.NEITHER)))
|
||||||
|
def deploy_handler(response: Response):
|
||||||
|
# Check for toggle flag presence
|
||||||
|
verbose_flag = response.input_flags.get_flag_by_name("verbose")
|
||||||
|
|
||||||
|
if verbose_flag and verbose_flag.status == ValidationStatus.VALID:
|
||||||
|
print("Deploying with verbose output...")
|
||||||
|
# Detailed logic
|
||||||
|
elif verbose_flag and verbose_flag.status == ValidationStatus.INVALID:
|
||||||
|
print("Incorrect flag value")
|
||||||
|
return
|
||||||
|
else:
|
||||||
|
print("Deploying...")
|
||||||
|
# Normal logic
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
from argenta import Router, Response
|
||||||
|
from argenta.command import Command, Flag
|
||||||
|
|
||||||
|
router = Router()
|
||||||
|
|
||||||
|
|
||||||
|
@router.command(Command("greet", flags=Flag("name")))
|
||||||
|
def greet_handler(response: Response):
|
||||||
|
# Get flag by name
|
||||||
|
name_flag = response.input_flags.get_flag_by_name("name")
|
||||||
|
|
||||||
|
# Check if flag was passed
|
||||||
|
if name_flag:
|
||||||
|
print(f"Hello, {name_flag.input_value}!")
|
||||||
|
else:
|
||||||
|
print("Hello, stranger!")
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
import re
|
||||||
|
from argenta.command import Command, Flag, Flags
|
||||||
|
|
||||||
|
flags = Flags(
|
||||||
|
[
|
||||||
|
Flag("host", possible_values=re.compile(r"^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$")),
|
||||||
|
Flag("port", possible_values=re.compile(r"^\d{1,5}$")),
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
cmd = Command("start", description="Start the server", flags=flags)
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
from argenta.command import Flag, Flags
|
||||||
|
|
||||||
|
flags: Flags = Flags()
|
||||||
|
|
||||||
|
flags.add_flag(Flag("config"))
|
||||||
|
flags.add_flag(Flag("debug"))
|
||||||
|
flags.add_flag(Flag("log-level", possible_values=["INFO", "DEBUG", "ERROR"]))
|
||||||
|
|
||||||
|
print(len(flags)) # 3
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
from argenta.command import Flag, Flags
|
||||||
|
from argenta.command.flag.defaults import PredefinedFlags
|
||||||
|
|
||||||
|
flags = Flags([PredefinedFlags.HOST])
|
||||||
|
|
||||||
|
additional_flags = [
|
||||||
|
PredefinedFlags.PORT,
|
||||||
|
Flag("database"),
|
||||||
|
Flag("ssl"),
|
||||||
|
Flag("verbose"),
|
||||||
|
]
|
||||||
|
|
||||||
|
flags.add_flags(additional_flags)
|
||||||
|
|
||||||
|
print(len(flags)) # 5
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
from argenta.command import Flag, Flags
|
||||||
|
from argenta.command.flag.defaults import PredefinedFlags
|
||||||
|
|
||||||
|
|
||||||
|
flags = Flags([PredefinedFlags.HOST, PredefinedFlags.PORT, Flag("verbose")])
|
||||||
|
|
||||||
|
host_flag = flags.get_flag_by_name("host")
|
||||||
|
if host_flag:
|
||||||
|
print(f"Found flag: {host_flag.name}")
|
||||||
|
|
||||||
|
unknown_flag = flags.get_flag_by_name("nonexistent")
|
||||||
|
if unknown_flag is None:
|
||||||
|
print("Flag not found")
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
from argenta.command.flag import InputFlag, ValidationStatus
|
||||||
|
|
||||||
|
flag_with_value = InputFlag(
|
||||||
|
name="output", prefix="--", input_value="result.txt", status=ValidationStatus.VALID
|
||||||
|
)
|
||||||
|
|
||||||
|
flag_without_value = InputFlag(
|
||||||
|
name="help", prefix="-", input_value='', status=ValidationStatus.VALID
|
||||||
|
)
|
||||||
|
|
||||||
|
# String representation includes value
|
||||||
|
print(str(flag_with_value)) # --output result.txt
|
||||||
|
print(str(flag_without_value)) # -help
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
from argenta.command.flag import InputFlag, ValidationStatus
|
||||||
|
|
||||||
|
flag = InputFlag(
|
||||||
|
name="config",
|
||||||
|
prefix="--",
|
||||||
|
input_value="settings.json",
|
||||||
|
status=ValidationStatus.VALID,
|
||||||
|
)
|
||||||
|
|
||||||
|
# Debug representation of the object
|
||||||
|
print(repr(flag))
|
||||||
|
# InputFlag<prefix='--', name='config', value='settings.json', status=ValidationStatus.VALID>
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
from argenta import Command, Response, Router
|
||||||
|
from argenta.command import Flag, Flags
|
||||||
|
|
||||||
|
|
||||||
|
router = Router(title="Example")
|
||||||
|
|
||||||
|
@router.command(
|
||||||
|
Command(
|
||||||
|
"example",
|
||||||
|
description="Example command with flags",
|
||||||
|
flags=Flags([Flag("name"), Flag("age")]),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
def example_handler(response: Response):
|
||||||
|
input_flags = response.input_flags
|
||||||
|
|
||||||
|
if input_flags:
|
||||||
|
print(f"Received {len(input_flags)} flag(s)")
|
||||||
|
else:
|
||||||
|
print("No flags provided")
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
from argenta import Command, Response, Router
|
||||||
|
from argenta.command import Flag, Flags, InputFlag
|
||||||
|
from argenta.command.flag import ValidationStatus
|
||||||
|
|
||||||
|
router = Router(title="Comprehensive Example")
|
||||||
|
|
||||||
|
|
||||||
|
@router.command(
|
||||||
|
Command(
|
||||||
|
"validate",
|
||||||
|
description="Validate all flags",
|
||||||
|
flags=Flags(
|
||||||
|
[
|
||||||
|
Flag("format", possible_values=["json", "xml"]),
|
||||||
|
Flag("output"),
|
||||||
|
Flag("force"),
|
||||||
|
]
|
||||||
|
),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
def validate_handler(response: Response):
|
||||||
|
input_flags = response.input_flags
|
||||||
|
|
||||||
|
print("Flag validation results:")
|
||||||
|
|
||||||
|
valid_flags: list[InputFlag] = []
|
||||||
|
invalid_flags: list[InputFlag] = []
|
||||||
|
undefined_flags: list[InputFlag] = []
|
||||||
|
|
||||||
|
for flag in input_flags:
|
||||||
|
if flag.status == ValidationStatus.VALID:
|
||||||
|
valid_flags.append(flag)
|
||||||
|
print(f" ✓ {flag.string_entity}: {flag.input_value} (VALID)")
|
||||||
|
elif flag.status == ValidationStatus.INVALID:
|
||||||
|
invalid_flags.append(flag)
|
||||||
|
print(f" ✗ {flag.string_entity}: {flag.input_value} (INVALID)")
|
||||||
|
elif flag.status == ValidationStatus.UNDEFINED:
|
||||||
|
undefined_flags.append(flag)
|
||||||
|
print(f" ? {flag.string_entity}: {flag.input_value} (UNDEFINED)")
|
||||||
|
|
||||||
|
print("\nSummary:")
|
||||||
|
print(f" Valid flags: {len(valid_flags)}")
|
||||||
|
print(f" Invalid flags: {len(invalid_flags)}")
|
||||||
|
print(f" Undefined flags: {len(undefined_flags)}")
|
||||||
|
|
||||||
|
if valid_flags:
|
||||||
|
print("\nProcessing valid flags:")
|
||||||
|
for flag in valid_flags:
|
||||||
|
print(f" Processing {flag.name} = {flag.input_value}")
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
from argenta import Command, Response, Router
|
||||||
|
from argenta.command import Flag, Flags
|
||||||
|
|
||||||
|
router = Router(title="Get Flag Example")
|
||||||
|
|
||||||
|
|
||||||
|
@router.command(
|
||||||
|
Command(
|
||||||
|
"config",
|
||||||
|
description="Configure settings",
|
||||||
|
flags=Flags([Flag("host"), Flag("port"), Flag("debug")]),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
def config_handler(response: Response):
|
||||||
|
input_flags = response.input_flags
|
||||||
|
|
||||||
|
host_flag = input_flags.get_flag_by_name("host")
|
||||||
|
port_flag = input_flags.get_flag_by_name("port")
|
||||||
|
debug_flag = input_flags.get_flag_by_name("debug")
|
||||||
|
|
||||||
|
if host_flag:
|
||||||
|
print(f"Host: {host_flag.input_value}")
|
||||||
|
|
||||||
|
if port_flag:
|
||||||
|
print(f"Port: {port_flag.input_value}")
|
||||||
|
|
||||||
|
if debug_flag:
|
||||||
|
print("Debug mode enabled")
|
||||||
|
|
||||||
|
missing_flag = input_flags.get_flag_by_name("nonexistent")
|
||||||
|
if missing_flag is None:
|
||||||
|
print("Flag 'nonexistent' not found")
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
from argenta import Command, Response, Router
|
||||||
|
from argenta.command.flag import InputFlag, ValidationStatus
|
||||||
|
from argenta.command import InputFlags
|
||||||
|
|
||||||
|
router = Router(title="Add Flag Example")
|
||||||
|
|
||||||
|
|
||||||
|
@router.command(Command("test", description="Test command"))
|
||||||
|
def test_handler(response: Response):
|
||||||
|
# Create new InputFlags collection
|
||||||
|
new_flags = InputFlags()
|
||||||
|
|
||||||
|
# Add one flag
|
||||||
|
test_flag = InputFlag(
|
||||||
|
name="test", prefix="--", input_value="value", status=ValidationStatus.VALID
|
||||||
|
)
|
||||||
|
new_flags.add_flag(test_flag)
|
||||||
|
|
||||||
|
print(f"Flags count: {len(new_flags.flags)}")
|
||||||
|
print(f"First flag: {new_flags.flags[0].name}")
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
from argenta.command.flag import InputFlag, ValidationStatus
|
||||||
|
from argenta.command import InputFlags
|
||||||
|
|
||||||
|
# Create InputFlags collection
|
||||||
|
flags = InputFlags()
|
||||||
|
|
||||||
|
# Create several flags
|
||||||
|
flag1 = InputFlag(name="option1", prefix="--", input_value="value1", status=ValidationStatus.VALID)
|
||||||
|
|
||||||
|
flag2 = InputFlag(name="option2", prefix="--", input_value="value2", status=ValidationStatus.VALID)
|
||||||
|
|
||||||
|
flag3 = InputFlag(name="option3", prefix="---", input_value="value3", status=ValidationStatus.VALID)
|
||||||
|
|
||||||
|
# Add all flags in one call
|
||||||
|
flags.add_flags([flag1, flag2, flag3])
|
||||||
|
|
||||||
|
print(f"Total flags: {len(flags.flags)}")
|
||||||
|
for flag in flags:
|
||||||
|
print(f" - {flag.string_entity}: {flag.input_value}")
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
from argenta import Command, Response, Router
|
||||||
|
from argenta.command import Flag, Flags
|
||||||
|
|
||||||
|
router = Router(title="Bool Check Example")
|
||||||
|
|
||||||
|
|
||||||
|
@router.command(
|
||||||
|
Command(
|
||||||
|
"action",
|
||||||
|
description="Action with optional flags",
|
||||||
|
flags=Flags([Flag("option1"), Flag("option2")]),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
def action_handler(response: Response):
|
||||||
|
input_flags = response.input_flags
|
||||||
|
|
||||||
|
# Check for flags presence
|
||||||
|
if input_flags:
|
||||||
|
print("Flags were provided:")
|
||||||
|
for flag in input_flags:
|
||||||
|
print(f" - {flag.name}: {flag.input_value}")
|
||||||
|
else:
|
||||||
|
print("No flags provided, using defaults")
|
||||||
|
|
||||||
|
# Alternative way to check
|
||||||
|
has_flags = bool(input_flags)
|
||||||
|
print(f"\nHas flags: {has_flags}")
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
from argenta.command.flag import InputFlag, ValidationStatus
|
||||||
|
from argenta.command import InputFlags
|
||||||
|
|
||||||
|
# Create first collection
|
||||||
|
flags1 = InputFlags(
|
||||||
|
[
|
||||||
|
InputFlag(name="flag1", input_value="value1", status=ValidationStatus.VALID),
|
||||||
|
InputFlag(name="flag2", input_value="value2", status=ValidationStatus.VALID),
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
# Create second collection with same flags
|
||||||
|
flags2 = InputFlags(
|
||||||
|
[
|
||||||
|
InputFlag(name="flag1", input_value="value1", status=ValidationStatus.VALID),
|
||||||
|
InputFlag(name="flag2", input_value="value2", status=ValidationStatus.VALID),
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
# Create third collection with different values
|
||||||
|
flags3 = InputFlags(
|
||||||
|
[
|
||||||
|
InputFlag(name="flag1", input_value="different", status=ValidationStatus.VALID),
|
||||||
|
InputFlag(name="flag2", input_value="value2", status=ValidationStatus.VALID),
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
print(f"flags1 == flags2: {flags1 == flags2}") # True (same names)
|
||||||
|
print(f"flags1 == flags3: {flags1 == flags3}") # True (same names, values are not considered)
|
||||||
|
|
||||||
|
# Different collections
|
||||||
|
flags4 = InputFlags([InputFlag(name="flag3", input_value="value3", status=ValidationStatus.VALID)])
|
||||||
|
print(f"flags1 == flags4: {flags1 == flags4}") # False (different flags)
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
from argenta import Command, Response, Router
|
||||||
|
from argenta.command import Flag, Flags
|
||||||
|
from argenta.command.flag import InputFlag
|
||||||
|
|
||||||
|
router = Router(title="Contains Example")
|
||||||
|
|
||||||
|
|
||||||
|
@router.command(
|
||||||
|
Command(
|
||||||
|
"check",
|
||||||
|
description="Check flags",
|
||||||
|
flags=Flags([Flag("verbose"), Flag("debug"), Flag("quiet")]),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
def check_handler(response: Response):
|
||||||
|
input_flags = response.input_flags
|
||||||
|
|
||||||
|
# Check for specific flag presence
|
||||||
|
verbose_flag = input_flags.get_flag_by_name("verbose")
|
||||||
|
debug_flag = input_flags.get_flag_by_name("debug")
|
||||||
|
|
||||||
|
# Use 'in' operator for checking
|
||||||
|
if verbose_flag and verbose_flag in input_flags:
|
||||||
|
print("Verbose flag is present")
|
||||||
|
|
||||||
|
if debug_flag and debug_flag in input_flags:
|
||||||
|
print("Debug flag is present")
|
||||||
|
|
||||||
|
# You can create a flag for checking (comparison is by name)
|
||||||
|
test_flag = InputFlag(name="verbose", prefix="--", input_value="any", status=None)
|
||||||
|
|
||||||
|
if test_flag in input_flags:
|
||||||
|
print("Verbose flag found using 'in' operator")
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
from metrics.benchmarks.entity import benchmarks
|
||||||
|
|
||||||
|
@benchmarks.register(
|
||||||
|
type_="my_category",
|
||||||
|
description="Description of what is being measured"
|
||||||
|
)
|
||||||
|
def benchmark_my_operation() -> None:
|
||||||
|
# Code whose performance is being measured
|
||||||
|
pass
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
import sqlite3
|
||||||
|
from sqlite3 import Connection
|
||||||
|
from typing import Iterable
|
||||||
|
|
||||||
|
from dishka import Provider, Scope, provide
|
||||||
|
|
||||||
|
from argenta import App, Orchestrator
|
||||||
|
|
||||||
|
|
||||||
|
class ConnectionProvider(Provider):
|
||||||
|
@provide(scope=Scope.REQUEST)
|
||||||
|
def new_connection(self) -> Iterable[Connection]:
|
||||||
|
conn = sqlite3.connect(":memory:")
|
||||||
|
yield conn
|
||||||
|
conn.close()
|
||||||
|
|
||||||
|
|
||||||
|
# 2. Create and configure App
|
||||||
|
app = App()
|
||||||
|
# ... you can add routers here ...
|
||||||
|
|
||||||
|
# 3. Create Orchestrator, passing our provider
|
||||||
|
orchestrator = Orchestrator(custom_providers=[ConnectionProvider()])
|
||||||
|
|
||||||
|
# 4. Start the application
|
||||||
|
if __name__ == "__main__":
|
||||||
|
orchestrator.start_polling(app)
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
from argenta.command import Flag, PossibleValues
|
||||||
|
|
||||||
|
# Creating flags with any values
|
||||||
|
message_flag = Flag(name="message", possible_values=PossibleValues.ALL)
|
||||||
|
name_flag = Flag(name="name", possible_values=PossibleValues.ALL)
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
import re
|
||||||
|
from argenta.command import Flag, PossibleValues
|
||||||
|
|
||||||
|
# Flag without value
|
||||||
|
verbose_flag = Flag(name="verbose", possible_values=PossibleValues.NEITHER)
|
||||||
|
|
||||||
|
# Flag with any value
|
||||||
|
output_flag = Flag(name="output", possible_values=PossibleValues.ALL)
|
||||||
|
|
||||||
|
# Flag with a list of valid values
|
||||||
|
format_flag = Flag(name="format", possible_values=["json", "xml", "csv", "yaml"])
|
||||||
|
|
||||||
|
# Flag with regular expression
|
||||||
|
email_flag = Flag(name="email", possible_values=re.compile(r"^[\w\.-]+@[\w\.-]+\.\w+$"))
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
from argenta.command import Flag, PossibleValues
|
||||||
|
|
||||||
|
# Creating flags without values
|
||||||
|
help_flag = Flag(name="help", possible_values=PossibleValues.NEITHER)
|
||||||
|
verbose_flag = Flag(name="verbose", possible_values=PossibleValues.NEITHER)
|
||||||
|
force_flag = Flag(name="force", possible_values=PossibleValues.NEITHER)
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
import operator
|
||||||
|
import re
|
||||||
|
|
||||||
|
from argenta import App, Orchestrator, Response, Router
|
||||||
|
from argenta.app import DynamicDividingLine
|
||||||
|
from argenta.command import Command, Flag, Flags
|
||||||
|
from argenta.response.status import ResponseStatus
|
||||||
|
|
||||||
|
router = Router("Calculator")
|
||||||
|
|
||||||
|
operations = {"mul": operator.mul, "sub": operator.sub, "add": operator.add}
|
||||||
|
|
||||||
|
|
||||||
|
@router.command(
|
||||||
|
Command(
|
||||||
|
"calc",
|
||||||
|
description="Calculator with two numbers",
|
||||||
|
flags=Flags(
|
||||||
|
[
|
||||||
|
Flag("a", possible_values=re.compile(r"^\d{,5}$")), # First number
|
||||||
|
Flag("b", possible_values=re.compile(r"^\d{,5}$")), # Second number
|
||||||
|
Flag(
|
||||||
|
"operation", possible_values=["add", "sub", "mul"]
|
||||||
|
), # Operation: add, sub, mul
|
||||||
|
]
|
||||||
|
),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
def calc_handler(response: Response):
|
||||||
|
# Get flag values
|
||||||
|
a_flag = response.input_flags.get_flag_by_name("a")
|
||||||
|
b_flag = response.input_flags.get_flag_by_name("b")
|
||||||
|
op_flag = response.input_flags.get_flag_by_name("op")
|
||||||
|
|
||||||
|
# Check that all flags are provided
|
||||||
|
if response.status != ResponseStatus.ALL_FLAGS_VALID or not all([a_flag, b_flag, op_flag]):
|
||||||
|
print("Error: must specify --a, --b and --op")
|
||||||
|
return
|
||||||
|
|
||||||
|
a = float(a_flag.input_value)
|
||||||
|
b = float(b_flag.input_value)
|
||||||
|
operation = op_flag.input_value
|
||||||
|
|
||||||
|
try:
|
||||||
|
result = operations[operation](a, b)
|
||||||
|
except ZeroDivisionError:
|
||||||
|
print("Can't divide by zero")
|
||||||
|
else:
|
||||||
|
print(f"Result: {result}")
|
||||||
|
|
||||||
|
|
||||||
|
app = App(
|
||||||
|
initial_message="Calculator",
|
||||||
|
repeat_command_groups_printing=False,
|
||||||
|
prompt=">> ",
|
||||||
|
dividing_line=DynamicDividingLine("~"),
|
||||||
|
)
|
||||||
|
orchestrator = Orchestrator()
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
app.include_router(router)
|
||||||
|
orchestrator.start_polling(app)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
# main.py
|
||||||
|
from .routers import router
|
||||||
|
|
||||||
|
from argenta import App, Orchestrator
|
||||||
|
|
||||||
|
app: App = App()
|
||||||
|
orchestrator: Orchestrator = Orchestrator()
|
||||||
|
|
||||||
|
|
||||||
|
def main() -> None:
|
||||||
|
app.include_router(router)
|
||||||
|
orchestrator.start_polling(app)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
# routers.py
|
||||||
|
from argenta import Command, Response, Router
|
||||||
|
|
||||||
|
router = Router(title="Quickstart Example")
|
||||||
|
|
||||||
|
|
||||||
|
@router.command(Command("hello", description="Say hello"))
|
||||||
|
def handler(response: Response):
|
||||||
|
print("Hello, world!")
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
from argenta import App, Command, Orchestrator, Router, Response
|
||||||
|
from argenta.command import Flag
|
||||||
|
|
||||||
|
# 1. Create app and orchestrator instances
|
||||||
|
app = App(
|
||||||
|
prompt=">> ",
|
||||||
|
initial_message="Simple App",
|
||||||
|
farewell_message="Goodbye!",
|
||||||
|
repeat_command_groups_printing=False,
|
||||||
|
)
|
||||||
|
orchestrator = Orchestrator()
|
||||||
|
|
||||||
|
# 2. Create router for grouping commands
|
||||||
|
main_router = Router(title="Main commands")
|
||||||
|
|
||||||
|
|
||||||
|
# 3. Define command and its handler
|
||||||
|
@main_router.command(Command("hello", description="Prints greeting message", flags=Flag("name")))
|
||||||
|
def hello_handler(response: Response):
|
||||||
|
"""This handler will be called for 'hello' command."""
|
||||||
|
name = response.input_flags.get_flag_by_name("name")
|
||||||
|
if name:
|
||||||
|
print(f"Hello, {name.input_value}!")
|
||||||
|
else:
|
||||||
|
print("Hello, world!")
|
||||||
|
|
||||||
|
|
||||||
|
# 4. Include router to application
|
||||||
|
app.include_router(main_router)
|
||||||
|
|
||||||
|
# 5. Start application
|
||||||
|
if __name__ == "__main__":
|
||||||
|
orchestrator.start_polling(app)
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
from typing import cast
|
||||||
|
|
||||||
|
from argenta import Command, Response, Router
|
||||||
|
from argenta.command.flag import Flag, ValidationStatus
|
||||||
|
from argenta.command import Flags
|
||||||
|
from argenta.di import FromDishka
|
||||||
|
|
||||||
|
from .repository import Priority, Task, TaskRepository
|
||||||
|
|
||||||
|
router = Router(title="Task Manager")
|
||||||
|
|
||||||
|
|
||||||
|
@router.command(
|
||||||
|
Command(
|
||||||
|
"add-task",
|
||||||
|
description="Add a new task",
|
||||||
|
flags=Flags(
|
||||||
|
[
|
||||||
|
Flag("description"),
|
||||||
|
Flag("priority", possible_values=["low", "medium", "high"]),
|
||||||
|
]
|
||||||
|
),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
def add_task(response: Response, repo: FromDishka[TaskRepository]):
|
||||||
|
description_flag = response.input_flags.get_flag_by_name("description")
|
||||||
|
|
||||||
|
if not description_flag or not description_flag.status == ValidationStatus.VALID:
|
||||||
|
print("Error: --description flag is required.")
|
||||||
|
return
|
||||||
|
|
||||||
|
task_description = description_flag.input_value or ""
|
||||||
|
|
||||||
|
priority_flag = response.input_flags.get_flag_by_name("priority")
|
||||||
|
|
||||||
|
if priority_flag and priority_flag.status == ValidationStatus.VALID:
|
||||||
|
priority_value = priority_flag.input_value
|
||||||
|
else:
|
||||||
|
priority_value = "medium"
|
||||||
|
|
||||||
|
priority = cast(Priority, priority_value)
|
||||||
|
|
||||||
|
task = Task(description=task_description, priority=priority)
|
||||||
|
repo.add_task(task)
|
||||||
|
|
||||||
|
print(f"Added task: '{task.description}' with priority '{task.priority}'")
|
||||||
|
|
||||||
|
|
||||||
|
@router.command(Command("list-tasks", description="List all tasks"))
|
||||||
|
def list_tasks(response: Response, repo: FromDishka[TaskRepository]):
|
||||||
|
tasks = repo.get_all_tasks()
|
||||||
|
|
||||||
|
if not tasks:
|
||||||
|
print("No tasks found.")
|
||||||
|
return
|
||||||
|
|
||||||
|
print("Tasks:")
|
||||||
|
for i, task in enumerate(tasks, 1):
|
||||||
|
print(f" {i}. {task.description} (Priority: {task.priority})")
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
from argenta import App, Orchestrator
|
||||||
|
|
||||||
|
from .handlers import router
|
||||||
|
from .provider import TaskProvider
|
||||||
|
|
||||||
|
# 1. Create app and orchestrator instances
|
||||||
|
app = App(
|
||||||
|
initial_message="Task Manager",
|
||||||
|
prompt="Enter a command: ",
|
||||||
|
)
|
||||||
|
orchestrator = Orchestrator(custom_providers=[TaskProvider()])
|
||||||
|
|
||||||
|
# 2. Include router with our commands
|
||||||
|
app.include_router(router)
|
||||||
|
|
||||||
|
# 3. Start polling via orchestrator
|
||||||
|
if __name__ == "__main__":
|
||||||
|
orchestrator.start_polling(app)
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
from dishka import Provider, Scope, provide
|
||||||
|
|
||||||
|
from .repository import TaskRepository
|
||||||
|
|
||||||
|
|
||||||
|
class TaskProvider(Provider):
|
||||||
|
@provide(scope=Scope.APP)
|
||||||
|
def get_repository(self) -> TaskRepository:
|
||||||
|
return TaskRepository()
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
from dataclasses import dataclass
|
||||||
|
from typing import Literal
|
||||||
|
|
||||||
|
Priority = Literal["low", "medium", "high"]
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass
|
||||||
|
class Task:
|
||||||
|
description: str
|
||||||
|
priority: Priority = "medium"
|
||||||
|
|
||||||
|
|
||||||
|
class TaskRepository:
|
||||||
|
def __init__(self):
|
||||||
|
self._tasks: list[Task] = []
|
||||||
|
|
||||||
|
def add_task(self, task: Task):
|
||||||
|
self._tasks.append(task)
|
||||||
|
|
||||||
|
def get_all_tasks(self) -> list[Task]:
|
||||||
|
return self._tasks
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
from argenta import Response, Router
|
||||||
|
|
||||||
|
# For this router stdout redirect will be disabled
|
||||||
|
interactive_router = Router(disable_redirect_stdout=True)
|
||||||
|
|
||||||
|
|
||||||
|
@interactive_router.command("ask")
|
||||||
|
def ask_name(response: Response):
|
||||||
|
name = input("What is your name? ")
|
||||||
|
print(f"Nice to meet you, {name}!")
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
from argenta import App
|
||||||
|
from argenta.app import StaticDividingLine
|
||||||
|
|
||||||
|
# All routers will use static line with length 50 by default
|
||||||
|
app = App(dividing_line=StaticDividingLine(length=50))
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
from argenta import Router, Response, Command, DataBridge
|
||||||
|
from argenta.command import Flag
|
||||||
|
from argenta.di import FromDishka
|
||||||
|
|
||||||
|
router = Router(title="Authentication")
|
||||||
|
|
||||||
|
|
||||||
|
def authenticate_user(username: str) -> str:
|
||||||
|
return f"token_for_{username}"
|
||||||
|
|
||||||
|
|
||||||
|
@router.command(Command("login", flags=Flag("username")))
|
||||||
|
def login_handler(response: Response, data_bridge: FromDishka[DataBridge]):
|
||||||
|
username_flag = response.input_flags.get_flag_by_name("username")
|
||||||
|
if not username_flag or not username_flag.input_value:
|
||||||
|
print("Error: username must be specified using the --username flag.")
|
||||||
|
return
|
||||||
|
|
||||||
|
username = username_flag.input_value
|
||||||
|
token = authenticate_user(username)
|
||||||
|
|
||||||
|
data_bridge.update({"auth_token": token})
|
||||||
|
print(f"Login successful! User '{username}' authenticated.")
|
||||||
|
|
||||||
|
|
||||||
|
@router.command("get-profile")
|
||||||
|
def get_profile_handler(response: Response, data_bridge: FromDishka[DataBridge]):
|
||||||
|
token = data_bridge.get_by_key("auth_token")
|
||||||
|
|
||||||
|
if not token:
|
||||||
|
print("Error: you are not authenticated. Please run the 'login' command first.")
|
||||||
|
return
|
||||||
|
|
||||||
|
print(f"Loading profile using token: [yellow]{token}[/yellow]")
|
||||||
|
|
||||||
|
|
||||||
|
@router.command("logout")
|
||||||
|
def logout_handler(response: Response, data_bridge: FromDishka[DataBridge]):
|
||||||
|
try:
|
||||||
|
data_bridge.delete_by_key("auth_token")
|
||||||
|
print("Logout successful. Session data cleared.")
|
||||||
|
except KeyError:
|
||||||
|
print("You were not authenticated anyway.")
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
from argenta import Command, Response, Router
|
||||||
|
from argenta.response import ResponseStatus
|
||||||
|
|
||||||
|
router = Router(title="Example")
|
||||||
|
|
||||||
|
|
||||||
|
@router.command(Command("greet", description="Greet the user"))
|
||||||
|
def greet_handler(response: Response):
|
||||||
|
if response.status == ResponseStatus.ALL_FLAGS_VALID:
|
||||||
|
print("Hello! All flags are valid.")
|
||||||
|
else:
|
||||||
|
print("Warning: Some flags have issues.")
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
from argenta import Command, Response, Router
|
||||||
|
from argenta.command import Flag, Flags
|
||||||
|
from argenta.command.flag import ValidationStatus
|
||||||
|
from argenta.response import ResponseStatus
|
||||||
|
|
||||||
|
router = Router(title="Flags Example")
|
||||||
|
|
||||||
|
|
||||||
|
@router.command(
|
||||||
|
Command(
|
||||||
|
"process",
|
||||||
|
description="Process with flags",
|
||||||
|
flags=Flags([Flag("format", possible_values=["json", "xml"]), Flag("verbose")]),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
def process_handler(response: Response):
|
||||||
|
print(f"Status: {response.status}")
|
||||||
|
|
||||||
|
format_flag = response.input_flags.get_flag_by_name("format")
|
||||||
|
verbose_flag = response.input_flags.get_flag_by_name("verbose")
|
||||||
|
|
||||||
|
if format_flag:
|
||||||
|
format_value = format_flag.input_value
|
||||||
|
print(f"Format: {format_value}")
|
||||||
|
|
||||||
|
if verbose_flag:
|
||||||
|
print("Verbose mode enabled")
|
||||||
|
|
||||||
|
if response.status == ResponseStatus.ALL_FLAGS_VALID:
|
||||||
|
print("All flags are valid, proceeding...")
|
||||||
|
elif response.status == ResponseStatus.INVALID_VALUE_FLAGS:
|
||||||
|
print("Warning: Some flags have invalid values")
|
||||||
|
for flag in response.input_flags:
|
||||||
|
if flag.status == ValidationStatus.INVALID:
|
||||||
|
print(f" Invalid flag: {flag.string_entity} = {flag.input_value}")
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
from argenta import Command, Response, Router
|
||||||
|
|
||||||
|
user_router = Router(title="User Management")
|
||||||
|
|
||||||
|
@user_router.command(Command("add-user", description="Adds a new user"))
|
||||||
|
def add_user_handler(response: Response):
|
||||||
|
print("User added successfully!")
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
import sys
|
||||||
|
from unittest.mock import patch
|
||||||
|
import pytest
|
||||||
|
from pytest import CaptureFixture
|
||||||
|
|
||||||
|
from argenta import App, Orchestrator, Router, Command, Response
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True)
|
||||||
|
def patched_argv():
|
||||||
|
with patch.object(sys, "argv", ["program.py"]):
|
||||||
|
yield
|
||||||
|
|
||||||
|
|
||||||
|
def test_input_incorrect_command(capsys: CaptureFixture[str]):
|
||||||
|
router = Router()
|
||||||
|
orchestrator = Orchestrator()
|
||||||
|
|
||||||
|
@router.command(Command("test"))
|
||||||
|
def test(response: Response) -> None:
|
||||||
|
print("test command")
|
||||||
|
|
||||||
|
app = App(override_system_messages=True, printer=print)
|
||||||
|
app.include_router(router)
|
||||||
|
app.set_unknown_command_handler(lambda command: print(f"Unknown command: {command.trigger}"))
|
||||||
|
|
||||||
|
with patch("builtins.input", side_effect=["help", "q"]):
|
||||||
|
orchestrator.start_polling(app)
|
||||||
|
|
||||||
|
output = capsys.readouterr().out
|
||||||
|
assert "\nUnknown command: help\n" in output
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
import io
|
||||||
|
from contextlib import redirect_stdout
|
||||||
|
|
||||||
|
from argenta import App, Router, Command, Response
|
||||||
|
from argenta.command import InputCommand
|
||||||
|
|
||||||
|
|
||||||
|
def test_simple_app() -> None:
|
||||||
|
app = App(override_system_messages=True, repeat_command_groups_printing=False)
|
||||||
|
router = Router(title="App")
|
||||||
|
|
||||||
|
@router.command(Command("HELP", description="Show help"))
|
||||||
|
def help_cmd(response: Response):
|
||||||
|
print("Available commands: HELP")
|
||||||
|
|
||||||
|
app.include_router(router)
|
||||||
|
|
||||||
|
with redirect_stdout(io.StringIO()) as stdout:
|
||||||
|
router.finds_appropriate_handler(InputCommand.parse("HELP"))
|
||||||
|
|
||||||
|
assert "Available commands:" in stdout.getvalue()
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
import io
|
||||||
|
from contextlib import redirect_stdout
|
||||||
|
|
||||||
|
from argenta.command import InputCommand
|
||||||
|
from dishka import Provider, make_container, Scope
|
||||||
|
|
||||||
|
from argenta import Router, Response
|
||||||
|
from argenta.di.integration import setup_dishka, FromDishka
|
||||||
|
|
||||||
|
|
||||||
|
class Service:
|
||||||
|
def hello(self) -> str:
|
||||||
|
return "world"
|
||||||
|
|
||||||
|
|
||||||
|
def get_service() -> Service:
|
||||||
|
return Service()
|
||||||
|
|
||||||
|
|
||||||
|
router = Router(title="DI")
|
||||||
|
|
||||||
|
|
||||||
|
@router.command("HELLO")
|
||||||
|
def hello(response: Response, service: FromDishka[Service]) -> None:
|
||||||
|
print(f"hello {service.hello()}")
|
||||||
|
|
||||||
|
|
||||||
|
class _FakeApp:
|
||||||
|
# Minimal stub for setup_dishka; app object is not used in unit tests
|
||||||
|
registered_routers = [router]
|
||||||
|
|
||||||
|
|
||||||
|
def test_hello_uses_service():
|
||||||
|
provider = Provider(scope=Scope.APP)
|
||||||
|
provider.provide(get_service)
|
||||||
|
|
||||||
|
container = make_container(provider)
|
||||||
|
setup_dishka(app=_FakeApp(), container=container, auto_inject=True)
|
||||||
|
|
||||||
|
# Call handler
|
||||||
|
with redirect_stdout(io.StringIO()) as stdout:
|
||||||
|
router.finds_appropriate_handler(InputCommand.parse("HELLO"))
|
||||||
|
|
||||||
|
assert "hello world" in stdout.getvalue()
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
import io
|
||||||
|
from contextlib import redirect_stdout
|
||||||
|
|
||||||
|
from argenta import Router, Command, Response
|
||||||
|
from argenta.command import InputCommand
|
||||||
|
|
||||||
|
|
||||||
|
router = Router(title="Demo")
|
||||||
|
|
||||||
|
|
||||||
|
@router.command(Command("PING", description="Ping command"))
|
||||||
|
def ping(response: Response):
|
||||||
|
print("PONG")
|
||||||
|
|
||||||
|
|
||||||
|
def test_ping_prints_pong():
|
||||||
|
# Call handler
|
||||||
|
with redirect_stdout(io.StringIO()) as stdout:
|
||||||
|
router.finds_appropriate_handler(InputCommand.parse("PING"))
|
||||||
|
assert "PONG" in stdout.getvalue()
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
# Configuration file for the Sphinx documentation builder.
|
||||||
|
#
|
||||||
|
# For the full list of built-in configuration values, see the documentation:
|
||||||
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
||||||
|
|
||||||
|
# -- Project information -----------------------------------------------------
|
||||||
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
|
||||||
|
|
||||||
|
project = "Argenta"
|
||||||
|
copyright = "2025, kolo"
|
||||||
|
author = "kolo"
|
||||||
|
root_doc = "index"
|
||||||
|
|
||||||
|
# -- General configuration ---------------------------------------------------
|
||||||
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
|
||||||
|
|
||||||
|
locale_dirs = ['locales/']
|
||||||
|
gettext_compact = False
|
||||||
|
|
||||||
|
templates_path = ["_templates"]
|
||||||
|
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
|
||||||
|
|
||||||
|
|
||||||
|
# -- Options for HTML output -------------------------------------------------
|
||||||
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
|
||||||
|
|
||||||
|
html_theme = "shibuya"
|
||||||
|
html_static_path = ["_static"]
|
||||||
|
|
||||||
|
html_context = {
|
||||||
|
"languages": [
|
||||||
|
("English", "/en/latest/%s.html", "en"),
|
||||||
|
("Русский", "/ru/latest/%s.html", "ru"),
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
html_theme_options = {
|
||||||
|
"accent_color": "cyan",
|
||||||
|
"nav_links": [
|
||||||
|
{
|
||||||
|
"title": "Sponsor me",
|
||||||
|
"url": "https://github.com/sponsors/koloideal"
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"github_url": "https://github.com/koloideal/Argenta",
|
||||||
|
"linkedin_url": "https://www.linkedin.com/in/dmitry-shevelev-31b9a6324"
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
.. Argenta documentation master file, created by
|
||||||
|
sphinx-quickstart on Sat Oct 11 19:54:43 2025.
|
||||||
|
You can adapt this file completely to your liking, but it should at least
|
||||||
|
contain the root `toctree` directive.
|
||||||
|
|
||||||
|
Argenta
|
||||||
|
=======
|
||||||
|
|
||||||
|
Что это и зачем?
|
||||||
|
----------------
|
||||||
|
|
||||||
|
**Библиотека для построения модульных CLI-приложений с простым и приятным API.**
|
||||||
|
|
||||||
|
Если у вас есть функциональность, которую вы хотите предоставить в виде CLI-приложения, Argenta поможет вам в этом.
|
||||||
|
Основная цель библиотеки — дать разработчикам возможность сосредоточиться на реализации своих идей, предоставляя для этого удобные абстракции.
|
||||||
|
|
||||||
|
.. image:: https://i.ibb.co/fzWcfgFq/2025-12-04-173045.png
|
||||||
|
:alt: App example
|
||||||
|
|
||||||
|
Argenta предназначена для создания приложений, работающих в собственном контексте (scope). Это означает, что приложение запускается один раз и создаёт интерактивную сессию, похожую на Python REPL или MySQL консоль. При запуске пользователь входит в эту сессию, где ему доступна вся реализованная вами функциональность.
|
||||||
|
|
||||||
|
Один из ключевых принципов библиотеки — цикличность. После выполнения команды пользователь остаётся в интерактивной сессии, в отличие от таких библиотек, как ``argparse``, ``click`` и ``typer``, где приложение завершается после каждой команды. Выход из сессии контролируется пользователем.
|
||||||
|
|
||||||
|
**Ключевые особенности:**
|
||||||
|
|
||||||
|
* **Интерактивные сессии**: В отличие от традиционных CLI-инструментов, ``Argenta`` создаёт циклические сессии, позволяя пользователю выполнять команды последовательно, не перезапуская приложение.
|
||||||
|
* **Декларативный синтаксис**: Команды и их обработчики объявляются с помощью простых декораторов, что делает код интуитивно понятным и позволяет сосредоточиться на том, "что" вы хотите сделать, а не "как".
|
||||||
|
* **Нативный DI**: Благодаря интеграции с `dishka <https://dishka.readthedocs.io/en/stable/>`_, вы можете легко внедрять зависимости прямо в обработчики команд, что упрощает их тестирование, позволяет избежать мутабельных глобалов и многое другое.
|
||||||
|
* **Автоматическая валидация и парсинг**: Библиотека берёт на себя обработку флагов и аргументов командной строки, включая их парсинг, валидацию и преобразование типов.
|
||||||
|
* **Гибкая настройка**: Вы можете легко кастомизировать системные сообщения, форматирование вывода, создавать кастомные обработчики нестандартного поведения и т.д.
|
||||||
|
|
||||||
|
-----
|
||||||
|
|
||||||
|
Архитектура и жизненный цикл
|
||||||
|
-----------------------------
|
||||||
|
|
||||||
|
Следующая диаграмма иллюстрирует, как компоненты Argenta взаимодействуют друг с другом, обрабатывая ввод пользователя.
|
||||||
|
|
||||||
|
.. image:: https://i.ibb.co/hF3FdFr1/argenta-intro-drawio-2.png
|
||||||
|
:alt: Request Lifecycle Diagram
|
||||||
|
:align: center
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:hidden:
|
||||||
|
:caption: Контент:
|
||||||
|
|
||||||
|
root/quickstart
|
||||||
|
root/error_handling
|
||||||
|
root/flags
|
||||||
|
root/overriding_formatting
|
||||||
|
root/api/index
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:hidden:
|
||||||
|
:caption: Продвинутое использование:
|
||||||
|
|
||||||
|
root/redirect_stdout
|
||||||
|
root/dependency_injection
|
||||||
|
root/testing
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:hidden:
|
||||||
|
:caption: Для разработчиков:
|
||||||
|
|
||||||
|
root/contributing
|
||||||
|
root/code_of_conduct
|
||||||
|
root/metrics
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:hidden:
|
||||||
|
:caption: Ссылки проекта:
|
||||||
|
|
||||||
|
GitHub <https://github.com/koloideal/argenta>
|
||||||
|
PyPI <https://pypi.org/project/argenta>
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
set windows-shell := ["powershell.exe", "-NoLogo", "-Command"]
|
||||||
|
set shell := ["bash", "-c"]
|
||||||
|
|
||||||
|
# Variables
|
||||||
|
sphinxopts := ""
|
||||||
|
sphinxbuild := "sphinx-build"
|
||||||
|
sourcedir := "."
|
||||||
|
builddir := "_build"
|
||||||
|
|
||||||
|
# Default recipe (help)
|
||||||
|
default:
|
||||||
|
@{{sphinxbuild}} -M help "{{sourcedir}}" "{{builddir}}" {{sphinxopts}}
|
||||||
|
|
||||||
|
# Build all language versions
|
||||||
|
build:
|
||||||
|
{{sphinxbuild}} -b html -D language=ru {{sourcedir}} {{builddir}}/html/ru
|
||||||
|
{{sphinxbuild}} -b html -D language =en {{sourcedir}} {{builddir}}/html/en
|
||||||
|
|
||||||
|
# Live preview for Russian version
|
||||||
|
live-ru:
|
||||||
|
sphinx-autobuild -b html . _build/html/ru -D language=ru
|
||||||
|
|
||||||
|
# Live preview for English version
|
||||||
|
live-en:
|
||||||
|
sphinx-autobuild -b html . _build/html/en -D language=en
|
||||||
|
|
||||||
|
# Update translation files
|
||||||
|
update-langs:
|
||||||
|
{{sphinxbuild}} -b gettext . _build/gettext
|
||||||
|
sphinx-intl update -p _build/gettext -l en
|
||||||
@@ -0,0 +1,177 @@
|
|||||||
|
# SOME DESCRIPTIVE TITLE.
|
||||||
|
# Copyright (C) 2025, kolo
|
||||||
|
# This file is distributed under the same license as the Argenta package.
|
||||||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, 2025.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Argenta \n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2025-12-04 20:41+0300\n"
|
||||||
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
|
"Language: en\n"
|
||||||
|
"Language-Team: en <LL@li.org>\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=utf-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Generated-By: Babel 2.17.0\n"
|
||||||
|
|
||||||
|
#: ../../index.rst:43
|
||||||
|
msgid "Контент:"
|
||||||
|
msgstr "Content:"
|
||||||
|
|
||||||
|
#: ../../index.rst:53
|
||||||
|
msgid "Продвинутое использование:"
|
||||||
|
msgstr "Advanced usage:"
|
||||||
|
|
||||||
|
#: ../../index.rst:61
|
||||||
|
msgid "Для разработчиков:"
|
||||||
|
msgstr "For developers:"
|
||||||
|
|
||||||
|
#: ../../index.rst:68
|
||||||
|
msgid "GitHub"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../index.rst:68
|
||||||
|
msgid "PyPI"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../index.rst:68
|
||||||
|
msgid "Ссылки проекта:"
|
||||||
|
msgstr "Project links:"
|
||||||
|
|
||||||
|
#: ../../index.rst:7
|
||||||
|
msgid "Argenta"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../index.rst:10
|
||||||
|
msgid "Что это и зачем?"
|
||||||
|
msgstr "What is it and why?"
|
||||||
|
|
||||||
|
#: ../../index.rst:12
|
||||||
|
msgid ""
|
||||||
|
"**Библиотека для построения модульных CLI-приложений с простым и приятным"
|
||||||
|
" API.**"
|
||||||
|
msgstr ""
|
||||||
|
"**A library for building modular CLI applications with a simple and "
|
||||||
|
"pleasant API.**"
|
||||||
|
|
||||||
|
#: ../../index.rst:14
|
||||||
|
msgid ""
|
||||||
|
"Если у вас есть функциональность, которую вы хотите предоставить в виде "
|
||||||
|
"CLI-приложения, Argenta поможет вам в этом. Основная цель библиотеки — "
|
||||||
|
"дать разработчикам возможность сосредоточиться на реализации своих идей, "
|
||||||
|
"предоставляя для этого удобные абстракции."
|
||||||
|
msgstr ""
|
||||||
|
"If you have functionality that you want to provide as a CLI application, "
|
||||||
|
"Argenta will help you with that. The main goal of the library is to "
|
||||||
|
"enable developers to focus on implementing their ideas by providing "
|
||||||
|
"convenient abstractions."
|
||||||
|
|
||||||
|
#: ../../index.rst:17
|
||||||
|
msgid "App example"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../index.rst:20
|
||||||
|
msgid ""
|
||||||
|
"Argenta предназначена для создания приложений, работающих в собственном "
|
||||||
|
"контексте (scope). Это означает, что приложение запускается один раз и "
|
||||||
|
"создаёт интерактивную сессию, похожую на Python REPL или MySQL консоль. "
|
||||||
|
"При запуске пользователь входит в эту сессию, где ему доступна вся "
|
||||||
|
"реализованная вами функциональность."
|
||||||
|
msgstr ""
|
||||||
|
"Argenta is designed for creating applications that work in their own "
|
||||||
|
"context (scope). This means that the application starts once and creates "
|
||||||
|
"an interactive session, similar to Python REPL or MySQL console. When "
|
||||||
|
"launched, the user enters this session where all the functionality you've"
|
||||||
|
" implemented is available."
|
||||||
|
|
||||||
|
#: ../../index.rst:22
|
||||||
|
msgid ""
|
||||||
|
"Один из ключевых принципов библиотеки — цикличность. После выполнения "
|
||||||
|
"команды пользователь остаётся в интерактивной сессии, в отличие от таких "
|
||||||
|
"библиотек, как ``argparse``, ``click`` и ``typer``, где приложение "
|
||||||
|
"завершается после каждой команды. Выход из сессии контролируется "
|
||||||
|
"пользователем."
|
||||||
|
msgstr ""
|
||||||
|
"One of the key principles of the library is cyclicity. After executing a "
|
||||||
|
"command, the user remains in the interactive session, "
|
||||||
|
"unlike libraries such as ``argparse``, ``click``, "
|
||||||
|
"and ``typer``, where the application terminates after each command. "
|
||||||
|
"Exiting the session is controlled by the user."
|
||||||
|
|
||||||
|
#: ../../index.rst:24
|
||||||
|
msgid "**Ключевые особенности:**"
|
||||||
|
msgstr "**Key features:**"
|
||||||
|
|
||||||
|
#: ../../index.rst:26
|
||||||
|
msgid ""
|
||||||
|
"**Интерактивные сессии**: В отличие от традиционных CLI-инструментов, "
|
||||||
|
"``Argenta`` создаёт циклические сессии, позволяя пользователю выполнять "
|
||||||
|
"команды последовательно, не перезапуская приложение."
|
||||||
|
msgstr ""
|
||||||
|
"**Interactive sessions**: Unlike traditional CLI tools, ``Argenta`` "
|
||||||
|
"creates cyclical sessions, allowing users to execute commands "
|
||||||
|
"sequentially without restarting the application."
|
||||||
|
|
||||||
|
#: ../../index.rst:27
|
||||||
|
msgid ""
|
||||||
|
"**Декларативный синтаксис**: Команды и их обработчики объявляются с "
|
||||||
|
"помощью простых декораторов, что делает код интуитивно понятным и "
|
||||||
|
"позволяет сосредоточиться на том, \"что\" вы хотите сделать, а не "
|
||||||
|
"\"как\"."
|
||||||
|
msgstr ""
|
||||||
|
"**Declarative syntax**: Commands and their handlers are declared using "
|
||||||
|
"simple decorators, making the code intuitive and allowing you to focus on"
|
||||||
|
" \"what\" you want to do, not \"how\"."
|
||||||
|
|
||||||
|
#: ../../index.rst:28
|
||||||
|
msgid ""
|
||||||
|
"**Нативный DI**: Благодаря интеграции с "
|
||||||
|
"`dishka <https://dishka.readthedocs.io/en/stable/>`_, вы можете легко "
|
||||||
|
"внедрять зависимости прямо в обработчики команд, что упрощает их "
|
||||||
|
"тестирование, позволяет избежать мутабельных глобалов и многое другое."
|
||||||
|
msgstr ""
|
||||||
|
"**Native DI**: Thanks to integration with `dishka "
|
||||||
|
"<https://dishka.readthedocs.io/en/stable/>`_, you can easily inject "
|
||||||
|
"dependencies directly into command handlers, simplifying their testing, "
|
||||||
|
"avoiding mutable globals, and much more."
|
||||||
|
|
||||||
|
#: ../../index.rst:29
|
||||||
|
msgid ""
|
||||||
|
"**Автоматическая валидация и парсинг**: Библиотека берёт на себя "
|
||||||
|
"обработку флагов и аргументов командной строки, включая их парсинг, "
|
||||||
|
"валидацию и преобразование типов."
|
||||||
|
msgstr ""
|
||||||
|
"**Automatic validation and parsing**: The library handles command-line "
|
||||||
|
"flags and arguments, including their parsing, validation, and type "
|
||||||
|
"conversion."
|
||||||
|
|
||||||
|
#: ../../index.rst:30
|
||||||
|
msgid ""
|
||||||
|
"**Гибкая настройка**: Вы можете легко кастомизировать системные "
|
||||||
|
"сообщения, форматирование вывода, создавать кастомные обработчики "
|
||||||
|
"нестандартного поведения и т.д."
|
||||||
|
msgstr ""
|
||||||
|
"**Flexible configuration**: You can easily customize system messages, "
|
||||||
|
"output formatting, create custom handlers for non-standard behavior, and "
|
||||||
|
"more."
|
||||||
|
|
||||||
|
#: ../../index.rst:35
|
||||||
|
msgid "Архитектура и жизненный цикл"
|
||||||
|
msgstr "Architecture and lifecycle"
|
||||||
|
|
||||||
|
#: ../../index.rst:37
|
||||||
|
msgid ""
|
||||||
|
"Следующая диаграмма иллюстрирует, как компоненты Argenta взаимодействуют "
|
||||||
|
"друг с другом, обрабатывая ввод пользователя."
|
||||||
|
msgstr ""
|
||||||
|
"The following diagram illustrates how Argenta components interact with "
|
||||||
|
"each other while processing user input."
|
||||||
|
|
||||||
|
#: ../../index.rst:39
|
||||||
|
msgid "Request Lifecycle Diagram"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
@@ -0,0 +1,135 @@
|
|||||||
|
# SOME DESCRIPTIVE TITLE.
|
||||||
|
# Copyright (C) 2025, kolo
|
||||||
|
# This file is distributed under the same license as the Argenta package.
|
||||||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, 2025.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Argenta \n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2026-01-22 04:26+0300\n"
|
||||||
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
|
"Language: en\n"
|
||||||
|
"Language-Team: en <LL@li.org>\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=utf-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Generated-By: Babel 2.17.0\n"
|
||||||
|
|
||||||
|
#: ../../root/api/app/autocompleter.rst:4
|
||||||
|
msgid "AutoCompleter"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../root/api/app/autocompleter.rst:6
|
||||||
|
msgid ""
|
||||||
|
"``AutoCompleter`` — это компонент, отвечающий за интерактивное "
|
||||||
|
"автодополнение команд. Он улучшает пользовательский опыт, предлагая "
|
||||||
|
"подсказки и завершая ввод на основе истории команд, что ускоряет работу и"
|
||||||
|
" снижает вероятность опечаток."
|
||||||
|
msgstr ""
|
||||||
|
"``AutoCompleter`` is a component responsible for interactive command "
|
||||||
|
"autocompletion. It improves user experience by offering suggestions and "
|
||||||
|
"completing input based on command history, which speeds up work and "
|
||||||
|
"reduces the likelihood of typos."
|
||||||
|
|
||||||
|
#: ../../root/api/app/autocompleter.rst:11
|
||||||
|
msgid "Инициализация"
|
||||||
|
msgstr "Initialization"
|
||||||
|
|
||||||
|
#: ../../root/api/app/autocompleter.rst:21
|
||||||
|
msgid "Создаёт и настраивает экземпляр ``AutoCompleter``."
|
||||||
|
msgstr "Creates and configures an ``AutoCompleter`` instance."
|
||||||
|
|
||||||
|
#: ../../root/api/app/autocompleter.rst:23
|
||||||
|
msgid ""
|
||||||
|
"``history_filename``: Имя файла для сохранения истории команд. Если "
|
||||||
|
"указано, история будет сохраняться между сессиями. При значении ``None`` "
|
||||||
|
"история хранится только в контексте сессии."
|
||||||
|
msgstr ""
|
||||||
|
"``history_filename``: Filename for saving command history. If specified, "
|
||||||
|
"history will be saved between sessions. When set to ``None``, history is "
|
||||||
|
"stored only within the session context."
|
||||||
|
|
||||||
|
#: ../../root/api/app/autocompleter.rst:24
|
||||||
|
msgid ""
|
||||||
|
"``autocomplete_button``: Клавиша, активирующая автодополнение. По "
|
||||||
|
"умолчанию — **Tab**."
|
||||||
|
msgstr ""
|
||||||
|
"``autocomplete_button``: Key that activates autocompletion. Defaults to "
|
||||||
|
"**Tab**."
|
||||||
|
|
||||||
|
#: ../../root/api/app/autocompleter.rst:25
|
||||||
|
msgid ""
|
||||||
|
"``command_highlighting``: Если True, то в реальном времени при вводе "
|
||||||
|
"команды она будет подсвечиваться: зелёным, если такой триггер существует "
|
||||||
|
"и красный, если нет."
|
||||||
|
msgstr ""
|
||||||
|
"``command_highlighting``: If True, then in real time, when entering a "
|
||||||
|
" command, it will be highlighted: green if such a trigger exists "
|
||||||
|
"and red if not."
|
||||||
|
|
||||||
|
#: ../../root/api/app/autocompleter.rst:26
|
||||||
|
msgid ""
|
||||||
|
"``auto_suggestions``: Если True, то дополнение до раннее введённой "
|
||||||
|
"команды будет сразу отображаться светло-серым в строке ввода."
|
||||||
|
msgstr ""
|
||||||
|
"``auto_suggestions``: If True, the addition to the previously entered "
|
||||||
|
" command will immediately be displayed in light gray in the input line."
|
||||||
|
|
||||||
|
#: ../../root/api/app/autocompleter.rst:31
|
||||||
|
msgid "Назначение и возможности"
|
||||||
|
msgstr "Purpose and Features"
|
||||||
|
|
||||||
|
#: ../../root/api/app/autocompleter.rst:33
|
||||||
|
msgid "Основные возможности ``AutoCompleter``:"
|
||||||
|
msgstr "Main features of ``AutoCompleter``:"
|
||||||
|
|
||||||
|
#: ../../root/api/app/autocompleter.rst:35
|
||||||
|
msgid ""
|
||||||
|
"**Автодополнение по истории**: При нажатии клавиши автодополнения (по "
|
||||||
|
"умолчанию **Tab**) система ищет в истории команды, начинающиеся с уже "
|
||||||
|
"введённого текста."
|
||||||
|
msgstr ""
|
||||||
|
"**History-based autocompletion**: When the autocompletion key is pressed "
|
||||||
|
"(by default **Tab**), the system searches history for commands starting "
|
||||||
|
"with the already entered text."
|
||||||
|
|
||||||
|
#: ../../root/api/app/autocompleter.rst:37
|
||||||
|
msgid ""
|
||||||
|
"**Общий префикс**: Если найдено несколько команд с общим префиксом, будет"
|
||||||
|
" подставлена только общая часть. Например, для команд ``show_users`` и "
|
||||||
|
"``show_profile`` при вводе ``sho`` и нажатии **Tab** ввод дополнится до "
|
||||||
|
"``show_``."
|
||||||
|
msgstr ""
|
||||||
|
"**Common prefix**: If multiple commands with a common prefix are found, "
|
||||||
|
"only the common part will be inserted. For example, for commands "
|
||||||
|
"``show_users`` and ``show_profile``, when entering ``sho`` and pressing "
|
||||||
|
"**Tab**, the input will be completed to ``show_``."
|
||||||
|
|
||||||
|
#: ../../root/api/app/autocompleter.rst:39
|
||||||
|
msgid ""
|
||||||
|
"**Постоянная история**: Если указан ``history_filename``, история команд "
|
||||||
|
"сохраняется в файл при выходе и загружается при следующем запуске. Это "
|
||||||
|
"делает автодополнение со временем «умнее»."
|
||||||
|
msgstr ""
|
||||||
|
"**Persistent history**: If ``history_filename`` is specified, command "
|
||||||
|
"history is saved to a file on exit and loaded on the next startup. This "
|
||||||
|
"makes autocompletion \"smarter\" over time."
|
||||||
|
|
||||||
|
#: ../../root/api/app/autocompleter.rst:41
|
||||||
|
msgid ""
|
||||||
|
"**Настройка клавиши**: Клавишу автодополнения можно изменить с помощью "
|
||||||
|
"параметра ``autocomplete_button``."
|
||||||
|
msgstr ""
|
||||||
|
"**Key customization**: The autocompletion key can be changed using the "
|
||||||
|
"``autocomplete_button`` parameter."
|
||||||
|
|
||||||
|
#: ../../root/api/app/autocompleter.rst:46
|
||||||
|
msgid "Пример использования"
|
||||||
|
msgstr "Usage Example"
|
||||||
|
|
||||||
|
#: ../../root/api/app/autocompleter.rst:48
|
||||||
|
msgid "``AutoCompleter`` передаётся как аргумент при инициализации `App`."
|
||||||
|
msgstr "``AutoCompleter`` is passed as an argument when initializing `App`."
|
||||||
@@ -0,0 +1,150 @@
|
|||||||
|
# SOME DESCRIPTIVE TITLE.
|
||||||
|
# Copyright (C) 2025, kolo
|
||||||
|
# This file is distributed under the same license as the Argenta package.
|
||||||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, 2025.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Argenta \n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2025-12-02 22:27+0300\n"
|
||||||
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
|
"Language: en\n"
|
||||||
|
"Language-Team: en <LL@li.org>\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=utf-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Generated-By: Babel 2.17.0\n"
|
||||||
|
|
||||||
|
#: ../../root/api/app/dividing_lines.rst:4
|
||||||
|
msgid "Dividing Lines"
|
||||||
|
msgstr "Dividing Lines"
|
||||||
|
|
||||||
|
#: ../../root/api/app/dividing_lines.rst:6
|
||||||
|
msgid ""
|
||||||
|
"Разделительные линии в ``Argenta`` используются для визуального "
|
||||||
|
"структурирования вывода и отделения блоков информации друг от друга. "
|
||||||
|
"Библиотека предлагает два типа линий: статическую и динамическую."
|
||||||
|
msgstr ""
|
||||||
|
"Dividing lines in ``Argenta`` are used for visual structuring of output and separating "
|
||||||
|
"information blocks from each other. The library offers two types of lines: static and dynamic."
|
||||||
|
|
||||||
|
#: ../../root/api/app/dividing_lines.rst:11
|
||||||
|
msgid "``StaticDividingLine``"
|
||||||
|
msgstr "``StaticDividingLine``"
|
||||||
|
|
||||||
|
#: ../../root/api/app/dividing_lines.rst:13
|
||||||
|
msgid ""
|
||||||
|
"``StaticDividingLine`` создаёт разделительную линию **фиксированной** "
|
||||||
|
"длины. Этот тип линии полезен для создания предсказуемого и "
|
||||||
|
"унифицированного интерфейса."
|
||||||
|
msgstr ""
|
||||||
|
"``StaticDividingLine`` creates a dividing line of **fixed** length. This type of line "
|
||||||
|
"is useful for creating a predictable and unified interface."
|
||||||
|
|
||||||
|
#: ../../root/api/app/dividing_lines.rst:21
|
||||||
|
msgid "Создаёт экземпляр статической разделительной линии."
|
||||||
|
msgstr "Creates a static dividing line instance."
|
||||||
|
|
||||||
|
#: ../../root/api/app/dividing_lines.rst:23
|
||||||
|
msgid ""
|
||||||
|
"``unit_part``: Символ для построения линии (учитывается только первый "
|
||||||
|
"символ). По умолчанию: ``-``."
|
||||||
|
msgstr ""
|
||||||
|
"``unit_part``: Character for building the line (only the first character is considered). "
|
||||||
|
"Defaults to: ``-``."
|
||||||
|
|
||||||
|
#: ../../root/api/app/dividing_lines.rst:24
|
||||||
|
msgid "``length``: Фиксированная длина линии. По умолчанию: ``25``."
|
||||||
|
msgstr "``length``: Fixed line length. Defaults to: ``25``."
|
||||||
|
|
||||||
|
#: ../../root/api/app/dividing_lines.rst:29
|
||||||
|
msgid "``DynamicDividingLine``"
|
||||||
|
msgstr "``DynamicDividingLine``"
|
||||||
|
|
||||||
|
#: ../../root/api/app/dividing_lines.rst:31
|
||||||
|
msgid ""
|
||||||
|
"``DynamicDividingLine`` создаёт линию, длина которой **динамически** "
|
||||||
|
"подстраивается под самую длинную строку в выводе команды. Это требует "
|
||||||
|
"перехвата ``stdout``, в результате чего разделители идеально обрамляют "
|
||||||
|
"выводимый контент."
|
||||||
|
msgstr ""
|
||||||
|
"``DynamicDividingLine`` creates a line whose length **dynamically** adjusts to the longest "
|
||||||
|
"line in the command output. This requires capturing ``stdout``, resulting in dividers that "
|
||||||
|
"perfectly frame the output content."
|
||||||
|
|
||||||
|
#: ../../root/api/app/dividing_lines.rst:38
|
||||||
|
msgid "Создаёт экземпляр динамической разделительной линии."
|
||||||
|
msgstr "Creates a dynamic dividing line instance."
|
||||||
|
|
||||||
|
#: ../../root/api/app/dividing_lines.rst:40
|
||||||
|
msgid "``unit_part``: Символ для построения линии. По умолчанию: ``-``."
|
||||||
|
msgstr "``unit_part``: Character for building the line. Defaults to: ``-``."
|
||||||
|
|
||||||
|
#: ../../root/api/app/dividing_lines.rst:42
|
||||||
|
msgid "Длина вычисляется автоматически и не задаётся при инициализации."
|
||||||
|
msgstr "Length is calculated automatically and is not set during initialization."
|
||||||
|
|
||||||
|
#: ../../root/api/app/dividing_lines.rst:45
|
||||||
|
msgid ""
|
||||||
|
"Обязательно почитайте про нюансы использования динамических линий и "
|
||||||
|
"перехвата ``stdout`` в :ref:`этом разделе<root_redirect_stdout>`."
|
||||||
|
msgstr ""
|
||||||
|
"Be sure to read about the nuances of using dynamic lines and capturing ``stdout`` "
|
||||||
|
"in :ref:`this section<root_redirect_stdout>`."
|
||||||
|
|
||||||
|
#: ../../root/api/app/dividing_lines.rst:50
|
||||||
|
msgid "Назначение и использование"
|
||||||
|
msgstr "Purpose and Usage"
|
||||||
|
|
||||||
|
#: ../../root/api/app/dividing_lines.rst:52
|
||||||
|
msgid "Выбор между статической и динамической линией зависит от ваших задач."
|
||||||
|
msgstr "The choice between static and dynamic lines depends on your needs."
|
||||||
|
|
||||||
|
#: ../../root/api/app/dividing_lines.rst:54
|
||||||
|
msgid "**StaticDividingLine** идеально подходит, если:"
|
||||||
|
msgstr "**StaticDividingLine** is ideal if:"
|
||||||
|
|
||||||
|
#: ../../root/api/app/dividing_lines.rst:56
|
||||||
|
msgid "Вам нужен строгий и консистентный дизайн."
|
||||||
|
msgstr "You need a strict and consistent design."
|
||||||
|
|
||||||
|
#: ../../root/api/app/dividing_lines.rst:57
|
||||||
|
msgid ""
|
||||||
|
"Вы используете роутеры с отключённым перехватом ``stdout`` "
|
||||||
|
"(``disable_redirect_stdout=True``), где динамическое вычисление длины "
|
||||||
|
"невозможно."
|
||||||
|
msgstr ""
|
||||||
|
"You are using routers with disabled ``stdout`` capture (``disable_redirect_stdout=True``), "
|
||||||
|
"where dynamic length calculation is not possible."
|
||||||
|
|
||||||
|
#: ../../root/api/app/dividing_lines.rst:59
|
||||||
|
msgid ""
|
||||||
|
"**DynamicDividingLine** (поведение по умолчанию) — предпочтительный "
|
||||||
|
"выбор, если:"
|
||||||
|
msgstr "**DynamicDividingLine** (default behavior) is the preferred choice if:"
|
||||||
|
|
||||||
|
#: ../../root/api/app/dividing_lines.rst:61
|
||||||
|
msgid "Вы хотите, чтобы интерфейс был адаптивным."
|
||||||
|
msgstr "You want the interface to be adaptive."
|
||||||
|
|
||||||
|
#: ../../root/api/app/dividing_lines.rst:62
|
||||||
|
msgid "Вывод ваших команд имеет разную длину."
|
||||||
|
msgstr "Your command output has varying lengths."
|
||||||
|
|
||||||
|
#: ../../root/api/app/dividing_lines.rst:63
|
||||||
|
msgid ""
|
||||||
|
"В ваших обработчиках нет интерактивных операций ввода (например, "
|
||||||
|
"``input()``)."
|
||||||
|
msgstr "Your handlers do not have interactive input operations (e.g., ``input()``)."
|
||||||
|
|
||||||
|
#: ../../root/api/app/dividing_lines.rst:65
|
||||||
|
msgid ""
|
||||||
|
"Тип разделителя для всего приложения задаётся при инициализации ``App`` "
|
||||||
|
"через параметр ``dividing_line``."
|
||||||
|
msgstr ""
|
||||||
|
"The divider type for the entire application is set during ``App`` initialization "
|
||||||
|
"via the ``dividing_line`` parameter."
|
||||||
|
|
||||||
@@ -0,0 +1,290 @@
|
|||||||
|
# SOME DESCRIPTIVE TITLE.
|
||||||
|
# Copyright (C) 2025, kolo
|
||||||
|
# This file is distributed under the same license as the Argenta package.
|
||||||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, 2025.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Argenta \n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2026-02-06 23:44+0300\n"
|
||||||
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
|
"Language: en\n"
|
||||||
|
"Language-Team: en <LL@li.org>\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=utf-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Generated-By: Babel 2.17.0\n"
|
||||||
|
|
||||||
|
#: ../../root/api/app/index.rst:4
|
||||||
|
msgid "App"
|
||||||
|
msgstr "App"
|
||||||
|
|
||||||
|
#: ../../root/api/app/index.rst:6
|
||||||
|
msgid ""
|
||||||
|
"Объект ``App`` — это ядро вашего консольного приложения. Он отвечает за "
|
||||||
|
"конфигурацию, управление жизненным циклом, обработку команд и "
|
||||||
|
"взаимодействие с пользователем, координируя работу всех компонентов: "
|
||||||
|
"роутеров, обработчиков и системных сообщений."
|
||||||
|
msgstr ""
|
||||||
|
"The ``App`` object is the implementations of your console application. It"
|
||||||
|
" handles configuration, lifecycle management, command processing, and "
|
||||||
|
"user interaction, coordinating the work of all components: routers, "
|
||||||
|
"handlers, and system messages."
|
||||||
|
|
||||||
|
#: ../../root/api/app/index.rst:11
|
||||||
|
msgid "Инициализация"
|
||||||
|
msgstr "Initialization"
|
||||||
|
|
||||||
|
#: ../../root/api/app/index.rst:31
|
||||||
|
msgid "Создаёт и настраивает экземпляр приложения."
|
||||||
|
msgstr "Creates and configures an application instance."
|
||||||
|
|
||||||
|
#: ../../root/api/app/index.rst:33
|
||||||
|
msgid "``prompt``: Приглашение к вводу, отображаемое перед каждой командой."
|
||||||
|
msgstr "``prompt``: Input prompt displayed before each command."
|
||||||
|
|
||||||
|
#: ../../root/api/app/index.rst:34
|
||||||
|
msgid "``initial_message``: Сообщение, выводимое при запуске приложения."
|
||||||
|
msgstr "``initial_message``: Message displayed when the application starts."
|
||||||
|
|
||||||
|
#: ../../root/api/app/index.rst:35
|
||||||
|
msgid "``farewell_message``: Сообщение, выводимое при выходе из приложения."
|
||||||
|
msgstr "``farewell_message``: Message displayed when exiting the application."
|
||||||
|
|
||||||
|
#: ../../root/api/app/index.rst:36
|
||||||
|
msgid ""
|
||||||
|
"``exit_command``: Команда, которая маркируется как триггер для выхода из "
|
||||||
|
"приложения."
|
||||||
|
msgstr ""
|
||||||
|
"``exit_command``: Command that is marked as a trigger for exiting the "
|
||||||
|
"application."
|
||||||
|
|
||||||
|
#: ../../root/api/app/index.rst:37
|
||||||
|
msgid ""
|
||||||
|
"``system_router_title``: Заголовок для системного роутера (содержит "
|
||||||
|
"команду выхода)."
|
||||||
|
msgstr ""
|
||||||
|
"``system_router_title``: Title for the system router (contains the exit "
|
||||||
|
"command)."
|
||||||
|
|
||||||
|
#: ../../root/api/app/index.rst:38
|
||||||
|
msgid ""
|
||||||
|
"``dividing_line``: Тип разделительной линии (``StaticDividingLine`` или "
|
||||||
|
"``DynamicDividingLine``)."
|
||||||
|
msgstr ""
|
||||||
|
"``dividing_line``: Type of dividing line (``StaticDividingLine`` or "
|
||||||
|
"``DynamicDividingLine``)."
|
||||||
|
|
||||||
|
#: ../../root/api/app/index.rst:39
|
||||||
|
msgid ""
|
||||||
|
"``repeat_command_groups_printing``: Если ``True``, список доступных "
|
||||||
|
"команд выводится перед каждым вводом."
|
||||||
|
msgstr ""
|
||||||
|
"``repeat_command_groups_printing``: If ``True``, the list of available "
|
||||||
|
"commands is displayed before each input."
|
||||||
|
|
||||||
|
#: ../../root/api/app/index.rst:40
|
||||||
|
msgid ""
|
||||||
|
"``override_system_messages``: Если ``True``, стандартное форматирование "
|
||||||
|
"(цвета, ASCII-арт) отключается."
|
||||||
|
msgstr ""
|
||||||
|
"``override_system_messages``: If ``True``, standard formatting (colors, "
|
||||||
|
"ASCII art) is disabled."
|
||||||
|
|
||||||
|
#: ../../root/api/app/index.rst:41
|
||||||
|
msgid ""
|
||||||
|
"``autocompleter``: Экземпляр класса :ref:`AutoCompleter "
|
||||||
|
"<root_api_app_autocompleter>`, отвечающий за автодополнение команд."
|
||||||
|
msgstr ""
|
||||||
|
"``autocompleter``: Instance of the :ref:`AutoCompleter "
|
||||||
|
"<root_api_app_autocompleter>` class responsible for command "
|
||||||
|
"autocompletion."
|
||||||
|
|
||||||
|
#: ../../root/api/app/index.rst:42
|
||||||
|
#, fuzzy
|
||||||
|
msgid "``printer``: Функция для вывода всех системных сообщений."
|
||||||
|
msgstr ""
|
||||||
|
"``print_func``: Function for outputting all system messages (defaults to "
|
||||||
|
"``rich.Console().print``)."
|
||||||
|
|
||||||
|
#: ../../root/api/app/index.rst:47
|
||||||
|
msgid ""
|
||||||
|
"В приложениях на Argenta регистр вводимых команд не важен, проверка на "
|
||||||
|
"существование и роутинг команд производится на основании триггеров, "
|
||||||
|
"приведённых к нижнему регистру."
|
||||||
|
msgstr ""
|
||||||
|
"In applications on Argenta, the case of the entered commands is not "
|
||||||
|
"important, checking for the existence and routing of commands is "
|
||||||
|
"performed based on triggers reduced to lowercase."
|
||||||
|
|
||||||
|
#: ../../root/api/app/index.rst:50
|
||||||
|
msgid "Основные методы"
|
||||||
|
msgstr "Main Methods"
|
||||||
|
|
||||||
|
#: ../../root/api/app/index.rst:54
|
||||||
|
msgid ""
|
||||||
|
"Регистрирует роутер в приложении. Все команды из этого роутера становятся"
|
||||||
|
" доступными для вызова."
|
||||||
|
msgstr ""
|
||||||
|
"Registers a router in the application. All commands from this router "
|
||||||
|
"become available for invocation."
|
||||||
|
|
||||||
|
#: ../../root/api/app/index.rst
|
||||||
|
msgid "Parameters"
|
||||||
|
msgstr "Parameters"
|
||||||
|
|
||||||
|
#: ../../root/api/app/index.rst:56
|
||||||
|
msgid "Экземпляр ``Router`` для регистрации."
|
||||||
|
msgstr "``Router`` instance to register."
|
||||||
|
|
||||||
|
#: ../../root/api/app/index.rst:60
|
||||||
|
msgid "Регистрирует несколько роутеров одновременно."
|
||||||
|
msgstr "Registers multiple routers simultaneously."
|
||||||
|
|
||||||
|
#: ../../root/api/app/index.rst:62
|
||||||
|
msgid "Последовательность экземпляров ``Router`` для регистрации."
|
||||||
|
msgstr "Sequence of ``Router`` instances to register."
|
||||||
|
|
||||||
|
#: ../../root/api/app/index.rst:66
|
||||||
|
msgid ""
|
||||||
|
"Добавляет текстовое сообщение, которое выводится при запуске приложения "
|
||||||
|
"после ``initial_message``."
|
||||||
|
msgstr ""
|
||||||
|
"Adds a text message that is displayed when the application starts after "
|
||||||
|
"``initial_message``."
|
||||||
|
|
||||||
|
#: ../../root/api/app/index.rst:68
|
||||||
|
msgid "Строка с сообщением."
|
||||||
|
msgstr "String with the message."
|
||||||
|
|
||||||
|
#: ../../root/api/app/index.rst:71
|
||||||
|
msgid ""
|
||||||
|
"Для вывода стандартных сообщений можно использовать готовые шаблоны из "
|
||||||
|
":ref:`PredefinedMessages <root_api_predefined_messages>`."
|
||||||
|
msgstr ""
|
||||||
|
"For outputting standard messages, you can use ready-made templates from "
|
||||||
|
":ref:`PredefinedMessages <root_api_predefined_messages>`."
|
||||||
|
|
||||||
|
#: ../../root/api/app/index.rst:76
|
||||||
|
msgid "Методы установки обработчиков"
|
||||||
|
msgstr "Handler Setup Methods"
|
||||||
|
|
||||||
|
#: ../../root/api/app/index.rst:78
|
||||||
|
msgid ""
|
||||||
|
"``App`` позволяет настраивать реакцию на различные события, такие как "
|
||||||
|
"ошибки ввода или неизвестные команды."
|
||||||
|
msgstr ""
|
||||||
|
"``App`` allows you to configure responses to various events, such as "
|
||||||
|
"input errors or unknown commands."
|
||||||
|
|
||||||
|
#: ../../root/api/app/index.rst:81
|
||||||
|
msgid ""
|
||||||
|
"Подробнее об исключениях и их обработке в соответствующем :ref:`разделе "
|
||||||
|
"документации <root_error_handling>`."
|
||||||
|
msgstr ""
|
||||||
|
"For more details on exceptions and their handling, see the corresponding "
|
||||||
|
":ref:`documentation section <root_error_handling>`."
|
||||||
|
|
||||||
|
#: ../../root/api/app/index.rst:87
|
||||||
|
msgid "Устанавливает шаблон для форматирования описания команды."
|
||||||
|
msgstr "Sets the template for formatting command descriptions."
|
||||||
|
|
||||||
|
#: ../../root/api/app/index.rst:89
|
||||||
|
msgid "Обработчик принимает триггер команды (``str``) и её описание (``str``)."
|
||||||
|
msgstr ""
|
||||||
|
"The handler accepts the command trigger (``str``) and its description "
|
||||||
|
"(``str``)."
|
||||||
|
|
||||||
|
#: ../../root/api/app/index.rst:95
|
||||||
|
msgid "Устанавливает обработчик при некорректном введённом синтаксисе флагов."
|
||||||
|
msgstr "Sets the handler for incorrect flag syntax input."
|
||||||
|
|
||||||
|
#: ../../root/api/app/index.rst:97 ../../root/api/app/index.rst:105
|
||||||
|
msgid "Обработчик принимает строку, введённую пользователем."
|
||||||
|
msgstr "The handler accepts the string entered by the user."
|
||||||
|
|
||||||
|
#: ../../root/api/app/index.rst:103
|
||||||
|
msgid "Устанавливает обработчик при повторяющихся флагах в введённой команде."
|
||||||
|
msgstr "Sets the handler for duplicate flags in the entered command."
|
||||||
|
|
||||||
|
#: ../../root/api/app/index.rst:111
|
||||||
|
msgid "Устанавливает обработчик при вводе неизвестной команды."
|
||||||
|
msgstr "Sets the handler for entering an unknown command."
|
||||||
|
|
||||||
|
#: ../../root/api/app/index.rst:113
|
||||||
|
msgid "Обработчик принимает объект ``InputCommand`` - объект введённой команды."
|
||||||
|
msgstr ""
|
||||||
|
"The handler accepts an ``InputCommand`` object - the entered command "
|
||||||
|
"object."
|
||||||
|
|
||||||
|
#: ../../root/api/app/index.rst:119
|
||||||
|
msgid "Устанавливает обработчик при вводе пустой строки."
|
||||||
|
msgstr "Sets the handler for entering an empty string."
|
||||||
|
|
||||||
|
#: ../../root/api/app/index.rst:121
|
||||||
|
msgid "Обработчик не принимает аргументов."
|
||||||
|
msgstr "The handler accepts no arguments."
|
||||||
|
|
||||||
|
#: ../../root/api/app/index.rst:127
|
||||||
|
msgid "Переопределяет стандартное поведение при вызове команды выхода."
|
||||||
|
msgstr "Overrides the default behavior when the exit command is invoked."
|
||||||
|
|
||||||
|
#: ../../root/api/app/index.rst:129
|
||||||
|
msgid "Обработчик принимает объект ``Response``."
|
||||||
|
msgstr "The handler accepts a ``Response`` object."
|
||||||
|
|
||||||
|
#: ../../root/api/app/index.rst:142
|
||||||
|
msgid "PredefinedMessages"
|
||||||
|
msgstr "PredefinedMessages"
|
||||||
|
|
||||||
|
#: ../../root/api/app/index.rst:144
|
||||||
|
msgid ""
|
||||||
|
"``PredefinedMessages`` — это контейнер, содержащий набор готовых к "
|
||||||
|
"использованию сообщений. Они отформатированы с использованием синтаксиса "
|
||||||
|
"``rich`` и предназначены для вывода стандартной информации, такой как "
|
||||||
|
"подсказки по использованию."
|
||||||
|
msgstr ""
|
||||||
|
"``PredefinedMessages`` is a container containing a set of ready-to-use "
|
||||||
|
"messages. They are formatted using ``rich`` syntax and are intended for "
|
||||||
|
"displaying standard information, such as usage hints."
|
||||||
|
|
||||||
|
#: ../../root/api/app/index.rst:146
|
||||||
|
msgid "Рекомендуется использовать их при старте приложения."
|
||||||
|
msgstr "It is recommended to use them when starting the application."
|
||||||
|
|
||||||
|
#: ../../root/api/app/index.rst:173
|
||||||
|
msgid "Строка: ``[b dim]Usage[/b dim]: [i]<command> <[green]flags[/green]>[/i]``"
|
||||||
|
msgstr "String: ``[b dim]Usage[/b dim]: [i]<command> <[green]flags[/green]>[/i]``"
|
||||||
|
|
||||||
|
#: ../../root/api/app/index.rst:175
|
||||||
|
msgid "Отображается как: ``Usage: <command> <flags>``"
|
||||||
|
msgstr "Displayed as: ``Usage: <command> <flags>``"
|
||||||
|
|
||||||
|
#: ../../root/api/app/index.rst:179
|
||||||
|
msgid "Строка: ``[b dim]Help[/b dim]: [i]<command>[/i] [b red]--help[/b red]``"
|
||||||
|
msgstr "String: ``[b dim]Help[/b dim]: [i]<command>[/i] [b red]--help[/b red]``"
|
||||||
|
|
||||||
|
#: ../../root/api/app/index.rst:181
|
||||||
|
msgid "Отображается как: ``Help: <command> --help``"
|
||||||
|
msgstr "Displayed as: ``Help: <command> --help``"
|
||||||
|
|
||||||
|
#: ../../root/api/app/index.rst:185
|
||||||
|
msgid "Строка: ``[b dim]Autocomplete[/b dim]: [i]<part>[/i] [bold]<tab>``"
|
||||||
|
msgstr "String: ``[b dim]Autocomplete[/b dim]: [i]<part>[/i] [bold]<tab>``"
|
||||||
|
|
||||||
|
#: ../../root/api/app/index.rst:187
|
||||||
|
msgid "Отображается как: ``Autocomplete: <part> <tab>``"
|
||||||
|
msgstr "Displayed as: ``Autocomplete: <part> <tab>``"
|
||||||
|
|
||||||
|
#~ msgid ""
|
||||||
|
#~ "``ignore_command_register``: Если ``True``, регистр"
|
||||||
|
#~ " вводимых команд игнорируется при поиске"
|
||||||
|
#~ " обработчика."
|
||||||
|
#~ msgstr ""
|
||||||
|
#~ "``ignore_command_register``: If ``True``, command"
|
||||||
|
#~ " case is ignored when searching for"
|
||||||
|
#~ " a handler."
|
||||||
|
|
||||||
@@ -0,0 +1,105 @@
|
|||||||
|
# SOME DESCRIPTIVE TITLE.
|
||||||
|
# Copyright (C) 2025, kolo
|
||||||
|
# This file is distributed under the same license as the Argenta package.
|
||||||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, 2025.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Argenta \n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2025-12-04 20:39+0300\n"
|
||||||
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
|
"Language: en\n"
|
||||||
|
"Language-Team: en <LL@li.org>\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=utf-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Generated-By: Babel 2.17.0\n"
|
||||||
|
|
||||||
|
#: ../../root/api/bridge.rst:4
|
||||||
|
msgid "DataBridge"
|
||||||
|
msgstr "DataBridge"
|
||||||
|
|
||||||
|
#: ../../root/api/bridge.rst:6
|
||||||
|
msgid ""
|
||||||
|
"``DataBridge`` — это сущность, предоставляющая временное хранилище "
|
||||||
|
"данных, которое существует в рамках одной сессии приложения (от запуска "
|
||||||
|
"до выхода). Она предназначена для обмена данными между обработчиками."
|
||||||
|
msgstr ""
|
||||||
|
"``DataBridge`` is an entity that provides temporary data storage that "
|
||||||
|
"exists within a single application session (from startup to exit). It is "
|
||||||
|
"designed for data exchange between handlers."
|
||||||
|
|
||||||
|
#: ../../root/api/bridge.rst:8
|
||||||
|
msgid "Основной способ получения доступа к ``DataBridge`` — через DI."
|
||||||
|
msgstr "The main way to access ``DataBridge`` is through DI."
|
||||||
|
|
||||||
|
#: ../../root/api/bridge.rst:21
|
||||||
|
msgid "**Практический пример: Аутентификация**"
|
||||||
|
msgstr "**Practical Example: Authentication**"
|
||||||
|
|
||||||
|
#: ../../root/api/bridge.rst:23
|
||||||
|
msgid ""
|
||||||
|
"Рассмотрим пример, где команда `login` сохраняет токен аутентификации, а "
|
||||||
|
"команда `get-profile` использует его."
|
||||||
|
msgstr ""
|
||||||
|
"Let's consider an example where the `login` command saves an "
|
||||||
|
"authentication token, and the `get-profile` command uses it."
|
||||||
|
|
||||||
|
#: ../../root/api/bridge.rst:29
|
||||||
|
msgid "**Как это работает:**"
|
||||||
|
msgstr "**How it works:**"
|
||||||
|
|
||||||
|
#: ../../root/api/bridge.rst:31
|
||||||
|
msgid ""
|
||||||
|
"При вызове обработчика ``dishka`` автоматически внедряет экземпляр "
|
||||||
|
"``DataBridge``."
|
||||||
|
msgstr ""
|
||||||
|
"When calling a handler, ``dishka`` automatically injects a ``DataBridge``"
|
||||||
|
" instance."
|
||||||
|
|
||||||
|
#: ../../root/api/bridge.rst:32
|
||||||
|
msgid ""
|
||||||
|
"Команда ``login --username <имя>`` вызывает ``login_handler``, который "
|
||||||
|
"через внедрённый ``data_bridge`` сохраняет токен."
|
||||||
|
msgstr ""
|
||||||
|
"The ``login --username <name>`` command calls ``login_handler``, which "
|
||||||
|
"saves the token through the injected ``data_bridge``."
|
||||||
|
|
||||||
|
#: ../../root/api/bridge.rst:33
|
||||||
|
msgid ""
|
||||||
|
"Команда ``get-profile`` вызывает ``get_profile_handler``, который так же "
|
||||||
|
"получает ``data_bridge`` и извлекает из него токен."
|
||||||
|
msgstr ""
|
||||||
|
"The ``get-profile`` command calls ``get_profile_handler``, which also "
|
||||||
|
"receives ``data_bridge`` and extracts the token from it."
|
||||||
|
|
||||||
|
#: ../../root/api/bridge.rst:42
|
||||||
|
msgid ""
|
||||||
|
"Инициализирует хранилище. При использовании через DI вызывается "
|
||||||
|
"автоматически."
|
||||||
|
msgstr ""
|
||||||
|
"Initializes the storage. When used through DI, it is called automatically."
|
||||||
|
|
||||||
|
#: ../../root/api/bridge.rst:46
|
||||||
|
msgid "Обновляет хранилище данными из словаря."
|
||||||
|
msgstr "Updates the storage with data from a dictionary."
|
||||||
|
|
||||||
|
#: ../../root/api/bridge.rst:50
|
||||||
|
msgid "Возвращает все данные из хранилища."
|
||||||
|
msgstr "Returns all data from the storage."
|
||||||
|
|
||||||
|
#: ../../root/api/bridge.rst:54
|
||||||
|
msgid "Возвращает значение по ключу или ``None``, если ключ не найден."
|
||||||
|
msgstr "Returns the value by key or ``None`` if the key is not found."
|
||||||
|
|
||||||
|
#: ../../root/api/bridge.rst:58
|
||||||
|
msgid "Удаляет значение по ключу. Вызывает ``KeyError``, если ключ не найден."
|
||||||
|
msgstr "Deletes the value by key. Raises ``KeyError`` if the key is not found."
|
||||||
|
|
||||||
|
#: ../../root/api/bridge.rst:62
|
||||||
|
msgid "Полностью очищает хранилище."
|
||||||
|
msgstr "Completely clears the storage."
|
||||||
|
|
||||||
@@ -0,0 +1,335 @@
|
|||||||
|
# SOME DESCRIPTIVE TITLE.
|
||||||
|
# Copyright (C) 2025, kolo
|
||||||
|
# This file is distributed under the same license as the Argenta package.
|
||||||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, 2025.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Argenta \n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2025-12-02 22:27+0300\n"
|
||||||
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
|
"Language: en\n"
|
||||||
|
"Language-Team: en <LL@li.org>\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=utf-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Generated-By: Babel 2.17.0\n"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:4
|
||||||
|
msgid "Flag"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:6
|
||||||
|
msgid ""
|
||||||
|
"``Flag`` — это сущность, описывающая флаг команды. Её основная задача — "
|
||||||
|
"определить параметры флага, включая его имя, префикс и правила валидации."
|
||||||
|
msgstr ""
|
||||||
|
"``Flag`` is an entity describing a command flag. Its main purpose is to define "
|
||||||
|
"flag parameters, including its name, prefix, and validation rules."
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:10
|
||||||
|
msgid ""
|
||||||
|
"Документация по :ref:`PossibleValues <root_api_command_possible_values>` "
|
||||||
|
"— перечисление, определяющее типы допустимых значений."
|
||||||
|
msgstr ""
|
||||||
|
"Documentation for :ref:`PossibleValues <root_api_command_possible_values>` "
|
||||||
|
"— an enumeration defining types of allowed values."
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:12
|
||||||
|
msgid ""
|
||||||
|
"Документация по :ref:`InputFlag <root_api_command_input_flag>` — объект "
|
||||||
|
"обработанного флага, введённого пользователем."
|
||||||
|
msgstr ""
|
||||||
|
"Documentation for :ref:`InputFlag <root_api_command_input_flag>` — an object "
|
||||||
|
"representing a processed flag entered by the user."
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:14
|
||||||
|
msgid ""
|
||||||
|
":ref:`Общая информация <root_flags>` о флагах и их использовании в "
|
||||||
|
"``Argenta``"
|
||||||
|
msgstr ":ref:`General information <root_flags>` about flags and their usage in ``Argenta``"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:19
|
||||||
|
msgid "Инициализация"
|
||||||
|
msgstr "Initialization"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:30
|
||||||
|
msgid "Создаёт новый флаг для регистрации в команде."
|
||||||
|
msgstr "Creates a new flag for registration in a command."
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:32
|
||||||
|
msgid "``name``: Имя флага (обязательный параметр)."
|
||||||
|
msgstr "``name``: Flag name (required parameter)."
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:33
|
||||||
|
msgid "``prefix``: Префикс флага (``-``, ``--``, ``---``). По умолчанию ``--``."
|
||||||
|
msgstr "``prefix``: Flag prefix (``-``, ``--``, ``---``). Defaults to ``--``."
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:34
|
||||||
|
msgid ""
|
||||||
|
"``possible_values``: Правила валидации значения. Может быть списком "
|
||||||
|
"строк, регулярным выражением или значением из ``PossibleValues``. По "
|
||||||
|
"умолчанию ``PossibleValues.ALL``, то есть любое значение допустимо."
|
||||||
|
msgstr ""
|
||||||
|
"``possible_values``: Value validation rules. Can be a list of strings, a regular "
|
||||||
|
"expression, or a value from ``PossibleValues``. Defaults to ``PossibleValues.ALL``, "
|
||||||
|
"meaning any value is allowed."
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:36
|
||||||
|
msgid "**Атрибуты:**"
|
||||||
|
msgstr "**Attributes:**"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:40
|
||||||
|
msgid "Имя флага в виде строки."
|
||||||
|
msgstr "Flag name as a string."
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:44
|
||||||
|
msgid "Префикс флага. Один из: ``\"-\"``, ``\"--\"``, ``\"---\"``."
|
||||||
|
msgstr "Flag prefix. One of: ``\"-\"``, ``\"--\"``, ``\"---\"``."
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:48
|
||||||
|
msgid "Допустимые значения для флага."
|
||||||
|
msgstr "Allowed values for the flag."
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:50 ../../root/api/command/flag.rst:93
|
||||||
|
#: ../../root/api/command/flag.rst:113 ../../root/api/command/flag.rst:136
|
||||||
|
#: ../../root/api/command/flag.rst:253
|
||||||
|
msgid "**Пример использования:**"
|
||||||
|
msgstr "**Usage example:**"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:59
|
||||||
|
msgid "Свойства"
|
||||||
|
msgstr "Properties"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:62
|
||||||
|
msgid "string_entity"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:70
|
||||||
|
msgid "Возвращает строковое представление флага в формате ``prefix + name``."
|
||||||
|
msgstr "Returns the string representation of the flag in the format ``prefix + name``."
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst
|
||||||
|
msgid "return"
|
||||||
|
msgstr "return"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:72 ../../root/api/command/flag.rst:91
|
||||||
|
msgid "Строковое представление флага"
|
||||||
|
msgstr "String representation of the flag"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:74
|
||||||
|
msgid ""
|
||||||
|
"Это свойство объединяет префикс и имя в единую строку, которая "
|
||||||
|
"представляет флаг так, как он выглядел бы в командной строке."
|
||||||
|
msgstr ""
|
||||||
|
"This property combines the prefix and name into a single string that represents "
|
||||||
|
"the flag as it would appear on the command line."
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:79
|
||||||
|
msgid "Магические методы"
|
||||||
|
msgstr "Magic Methods"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:82
|
||||||
|
msgid "__str__"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:89
|
||||||
|
msgid "Возвращает строковое представление флага (аналогично ``string_entity``)."
|
||||||
|
msgstr "Returns the string representation of the flag (similar to ``string_entity``)."
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:102
|
||||||
|
msgid "__repr__"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:109
|
||||||
|
msgid "Возвращает отладочное представление объекта."
|
||||||
|
msgstr "Returns the debug representation of the object."
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:111
|
||||||
|
msgid "Строка в формате ``Flag<prefix=..., name=...>``."
|
||||||
|
msgstr "String in the format ``Flag<prefix=..., name=...>``."
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:122
|
||||||
|
msgid "__eq__"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:129
|
||||||
|
msgid ""
|
||||||
|
"Сравнивает два флага на равенство по их строковому представлению "
|
||||||
|
"(``string_entity``)."
|
||||||
|
msgstr ""
|
||||||
|
"Compares two flags for equality based on their string representation (``string_entity``)."
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst
|
||||||
|
msgid "param other"
|
||||||
|
msgstr "param other"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:131
|
||||||
|
msgid "Объект для сравнения"
|
||||||
|
msgstr "Object to compare"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:132
|
||||||
|
msgid "**True**, если флаги равны, иначе **False**"
|
||||||
|
msgstr "**True** if flags are equal, otherwise **False**"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:134
|
||||||
|
msgid "Два флага считаются равными, если их ``string_entity`` идентичны."
|
||||||
|
msgstr "Two flags are considered equal if their ``string_entity`` are identical."
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:147
|
||||||
|
msgid "PredefinedFlags"
|
||||||
|
msgstr "PredefinedFlags"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:149
|
||||||
|
msgid "``argenta.command.PredefinedFlags``"
|
||||||
|
msgstr "``argenta.command.PredefinedFlags``"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:151
|
||||||
|
msgid ""
|
||||||
|
"Класс ``PredefinedFlags`` предоставляет набор готовых флагов для "
|
||||||
|
"использования в приложениях без их ручного создания. Эти флаги покрывают "
|
||||||
|
"распространённые сценарии."
|
||||||
|
msgstr ""
|
||||||
|
"The ``PredefinedFlags`` class provides a set of ready-made flags for use in "
|
||||||
|
"applications without manual creation. These flags cover common scenarios."
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:153
|
||||||
|
msgid ""
|
||||||
|
"Все предопределённые флаги являются атрибутами класса и представляют "
|
||||||
|
"собой готовые экземпляры ``Flag``."
|
||||||
|
msgstr ""
|
||||||
|
"All predefined flags are class attributes and represent ready-made ``Flag`` instances."
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:158
|
||||||
|
msgid "Информационные флаги"
|
||||||
|
msgstr "Informational Flags"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:163
|
||||||
|
msgid "Флаг для отображения справки: ``--help``"
|
||||||
|
msgstr "Flag for displaying help: ``--help``"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:165
|
||||||
|
msgid "``name``: ``\"help\"``"
|
||||||
|
msgstr "``name``: ``\"help\"``"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:166 ../../root/api/command/flag.rst:182
|
||||||
|
#: ../../root/api/command/flag.rst:224 ../../root/api/command/flag.rst:240
|
||||||
|
msgid "``prefix``: ``\"--\"`` (по умолчанию)"
|
||||||
|
msgstr "``prefix``: ``\"--\"`` (default)"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:167 ../../root/api/command/flag.rst:175
|
||||||
|
#: ../../root/api/command/flag.rst:183 ../../root/api/command/flag.rst:191
|
||||||
|
#: ../../root/api/command/flag.rst:204 ../../root/api/command/flag.rst:212
|
||||||
|
msgid "``possible_values``: ``PossibleValues.NEITHER``"
|
||||||
|
msgstr "``possible_values``: ``PossibleValues.NEITHER``"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:171
|
||||||
|
msgid "Короткая версия флага справки: ``-H``"
|
||||||
|
msgstr "Short version of the help flag: ``-H``"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:173
|
||||||
|
#: ../../root/api/command/flag.rst:231
|
||||||
|
msgid "``name``: ``\"H\"``"
|
||||||
|
msgstr "``name``: ``\"H\"``"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:174
|
||||||
|
#: ../../root/api/command/flag.rst:190
|
||||||
|
#: ../../root/api/command/flag.rst:211
|
||||||
|
#: ../../root/api/command/flag.rst:232
|
||||||
|
#: ../../root/api/command/flag.rst:248
|
||||||
|
msgid "``prefix``: ``\"-\"``"
|
||||||
|
msgstr "``prefix``: ``\"-\"``"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:179
|
||||||
|
msgid "Флаг для отображения информации: ``--info``"
|
||||||
|
msgstr "Flag for displaying information: ``--info``"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:181
|
||||||
|
msgid "``name``: ``\"info\"``"
|
||||||
|
msgstr "``name``: ``\"info\"``"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:187
|
||||||
|
msgid "Короткая версия флага информации: ``-I``"
|
||||||
|
msgstr "Short version of the info flag: ``-I``"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:189
|
||||||
|
msgid "``name``: ``\"I\"``"
|
||||||
|
msgstr "``name``: ``\"I\"``"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:196
|
||||||
|
msgid "Флаги выбора"
|
||||||
|
msgstr "Selection Flags"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:200
|
||||||
|
msgid "Флаг для выбора всех элементов: ``--all``"
|
||||||
|
msgstr "Flag for selecting all items: ``--all``"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:202
|
||||||
|
msgid "``name``: ``\"all\"``"
|
||||||
|
msgstr "``name``: ``\"all\"``"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:203
|
||||||
|
msgid "``prefix``: ``\"--\"``"
|
||||||
|
msgstr "``prefix``: ``\"--\"``"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:208
|
||||||
|
msgid "Короткая версия флага выбора всех элементов: ``-A``"
|
||||||
|
msgstr "Short version of the select all flag: ``-A``"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:210
|
||||||
|
msgid "``name``: ``\"A\"``"
|
||||||
|
msgstr "``name``: ``\"A\"``"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:217
|
||||||
|
msgid "Сетевые флаги"
|
||||||
|
msgstr "Network Flags"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:221
|
||||||
|
msgid "Флаг для указания IP-адреса хоста: ``--host``"
|
||||||
|
msgstr "Flag for specifying host IP address: ``--host``"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:223
|
||||||
|
msgid "``name``: ``\"host\"``"
|
||||||
|
msgstr "``name``: ``\"host\"``"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:225 ../../root/api/command/flag.rst:233
|
||||||
|
#, python-brace-format
|
||||||
|
msgid ""
|
||||||
|
"``possible_values``: Регулярное выражение для валидации IPv4: "
|
||||||
|
"``r\"^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$\"``"
|
||||||
|
msgstr ""
|
||||||
|
"``possible_values``: Regular expression for IPv4 validation: "
|
||||||
|
"``r\"^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$\"``"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:229
|
||||||
|
msgid "Короткая версия флага хоста: ``-H``"
|
||||||
|
msgstr "Short version of the host flag: ``-H``"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:237
|
||||||
|
msgid "Флаг для указания порта: ``--port``"
|
||||||
|
msgstr "Flag for specifying port: ``--port``"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:239
|
||||||
|
msgid "``name``: ``\"port\"``"
|
||||||
|
msgstr "``name``: ``\"port\"``"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:241 ../../root/api/command/flag.rst:249
|
||||||
|
#, python-brace-format
|
||||||
|
msgid ""
|
||||||
|
"``possible_values``: Регулярное выражение для валидации порта: "
|
||||||
|
"``r\"^\\d{1,5}$\"``"
|
||||||
|
msgstr ""
|
||||||
|
"``possible_values``: Regular expression for port validation: "
|
||||||
|
"``r\"^\\d{1,5}$\"``"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:245
|
||||||
|
msgid "Короткая версия флага порта: ``-P``"
|
||||||
|
msgstr "Short version of the port flag: ``-P``"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flag.rst:247
|
||||||
|
msgid "``name``: ``\"P\"``"
|
||||||
|
msgstr "``name``: ``\"P\"``"
|
||||||
|
|
||||||
@@ -0,0 +1,172 @@
|
|||||||
|
# SOME DESCRIPTIVE TITLE.
|
||||||
|
# Copyright (C) 2025, kolo
|
||||||
|
# This file is distributed under the same license as the Argenta package.
|
||||||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, 2025.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Argenta \n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2025-12-02 22:27+0300\n"
|
||||||
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
|
"Language: en\n"
|
||||||
|
"Language-Team: en <LL@li.org>\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=utf-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Generated-By: Babel 2.17.0\n"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flags.rst:4
|
||||||
|
msgid "Flags"
|
||||||
|
msgstr "Flags"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flags.rst:6
|
||||||
|
msgid ""
|
||||||
|
"``Flags`` — это коллекция флагов команды. Её основная задача — "
|
||||||
|
"группировать и управлять набором флагов, зарегистрированных для "
|
||||||
|
"конкретной команды. ``Flags`` служит контейнером, который позволяет "
|
||||||
|
"удобно добавлять, извлекать, итерировать флаги и проверять их наличие."
|
||||||
|
msgstr ""
|
||||||
|
"``Flags`` is a collection of command flags. Its main purpose is to group and manage "
|
||||||
|
"the set of flags registered for a specific command. ``Flags`` serves as a container "
|
||||||
|
"that allows convenient addition, retrieval, iteration of flags, and checking their presence."
|
||||||
|
|
||||||
|
#: ../../root/api/command/flags.rst:10
|
||||||
|
msgid ""
|
||||||
|
"Документация по отдельным флагам (:ref:`Flag <root_api_command_flag>`, "
|
||||||
|
":ref:`InputFlag <root_api_command_input_flag>`)"
|
||||||
|
msgstr ""
|
||||||
|
"Documentation for individual flags (:ref:`Flag <root_api_command_flag>`, "
|
||||||
|
":ref:`InputFlag <root_api_command_input_flag>`)"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flags.rst:12
|
||||||
|
msgid ""
|
||||||
|
"Документация по :ref:`InputFlags <root_api_command_input_flags>` — "
|
||||||
|
"коллекция обработанных флагов, введённых пользователем."
|
||||||
|
msgstr ""
|
||||||
|
"Documentation for :ref:`InputFlags <root_api_command_input_flags>` — "
|
||||||
|
"a collection of processed flags entered by the user."
|
||||||
|
|
||||||
|
#: ../../root/api/command/flags.rst:14
|
||||||
|
msgid ""
|
||||||
|
":ref:`Общая информация <root_flags>` о флагах и их использовании в "
|
||||||
|
"приложении ``Argenta``"
|
||||||
|
msgstr ""
|
||||||
|
":ref:`General information <root_flags>` about flags and their usage in "
|
||||||
|
"the ``Argenta`` application"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flags.rst:19
|
||||||
|
msgid "Инициализация"
|
||||||
|
msgstr "Initialization"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flags.rst:26
|
||||||
|
msgid "Создаёт новую коллекцию флагов."
|
||||||
|
msgstr "Creates a new flag collection."
|
||||||
|
|
||||||
|
#: ../../root/api/command/flags.rst:28
|
||||||
|
msgid ""
|
||||||
|
"``flags``: Необязательный список флагов типа ``Flag`` для инициализации "
|
||||||
|
"коллекции. Если не указан, создаётся пустая коллекция."
|
||||||
|
msgstr ""
|
||||||
|
"``flags``: Optional list of flags of type ``Flag`` for initializing the collection. "
|
||||||
|
"If not specified, an empty collection is created."
|
||||||
|
|
||||||
|
#: ../../root/api/command/flags.rst:30
|
||||||
|
msgid "**Атрибуты:**"
|
||||||
|
msgstr "**Attributes:**"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flags.rst:35
|
||||||
|
msgid "Список всех зарегистрированных флагов типа ``Flag``."
|
||||||
|
msgstr "List of all registered flags of type ``Flag``."
|
||||||
|
|
||||||
|
#: ../../root/api/command/flags.rst:37 ../../root/api/command/flags.rst:63
|
||||||
|
#: ../../root/api/command/flags.rst:86 ../../root/api/command/flags.rst:109
|
||||||
|
msgid "**Пример использования:**"
|
||||||
|
msgstr "**Usage example:**"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flags.rst:46
|
||||||
|
msgid "Методы"
|
||||||
|
msgstr "Methods"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flags.rst:49
|
||||||
|
msgid "add_flag"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../root/api/command/flags.rst:56
|
||||||
|
msgid "Добавляет флаг в коллекцию."
|
||||||
|
msgstr "Adds a flag to the collection."
|
||||||
|
|
||||||
|
#: ../../root/api/command/flags.rst
|
||||||
|
msgid "param flag"
|
||||||
|
msgstr "param flag"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flags.rst:58
|
||||||
|
msgid "Флаг типа ``Flag`` для добавления."
|
||||||
|
msgstr "Flag of type ``Flag`` to add."
|
||||||
|
|
||||||
|
#: ../../root/api/command/flags.rst
|
||||||
|
msgid "return"
|
||||||
|
msgstr "return"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flags.rst:59 ../../root/api/command/flags.rst:82
|
||||||
|
msgid "None."
|
||||||
|
msgstr "None."
|
||||||
|
|
||||||
|
#: ../../root/api/command/flags.rst:61
|
||||||
|
msgid "Используется для динамического расширения набора флагов."
|
||||||
|
msgstr "Used for dynamically extending the set of flags."
|
||||||
|
|
||||||
|
#: ../../root/api/command/flags.rst:72
|
||||||
|
msgid "add_flags"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../root/api/command/flags.rst:79
|
||||||
|
msgid "Добавляет в коллекцию список флагов."
|
||||||
|
msgstr "Adds a list of flags to the collection."
|
||||||
|
|
||||||
|
#: ../../root/api/command/flags.rst
|
||||||
|
msgid "param flags"
|
||||||
|
msgstr "param flags"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flags.rst:81
|
||||||
|
msgid "Список флагов типа ``Flag`` для добавления."
|
||||||
|
msgstr "List of flags of type ``Flag`` to add."
|
||||||
|
|
||||||
|
#: ../../root/api/command/flags.rst:84
|
||||||
|
msgid ""
|
||||||
|
"Метод расширяет коллекцию, добавляя в неё все флаги из переданного "
|
||||||
|
"списка. Эффективен для пакетного добавления."
|
||||||
|
msgstr ""
|
||||||
|
"The method extends the collection by adding all flags from the provided list. "
|
||||||
|
"Efficient for batch addition."
|
||||||
|
|
||||||
|
#: ../../root/api/command/flags.rst:95
|
||||||
|
msgid "get_flag_by_name"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../root/api/command/flags.rst:102
|
||||||
|
msgid "Возвращает флаг по имени."
|
||||||
|
msgstr "Returns a flag by name."
|
||||||
|
|
||||||
|
#: ../../root/api/command/flags.rst
|
||||||
|
msgid "param name"
|
||||||
|
msgstr "param name"
|
||||||
|
|
||||||
|
#: ../../root/api/command/flags.rst:104
|
||||||
|
msgid "Имя искомого флага."
|
||||||
|
msgstr "Name of the flag to search for."
|
||||||
|
|
||||||
|
#: ../../root/api/command/flags.rst:105
|
||||||
|
msgid "Объект ``Flag`` или ``None``, если флаг не найден."
|
||||||
|
msgstr "``Flag`` object or ``None`` if the flag is not found."
|
||||||
|
|
||||||
|
#: ../../root/api/command/flags.rst:107
|
||||||
|
msgid ""
|
||||||
|
"Метод возвращает флаг с соответствующим именем. Если флаг не найден, "
|
||||||
|
"возвращается ``None``."
|
||||||
|
msgstr ""
|
||||||
|
"The method returns a flag with the corresponding name. If the flag is not found, "
|
||||||
|
"``None`` is returned."
|
||||||
|
|
||||||
@@ -0,0 +1,196 @@
|
|||||||
|
# SOME DESCRIPTIVE TITLE.
|
||||||
|
# Copyright (C) 2025, kolo
|
||||||
|
# This file is distributed under the same license as the Argenta package.
|
||||||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, 2025.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Argenta \n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2025-12-08 19:48+0300\n"
|
||||||
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
|
"Language: en\n"
|
||||||
|
"Language-Team: en <LL@li.org>\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=utf-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Generated-By: Babel 2.17.0\n"
|
||||||
|
|
||||||
|
#: ../../root/api/command/index.rst:4
|
||||||
|
msgid "Command"
|
||||||
|
msgstr "Command"
|
||||||
|
|
||||||
|
#: ../../root/api/command/index.rst:6
|
||||||
|
msgid ""
|
||||||
|
"``Command`` — это основная единица функциональности в приложении. Каждая "
|
||||||
|
"команда связывает хэндлер с триггером, введя который он будет вызван для "
|
||||||
|
"обработки."
|
||||||
|
msgstr ""
|
||||||
|
"``Command`` is the basic unit of functionality in an application. Each "
|
||||||
|
"command links a handler to a trigger, which when entered will invoke it "
|
||||||
|
"for processing."
|
||||||
|
|
||||||
|
#: ../../root/api/command/index.rst:8
|
||||||
|
msgid ""
|
||||||
|
"``Command`` инкапсулирует всю информацию о команде: её триггер (ключевое "
|
||||||
|
"слово для вызова), описание, набор флагов и множество псевдонимов."
|
||||||
|
msgstr ""
|
||||||
|
"``Command`` encapsulates all information about a command: its trigger "
|
||||||
|
"(keyword for invocation), description, set of flags, and set of aliases."
|
||||||
|
|
||||||
|
#: ../../root/api/command/index.rst:13
|
||||||
|
msgid "Инициализация"
|
||||||
|
msgstr "Initialization"
|
||||||
|
|
||||||
|
#: ../../root/api/command/index.rst:23
|
||||||
|
msgid "Создаёт новую команду для регистрации в роутере."
|
||||||
|
msgstr "Creates a new command for registration in a router."
|
||||||
|
|
||||||
|
#: ../../root/api/command/index.rst:25
|
||||||
|
msgid ""
|
||||||
|
"``trigger``: Строковый триггер, который пользователь вводит для вызова "
|
||||||
|
"команды. Является основным идентификатором."
|
||||||
|
msgstr ""
|
||||||
|
"``trigger``: String trigger that the user enters to invoke the command. "
|
||||||
|
"Serves as the primary identifier."
|
||||||
|
|
||||||
|
#: ../../root/api/command/index.rst:26
|
||||||
|
msgid ""
|
||||||
|
"``description``: Необязательное описание, объясняющее назначение команды."
|
||||||
|
" Отображается в справке."
|
||||||
|
msgstr ""
|
||||||
|
"``description``: Optional description explaining the command's purpose. "
|
||||||
|
"Displayed in help."
|
||||||
|
|
||||||
|
#: ../../root/api/command/index.rst:27
|
||||||
|
msgid ""
|
||||||
|
"``flags``: Набор флагов для настройки поведения. Может быть одиночным "
|
||||||
|
"объектом ``Flag`` или коллекцией ``Flags``."
|
||||||
|
msgstr ""
|
||||||
|
"``flags``: Set of flags for configuring behavior. Can be a single "
|
||||||
|
"``Flag`` object or a ``Flags`` collection."
|
||||||
|
|
||||||
|
#: ../../root/api/command/index.rst:28
|
||||||
|
msgid "``aliases``: Множество строковых псевдонимов для основного триггера."
|
||||||
|
msgstr "``aliases``: Set of string aliases for the main trigger."
|
||||||
|
|
||||||
|
#: ../../root/api/command/index.rst:30 ../../root/api/command/index.rst:108
|
||||||
|
msgid "**Атрибуты:**"
|
||||||
|
msgstr "**Attributes:**"
|
||||||
|
|
||||||
|
#: ../../root/api/command/index.rst:34
|
||||||
|
msgid ""
|
||||||
|
"Основной триггер команды. Используется для её идентификации при обработке"
|
||||||
|
" пользовательского ввода."
|
||||||
|
msgstr ""
|
||||||
|
"The main command trigger. Used for its identification when processing "
|
||||||
|
"user input."
|
||||||
|
|
||||||
|
#: ../../root/api/command/index.rst:38
|
||||||
|
msgid ""
|
||||||
|
"Текстовое описание команды. Если не передано, используется значение по "
|
||||||
|
"умолчанию."
|
||||||
|
msgstr ""
|
||||||
|
"Text description of the command. If not provided, the default value is "
|
||||||
|
"used."
|
||||||
|
|
||||||
|
#: ../../root/api/command/index.rst:42
|
||||||
|
msgid ""
|
||||||
|
"Объект ``Flags``, содержащий все зарегистрированные флаги. Если был "
|
||||||
|
"передан ``Flag``, то автоматически конвертируется из одиночного в "
|
||||||
|
"коллекцию при инициализации."
|
||||||
|
msgstr ""
|
||||||
|
"A ``Flags`` object containing all registered flags. If a ``Flag`` was "
|
||||||
|
"passed, it is automatically converted from a single flag to a collection "
|
||||||
|
"during initialization."
|
||||||
|
|
||||||
|
#: ../../root/api/command/index.rst:46
|
||||||
|
msgid "Множество строковых псевдонимов. Пуст, если псевдонимы не заданы."
|
||||||
|
msgstr "Set of string aliases. Empty if no aliases are defined."
|
||||||
|
|
||||||
|
#: ../../root/api/command/index.rst:48
|
||||||
|
msgid "**Пример использования:**"
|
||||||
|
msgstr "**Usage example:**"
|
||||||
|
|
||||||
|
#: ../../root/api/command/index.rst:54
|
||||||
|
msgid ""
|
||||||
|
"Подробнее про флаги: :ref:`Flags <root_api_command_flags>` и :ref:`Флаги "
|
||||||
|
"команд <root_flags>`."
|
||||||
|
msgstr ""
|
||||||
|
"More about flags: :ref:`Flags <root_api_command_flags>` and :ref:`Command"
|
||||||
|
" flags <root_flags>`."
|
||||||
|
|
||||||
|
#: ../../root/api/command/index.rst:59
|
||||||
|
msgid "Регистрация команд"
|
||||||
|
msgstr "Command Registration"
|
||||||
|
|
||||||
|
#: ../../root/api/command/index.rst:61
|
||||||
|
msgid "Команды передаются в качестве аргумента в декоратор ``@router.command()``."
|
||||||
|
msgstr "Commands are passed as an argument to the ``@router.command()`` decorator."
|
||||||
|
|
||||||
|
#: ../../root/api/command/index.rst:63
|
||||||
|
msgid "**Базовый пример:**"
|
||||||
|
msgstr "**Basic example:**"
|
||||||
|
|
||||||
|
#: ../../root/api/command/index.rst:68
|
||||||
|
msgid "**Команды с флагами:**"
|
||||||
|
msgstr "**Commands with flags:**"
|
||||||
|
|
||||||
|
#: ../../root/api/command/index.rst:76
|
||||||
|
msgid "Работа с псевдонимами"
|
||||||
|
msgstr "Working with Aliases"
|
||||||
|
|
||||||
|
#: ../../root/api/command/index.rst:78
|
||||||
|
msgid ""
|
||||||
|
"Псевдонимы позволяют вызывать один и тот же обработчик разными "
|
||||||
|
"триггерами, сохраняя флаги и описание команды."
|
||||||
|
msgstr ""
|
||||||
|
"Aliases allow invoking the same handler with different triggers while "
|
||||||
|
"preserving the command's flags and description."
|
||||||
|
|
||||||
|
#: ../../root/api/command/index.rst:80
|
||||||
|
msgid "**Пример с псевдонимами:**"
|
||||||
|
msgstr "**Example with aliases:**"
|
||||||
|
|
||||||
|
#: ../../root/api/command/index.rst:85
|
||||||
|
msgid "Теперь пользователь может вызвать команду любым из способов:"
|
||||||
|
msgstr "Now the user can invoke the command in any of the following ways:"
|
||||||
|
|
||||||
|
#: ../../root/api/command/index.rst:94
|
||||||
|
msgid "Все эти варианты вызовут один и тот же хэндлер ``handle_shutdown``."
|
||||||
|
msgstr "All these variants will invoke the same handler ``handle_shutdown``."
|
||||||
|
|
||||||
|
#: ../../root/api/command/index.rst:101
|
||||||
|
msgid "InputCommand"
|
||||||
|
msgstr "InputCommand"
|
||||||
|
|
||||||
|
#: ../../root/api/command/index.rst:103
|
||||||
|
msgid ""
|
||||||
|
"``InputCommand`` представляет собой обработанную команду, введённую "
|
||||||
|
"пользователем. Этот внутренний класс создаётся автоматически при "
|
||||||
|
"обработке пользовательского ввода. Прямая работа с ним возможна при "
|
||||||
|
"создании пользовательского обработчика для неизвестных команд."
|
||||||
|
msgstr ""
|
||||||
|
"``InputCommand`` represents a processed command entered by the user. This"
|
||||||
|
" internal class is created automatically when processing user input. "
|
||||||
|
"Direct work with it is possible when creating a custom handler for "
|
||||||
|
"unknown commands."
|
||||||
|
|
||||||
|
#: ../../root/api/command/index.rst:106
|
||||||
|
msgid ""
|
||||||
|
"Подробнее о пользовательских обработчиках исключений см. :ref:`здесь "
|
||||||
|
"<root_error_handling_unknown_command>`."
|
||||||
|
msgstr ""
|
||||||
|
"For more details on custom exception handlers, see :ref:`here "
|
||||||
|
"<root_error_handling_unknown_command>`."
|
||||||
|
|
||||||
|
#: ../../root/api/command/index.rst:113
|
||||||
|
msgid "Строковый триггер, введённый пользователем."
|
||||||
|
msgstr "String trigger entered by the user."
|
||||||
|
|
||||||
|
#: ../../root/api/command/index.rst:118
|
||||||
|
msgid "Объект ``InputFlags``, содержащий все введённые и распаршенные флаги."
|
||||||
|
msgstr "An ``InputFlags`` object containing all entered and parsed flags."
|
||||||
|
|
||||||
@@ -0,0 +1,171 @@
|
|||||||
|
# SOME DESCRIPTIVE TITLE.
|
||||||
|
# Copyright (C) 2025, kolo
|
||||||
|
# This file is distributed under the same license as the Argenta package.
|
||||||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, 2025.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Argenta \n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2025-12-04 20:39+0300\n"
|
||||||
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
|
"Language: en\n"
|
||||||
|
"Language-Team: en <LL@li.org>\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=utf-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Generated-By: Babel 2.17.0\n"
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flag.rst:4
|
||||||
|
msgid "InputFlag"
|
||||||
|
msgstr "InputFlag"
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flag.rst:6
|
||||||
|
msgid ""
|
||||||
|
"Объект ``InputFlag`` представляет собой флаг, введённый пользователем. Он"
|
||||||
|
" создаётся в результате обработки пользовательского ввода и содержит "
|
||||||
|
"информацию о распознанном флаге: его имя, префикс, значение и статус "
|
||||||
|
"валидации."
|
||||||
|
msgstr ""
|
||||||
|
"The ``InputFlag`` object represents a flag entered by the user. It is "
|
||||||
|
"created as a result of processing user input and contains information "
|
||||||
|
"about the recognized flag: its name, prefix, value, and validation "
|
||||||
|
"status."
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flag.rst:10
|
||||||
|
msgid ""
|
||||||
|
"Документация по :ref:`Flag <root_api_command_flag>` — класс для "
|
||||||
|
"регистрации флага."
|
||||||
|
msgstr ""
|
||||||
|
"Documentation for :ref:`Flag <root_api_command_flag>` — class for "
|
||||||
|
"registering a flag."
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flag.rst:12
|
||||||
|
msgid ""
|
||||||
|
"Документация по :ref:`ValidationStatus "
|
||||||
|
"<root_api_command_validation_status>` — статусы валидации флагов."
|
||||||
|
msgstr ""
|
||||||
|
"Documentation for :ref:`ValidationStatus "
|
||||||
|
"<root_api_command_validation_status>` — flag validation statuses."
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flag.rst:17
|
||||||
|
msgid ""
|
||||||
|
"Экземпляры этого класса не предназначены для прямого создания. Они "
|
||||||
|
"содержатся в объекте :ref:`Response <root_api_response>`."
|
||||||
|
msgstr ""
|
||||||
|
"Instances of this class are not intended for direct creation. They are "
|
||||||
|
"contained in the :ref:`Response <root_api_response>` object."
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flag.rst:19
|
||||||
|
msgid "**Атрибуты:**"
|
||||||
|
msgstr "**Attributes:**"
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flag.rst:24
|
||||||
|
msgid "Имя введённого флага."
|
||||||
|
msgstr "Name of the entered flag."
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flag.rst:29
|
||||||
|
msgid "Префикс флага: ``-``, ``--`` или ``---``."
|
||||||
|
msgstr "Flag prefix: ``-``, ``--``, or ``---``."
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flag.rst:33
|
||||||
|
msgid ""
|
||||||
|
"Значение, переданное с флагом. Может быть ``''`` (пустой строкой) для "
|
||||||
|
"флагов без значений."
|
||||||
|
msgstr ""
|
||||||
|
"Value passed with the flag. Can be ``''`` (empty string) for flags "
|
||||||
|
"without values."
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flag.rst:38
|
||||||
|
msgid ""
|
||||||
|
"Статус валидации флага: ``ValidationStatus.VALID``, "
|
||||||
|
"``ValidationStatus.INVALID`` или ``ValidationStatus.UNDEFINED``."
|
||||||
|
msgstr ""
|
||||||
|
"Flag validation status: ``ValidationStatus.VALID``, "
|
||||||
|
"``ValidationStatus.INVALID``, or ``ValidationStatus.UNDEFINED``."
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flag.rst:43
|
||||||
|
msgid "Свойства"
|
||||||
|
msgstr "Properties"
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flag.rst:46
|
||||||
|
msgid "string_entity"
|
||||||
|
msgstr "string_entity"
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flag.rst:54
|
||||||
|
msgid "Возвращает строковое представление флага в формате ``prefix + name``."
|
||||||
|
msgstr ""
|
||||||
|
"Returns the string representation of the flag in the format ``prefix + "
|
||||||
|
"name``."
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flag.rst
|
||||||
|
msgid "return"
|
||||||
|
msgstr "return"
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flag.rst:56
|
||||||
|
msgid "Строковое представление флага"
|
||||||
|
msgstr "String representation of the flag"
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flag.rst:61
|
||||||
|
msgid "Магические методы"
|
||||||
|
msgstr "Magic Methods"
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flag.rst:64
|
||||||
|
msgid "__str__"
|
||||||
|
msgstr "__str__"
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flag.rst:71
|
||||||
|
msgid "Возвращает строковое представление флага вместе с его значением."
|
||||||
|
msgstr "Returns the string representation of the flag along with its value."
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flag.rst:73
|
||||||
|
msgid "Строка в формате ``флаг значение``."
|
||||||
|
msgstr "String in the format ``flag value``."
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flag.rst:75
|
||||||
|
#: ../../root/api/command/input_flag.rst:95
|
||||||
|
msgid "**Пример использования:**"
|
||||||
|
msgstr "**Usage example:**"
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flag.rst:84
|
||||||
|
msgid "__repr__"
|
||||||
|
msgstr "__repr__"
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flag.rst:91
|
||||||
|
msgid "Возвращает отладочное представление объекта."
|
||||||
|
msgstr "Returns the debug representation of the object."
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flag.rst:93
|
||||||
|
msgid ""
|
||||||
|
"Строка в формате ``InputFlag<prefix=..., name=..., value=..., "
|
||||||
|
"status=...>``."
|
||||||
|
msgstr ""
|
||||||
|
"String in the format ``InputFlag<prefix=..., name=..., value=..., "
|
||||||
|
"status=...>``."
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flag.rst:104
|
||||||
|
msgid "__eq__"
|
||||||
|
msgstr "__eq__"
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flag.rst:111
|
||||||
|
msgid "Сравнивает два введённых флага на равенство по имени."
|
||||||
|
msgstr "Compares two entered flags for equality by name."
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flag.rst
|
||||||
|
msgid "param other"
|
||||||
|
msgstr "param other"
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flag.rst:113
|
||||||
|
msgid "Объект для сравнения."
|
||||||
|
msgstr "Object to compare."
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flag.rst:114
|
||||||
|
msgid "**True**, если имена флагов совпадают, иначе **False**."
|
||||||
|
msgstr "**True** if flag names match, otherwise **False**."
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flag.rst:116
|
||||||
|
msgid "Два введённых флага считаются равными, если их имена совпадают."
|
||||||
|
msgstr "Two entered flags are considered equal if their names match."
|
||||||
|
|
||||||
@@ -0,0 +1,219 @@
|
|||||||
|
# SOME DESCRIPTIVE TITLE.
|
||||||
|
# Copyright (C) 2025, kolo
|
||||||
|
# This file is distributed under the same license as the Argenta package.
|
||||||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, 2025.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Argenta \n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2025-12-02 22:27+0300\n"
|
||||||
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
|
"Language: en\n"
|
||||||
|
"Language-Team: en <LL@li.org>\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=utf-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Generated-By: Babel 2.17.0\n"
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flags.rst:4
|
||||||
|
msgid "InputFlags"
|
||||||
|
msgstr "InputFlags"
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flags.rst:6
|
||||||
|
msgid ""
|
||||||
|
"``InputFlags`` — это коллекция флагов, введённых пользователем. Её "
|
||||||
|
"основная задача — группировать и управлять набором флагов, переданных "
|
||||||
|
"вместе с командой. ``InputFlags`` служит контейнером, который позволяет "
|
||||||
|
"удобно извлекать, итерировать и проверять наличие флагов, а также "
|
||||||
|
"работать с их значениями и статусами валидации."
|
||||||
|
msgstr ""
|
||||||
|
"``InputFlags`` is a collection of flags entered by the user. Its main purpose is to "
|
||||||
|
"group and manage the set of flags passed with a command. ``InputFlags`` serves as a "
|
||||||
|
"container that allows convenient retrieval, iteration, and checking of flag presence, "
|
||||||
|
"as well as working with their values and validation statuses."
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flags.rst:10
|
||||||
|
msgid ""
|
||||||
|
"Документация по отдельным флагам (:ref:`Flag <root_api_command_flag>`, "
|
||||||
|
":ref:`InputFlag <root_api_command_input_flag>`)"
|
||||||
|
msgstr ""
|
||||||
|
"Documentation for individual flags (:ref:`Flag <root_api_command_flag>`, "
|
||||||
|
":ref:`InputFlag <root_api_command_input_flag>`)"
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flags.rst:12
|
||||||
|
msgid ""
|
||||||
|
"Документация по :ref:`InputFlags <root_api_command_input_flags>` — "
|
||||||
|
"коллекция обработанных флагов, введённых пользователем."
|
||||||
|
msgstr ""
|
||||||
|
"Documentation for :ref:`InputFlags <root_api_command_input_flags>` — "
|
||||||
|
"a collection of processed flags entered by the user."
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flags.rst:14
|
||||||
|
msgid ""
|
||||||
|
"Документация по :ref:`Response <root_api_response>` — объект ответа, "
|
||||||
|
"содержащий ``InputFlags``"
|
||||||
|
msgstr ""
|
||||||
|
"Documentation for :ref:`Response <root_api_response>` — response object "
|
||||||
|
"containing ``InputFlags``"
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flags.rst:16
|
||||||
|
msgid ""
|
||||||
|
":ref:`Общая информация <root_flags>` о флагах и их использовании в "
|
||||||
|
"приложении ``Argenta``"
|
||||||
|
msgstr ""
|
||||||
|
":ref:`General information <root_flags>` about flags and their usage in "
|
||||||
|
"the ``Argenta`` application"
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flags.rst:21
|
||||||
|
msgid "Инициализация"
|
||||||
|
msgstr "Initialization"
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flags.rst:28
|
||||||
|
msgid "Создаёт новую коллекцию введённых флагов."
|
||||||
|
msgstr "Creates a new collection of entered flags."
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flags.rst:30
|
||||||
|
msgid ""
|
||||||
|
"``flags``: Необязательный список флагов типа ``InputFlag`` для "
|
||||||
|
"инициализации коллекции. Если не указан, создаётся пустая коллекция."
|
||||||
|
msgstr ""
|
||||||
|
"``flags``: Optional list of flags of type ``InputFlag`` for initializing the collection. "
|
||||||
|
"If not specified, an empty collection is created."
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flags.rst:33
|
||||||
|
msgid ""
|
||||||
|
"Экземпляры этого класса обычно не создаются напрямую. Они автоматически "
|
||||||
|
"формируются системой при обработке пользовательского ввода и доступны "
|
||||||
|
"через атрибут ``input_flags`` объекта ``Response``."
|
||||||
|
msgstr ""
|
||||||
|
"Instances of this class are usually not created directly. They are automatically "
|
||||||
|
"formed by the system when processing user input and are accessible through the "
|
||||||
|
"``input_flags`` attribute of the ``Response`` object."
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flags.rst:35
|
||||||
|
msgid "**Атрибуты:**"
|
||||||
|
msgstr "**Attributes:**"
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flags.rst:40
|
||||||
|
msgid ""
|
||||||
|
"Список всех введённых флагов типа ``InputFlag``. Пуст, если флаги не были"
|
||||||
|
" переданы при инициализации или пользователь не ввёл их с командой."
|
||||||
|
msgstr ""
|
||||||
|
"List of all entered flags of type ``InputFlag``. Empty if flags were not passed "
|
||||||
|
"during initialization or the user did not enter them with the command."
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flags.rst:42
|
||||||
|
#: ../../root/api/command/input_flags.rst:68
|
||||||
|
#: ../../root/api/command/input_flags.rst:94
|
||||||
|
#: ../../root/api/command/input_flags.rst:117
|
||||||
|
#: ../../root/api/command/input_flags.rst:131
|
||||||
|
msgid "**Пример использования:**"
|
||||||
|
msgstr "**Usage example:**"
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flags.rst:51
|
||||||
|
msgid "Методы"
|
||||||
|
msgstr "Methods"
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flags.rst:54
|
||||||
|
msgid "get_flag_by_name"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flags.rst:61
|
||||||
|
msgid "Возвращает флаг по имени."
|
||||||
|
msgstr "Returns a flag by name."
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flags.rst
|
||||||
|
msgid "param name"
|
||||||
|
msgstr "param name"
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flags.rst:63
|
||||||
|
msgid "Имя искомого флага (без префикса)."
|
||||||
|
msgstr "Name of the flag to search for (without prefix)."
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flags.rst
|
||||||
|
msgid "return"
|
||||||
|
msgstr "return"
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flags.rst:64
|
||||||
|
msgid "Объект ``InputFlag`` или ``None``, если флаг не найден."
|
||||||
|
msgstr "``InputFlag`` object or ``None`` if the flag is not found."
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flags.rst:66
|
||||||
|
msgid ""
|
||||||
|
"Метод возвращает первый флаг с соответствующим именем (без учёта "
|
||||||
|
"префикса)."
|
||||||
|
msgstr ""
|
||||||
|
"The method returns the first flag with the corresponding name (ignoring the prefix)."
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flags.rst:77
|
||||||
|
msgid "add_flag"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flags.rst:84
|
||||||
|
msgid "Добавляет введённый флаг в коллекцию."
|
||||||
|
msgstr "Adds an entered flag to the collection."
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flags.rst
|
||||||
|
msgid "param flag"
|
||||||
|
msgstr "param flag"
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flags.rst:86
|
||||||
|
msgid "Флаг типа ``InputFlag`` для добавления."
|
||||||
|
msgstr "Flag of type ``InputFlag`` to add."
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flags.rst:87
|
||||||
|
#: ../../root/api/command/input_flags.rst:113
|
||||||
|
msgid "None."
|
||||||
|
msgstr "None."
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flags.rst:89
|
||||||
|
msgid ""
|
||||||
|
"Метод добавляет флаг в конец списка ``flags``. Используется для "
|
||||||
|
"динамического расширения коллекции."
|
||||||
|
msgstr ""
|
||||||
|
"The method adds a flag to the end of the ``flags`` list. Used for dynamically extending the collection."
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flags.rst:92
|
||||||
|
msgid ""
|
||||||
|
"Этот метод используется редко, так как `InputFlags` обычно создаётся "
|
||||||
|
"автоматически. Однако он может быть полезен для тестирования или ручного "
|
||||||
|
"создания коллекций."
|
||||||
|
msgstr ""
|
||||||
|
"This method is rarely used, as `InputFlags` is usually created automatically. "
|
||||||
|
"However, it can be useful for testing or manual collection creation."
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flags.rst:103
|
||||||
|
msgid "add_flags"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flags.rst:110
|
||||||
|
msgid "Добавляет в коллекцию список введённых флагов."
|
||||||
|
msgstr "Adds a list of entered flags to the collection."
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flags.rst
|
||||||
|
msgid "param flags"
|
||||||
|
msgstr "param flags"
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flags.rst:112
|
||||||
|
msgid "Список флагов типа ``InputFlag`` для добавления."
|
||||||
|
msgstr "List of flags of type ``InputFlag`` to add."
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flags.rst:115
|
||||||
|
msgid ""
|
||||||
|
"Метод расширяет коллекцию, добавляя в неё все флаги из переданного "
|
||||||
|
"списка. Эффективен для пакетного добавления."
|
||||||
|
msgstr ""
|
||||||
|
"The method extends the collection by adding all flags from the provided list. "
|
||||||
|
"Efficient for batch addition."
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flags.rst:126
|
||||||
|
msgid "Практические примеры"
|
||||||
|
msgstr "Practical Examples"
|
||||||
|
|
||||||
|
#: ../../root/api/command/input_flags.rst:129
|
||||||
|
msgid "Обработка всех флагов с проверкой статусов"
|
||||||
|
msgstr "Processing All Flags with Status Checking"
|
||||||
|
|
||||||
@@ -0,0 +1,190 @@
|
|||||||
|
# SOME DESCRIPTIVE TITLE.
|
||||||
|
# Copyright (C) 2025, kolo
|
||||||
|
# This file is distributed under the same license as the Argenta package.
|
||||||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, 2025.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Argenta \n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2025-12-02 22:27+0300\n"
|
||||||
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
|
"Language: en\n"
|
||||||
|
"Language-Team: en <LL@li.org>\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=utf-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Generated-By: Babel 2.17.0\n"
|
||||||
|
|
||||||
|
#: ../../root/api/command/possible_values.rst:5
|
||||||
|
msgid "PossibleValues"
|
||||||
|
msgstr "PossibleValues"
|
||||||
|
|
||||||
|
#: ../../root/api/command/possible_values.rst:7
|
||||||
|
msgid ""
|
||||||
|
"``PossibleValues`` — это перечисление, которое определяет "
|
||||||
|
"специальные режимы валидации для значений флагов. ``PossibleValues`` "
|
||||||
|
"используется в параметре ``possible_values`` класса ``Flag``, чтобы "
|
||||||
|
"указать, может ли флаг принимать значения и какие ограничения на них "
|
||||||
|
"накладываются."
|
||||||
|
msgstr ""
|
||||||
|
"``PossibleValues`` is an enumeration that defines special validation "
|
||||||
|
"modes for flag values. ``PossibleValues`` is used in the ``possible_values`` parameter "
|
||||||
|
"of the ``Flag`` class to specify whether a flag can accept values and what restrictions "
|
||||||
|
"are imposed on them."
|
||||||
|
|
||||||
|
#: ../../root/api/command/possible_values.rst:9
|
||||||
|
msgid ""
|
||||||
|
"``PossibleValues`` содержит два основных значения: ``NEITHER`` (для "
|
||||||
|
"флагов, которые не могут принимать значения) и ``ALL`` (для флагов, "
|
||||||
|
"принимающих любые значения). Это перечисление используется вместе со "
|
||||||
|
"списками строк и регулярными выражениями для создания гибкой системы "
|
||||||
|
"валидации."
|
||||||
|
msgstr ""
|
||||||
|
"``PossibleValues`` contains two main values: ``NEITHER`` (for flags that cannot "
|
||||||
|
"accept values) and ``ALL`` (for flags accepting any values). This enumeration is "
|
||||||
|
"used together with string lists and regular expressions to create a flexible "
|
||||||
|
"validation system."
|
||||||
|
|
||||||
|
#: ../../root/api/command/possible_values.rst:12
|
||||||
|
msgid ""
|
||||||
|
"Результат валидации доступен через атрибут ``status`` у экземпляра "
|
||||||
|
"``InputFlag``. Подробнее см. :ref:`здесь <root_api_command_input_flag>`."
|
||||||
|
msgstr ""
|
||||||
|
"The validation result is available through the ``status`` attribute of the "
|
||||||
|
"``InputFlag`` instance. For more details, see :ref:`here <root_api_command_input_flag>`."
|
||||||
|
|
||||||
|
#: ../../root/api/command/possible_values.rst:16
|
||||||
|
msgid ""
|
||||||
|
"Документация по :ref:`Flag <root_api_command_flag>` — класс флага, "
|
||||||
|
"использующий ``PossibleValues``."
|
||||||
|
msgstr ""
|
||||||
|
"Documentation for :ref:`Flag <root_api_command_flag>` — flag class "
|
||||||
|
"using ``PossibleValues``."
|
||||||
|
|
||||||
|
#: ../../root/api/command/possible_values.rst:18
|
||||||
|
msgid ""
|
||||||
|
"Документация по :ref:`ValidationStatus "
|
||||||
|
"<root_api_command_validation_status>` — результат валидации ввёденного "
|
||||||
|
"флага."
|
||||||
|
msgstr ""
|
||||||
|
"Documentation for :ref:`ValidationStatus "
|
||||||
|
"<root_api_command_validation_status>` — validation result of the entered flag."
|
||||||
|
|
||||||
|
#: ../../root/api/command/possible_values.rst:20
|
||||||
|
msgid ""
|
||||||
|
":ref:`Общая информация <root_flags>` о флагах и их использовании в "
|
||||||
|
"приложении ``Argenta``"
|
||||||
|
msgstr ""
|
||||||
|
":ref:`General information <root_flags>` about flags and their usage in "
|
||||||
|
"the ``Argenta`` application"
|
||||||
|
|
||||||
|
#: ../../root/api/command/possible_values.rst:25
|
||||||
|
msgid "NEITHER"
|
||||||
|
msgstr "NEITHER"
|
||||||
|
|
||||||
|
#: ../../root/api/command/possible_values.rst:32
|
||||||
|
msgid "Указывает, что флаг **не должен** иметь значения."
|
||||||
|
msgstr "Indicates that the flag **should not** have a value."
|
||||||
|
|
||||||
|
#: ../../root/api/command/possible_values.rst:34
|
||||||
|
msgid ""
|
||||||
|
"Флаги с этим значением работают как булевы переключатели: их наличие в "
|
||||||
|
"командной строке само по себе является информацией. Попытка передать "
|
||||||
|
"такому флагу значение приведёт к ошибке валидации."
|
||||||
|
msgstr ""
|
||||||
|
"Flags with this value work as boolean switches: their presence on the command line "
|
||||||
|
"is information in itself. Attempting to pass a value to such a flag will result in "
|
||||||
|
"a validation error."
|
||||||
|
|
||||||
|
#: ../../root/api/command/possible_values.rst:36
|
||||||
|
msgid "**Примеры флагов с** ``NEITHER``:"
|
||||||
|
msgstr "**Examples of flags with** ``NEITHER``:"
|
||||||
|
|
||||||
|
#: ../../root/api/command/possible_values.rst:38
|
||||||
|
msgid "``--help`` — флаг справки"
|
||||||
|
msgstr "``--help`` — help flag"
|
||||||
|
|
||||||
|
#: ../../root/api/command/possible_values.rst:39
|
||||||
|
msgid "``--verbose`` — флаг подробного вывода"
|
||||||
|
msgstr "``--verbose`` — verbose output flag"
|
||||||
|
|
||||||
|
#: ../../root/api/command/possible_values.rst:40
|
||||||
|
msgid "``--force`` — флаг принудительного выполнения"
|
||||||
|
msgstr "``--force`` — forced execution flag"
|
||||||
|
|
||||||
|
#: ../../root/api/command/possible_values.rst:41
|
||||||
|
msgid "``-A`` / ``--all`` — флаг выбора всех элементов"
|
||||||
|
msgstr "``-A`` / ``--all`` — select all items flag"
|
||||||
|
|
||||||
|
#: ../../root/api/command/possible_values.rst:43
|
||||||
|
#: ../../root/api/command/possible_values.rst:68
|
||||||
|
msgid "**Пример использования:**"
|
||||||
|
msgstr "**Usage example:**"
|
||||||
|
|
||||||
|
#: ../../root/api/command/possible_values.rst:52
|
||||||
|
msgid "ALL"
|
||||||
|
msgstr "ALL"
|
||||||
|
|
||||||
|
#: ../../root/api/command/possible_values.rst:59
|
||||||
|
msgid "Указывает, что флаг может принимать **любое** значение."
|
||||||
|
msgstr "Indicates that the flag can accept **any** value."
|
||||||
|
|
||||||
|
#: ../../root/api/command/possible_values.rst:61
|
||||||
|
msgid ""
|
||||||
|
"Флаги с этим значением универсальны и не накладывают ограничений на "
|
||||||
|
"передаваемые данные. Валидация всегда будет успешной."
|
||||||
|
msgstr ""
|
||||||
|
"Flags with this value are universal and do not impose restrictions on the data passed. "
|
||||||
|
"Validation will always be successful."
|
||||||
|
|
||||||
|
#: ../../root/api/command/possible_values.rst:63
|
||||||
|
msgid "**Примеры флагов с** ``ALL``:"
|
||||||
|
msgstr "**Examples of flags with** ``ALL``:"
|
||||||
|
|
||||||
|
#: ../../root/api/command/possible_values.rst:65
|
||||||
|
msgid "``--message`` — произвольное текстовое сообщение"
|
||||||
|
msgstr "``--message`` — arbitrary text message"
|
||||||
|
|
||||||
|
#: ../../root/api/command/possible_values.rst:66
|
||||||
|
msgid "``--name`` — произвольное имя"
|
||||||
|
msgstr "``--name`` — arbitrary name"
|
||||||
|
|
||||||
|
#: ../../root/api/command/possible_values.rst:77
|
||||||
|
msgid "Параметр possible_values"
|
||||||
|
msgstr "The possible_values Parameter"
|
||||||
|
|
||||||
|
#: ../../root/api/command/possible_values.rst:79
|
||||||
|
msgid ""
|
||||||
|
"``PossibleValues`` используется как один из возможных типов для параметра"
|
||||||
|
" ``possible_values`` при создании экземпляра ``Flag``."
|
||||||
|
msgstr ""
|
||||||
|
"``PossibleValues`` is used as one of the possible types for the ``possible_values`` "
|
||||||
|
"parameter when creating a ``Flag`` instance."
|
||||||
|
|
||||||
|
#: ../../root/api/command/possible_values.rst:81
|
||||||
|
msgid "**Доступные типы для** ``possible_values``:"
|
||||||
|
msgstr "**Available types for** ``possible_values``:"
|
||||||
|
|
||||||
|
#: ../../root/api/command/possible_values.rst:83
|
||||||
|
msgid "``PossibleValues.NEITHER``: флаг без значения."
|
||||||
|
msgstr "``PossibleValues.NEITHER``: flag without a value."
|
||||||
|
|
||||||
|
#: ../../root/api/command/possible_values.rst:84
|
||||||
|
msgid "``PossibleValues.ALL``: флаг с любым значением (по умолчанию)."
|
||||||
|
msgstr "``PossibleValues.ALL``: flag with any value (default)."
|
||||||
|
|
||||||
|
#: ../../root/api/command/possible_values.rst:85
|
||||||
|
msgid "``list[str]``: флаг с ограниченным набором значений."
|
||||||
|
msgstr "``list[str]``: flag with a limited set of values."
|
||||||
|
|
||||||
|
#: ../../root/api/command/possible_values.rst:86
|
||||||
|
msgid "``Pattern[str]``: флаг со значением, проверяемым по регулярному выражению."
|
||||||
|
msgstr "``Pattern[str]``: flag with a value validated by a regular expression."
|
||||||
|
|
||||||
|
#: ../../root/api/command/possible_values.rst:88
|
||||||
|
msgid "**Пример комбинированного использования:**"
|
||||||
|
msgstr "**Combined usage example:**"
|
||||||
|
|
||||||
@@ -0,0 +1,165 @@
|
|||||||
|
# SOME DESCRIPTIVE TITLE.
|
||||||
|
# Copyright (C) 2025, kolo
|
||||||
|
# This file is distributed under the same license as the Argenta package.
|
||||||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, 2025.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Argenta \n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2025-12-02 22:27+0300\n"
|
||||||
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
|
"Language: en\n"
|
||||||
|
"Language-Team: en <LL@li.org>\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=utf-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Generated-By: Babel 2.17.0\n"
|
||||||
|
|
||||||
|
#: ../../root/api/command/validation_status.rst:4
|
||||||
|
msgid "ValidationStatus"
|
||||||
|
msgstr "ValidationStatus"
|
||||||
|
|
||||||
|
#: ../../root/api/command/validation_status.rst:6
|
||||||
|
msgid ""
|
||||||
|
"``ValidationStatus`` — это перечисление, которое определяет состояние "
|
||||||
|
"валидации флага. Его задача — предоставить стандартные константы для "
|
||||||
|
"отображения результата проверки. ``ValidationStatus`` используется в "
|
||||||
|
"атрибуте ``status`` класса ``InputFlag``."
|
||||||
|
msgstr ""
|
||||||
|
"``ValidationStatus`` is an enumeration that defines the validation state of a flag. "
|
||||||
|
"Its purpose is to provide standard constants for displaying the validation result. "
|
||||||
|
"``ValidationStatus`` is used in the ``status`` attribute of the ``InputFlag`` class."
|
||||||
|
|
||||||
|
#: ../../root/api/command/validation_status.rst:8
|
||||||
|
msgid ""
|
||||||
|
"``ValidationStatus`` содержит три значения: **VALID** (корректный флаг), "
|
||||||
|
"**INVALID** (некорректный) и **UNDEFINED** (незарегистрированный)."
|
||||||
|
msgstr ""
|
||||||
|
"``ValidationStatus`` contains three values: **VALID** (valid flag), "
|
||||||
|
"**INVALID** (invalid), and **UNDEFINED** (unregistered)."
|
||||||
|
|
||||||
|
#: ../../root/api/command/validation_status.rst:12
|
||||||
|
msgid ""
|
||||||
|
"Статус валидации устанавливается автоматически при создании экземпляра "
|
||||||
|
"``InputFlag`` на основе правил, заданных в соответствующем ``Flag``."
|
||||||
|
msgstr ""
|
||||||
|
"The validation status is set automatically when creating an ``InputFlag`` instance "
|
||||||
|
"based on the rules defined in the corresponding ``Flag``."
|
||||||
|
|
||||||
|
#: ../../root/api/command/validation_status.rst:16
|
||||||
|
msgid ""
|
||||||
|
"Документация по :ref:`InputFlag <root_api_command_input_flag>` — класс "
|
||||||
|
"введённого флага, использующий ``ValidationStatus``."
|
||||||
|
msgstr ""
|
||||||
|
"Documentation for :ref:`InputFlag <root_api_command_input_flag>` — entered flag class "
|
||||||
|
"using ``ValidationStatus``."
|
||||||
|
|
||||||
|
#: ../../root/api/command/validation_status.rst:18
|
||||||
|
msgid ""
|
||||||
|
"Документация по :ref:`Flag <root_api_command_flag>` — класс флага с "
|
||||||
|
"правилами валидации."
|
||||||
|
msgstr ""
|
||||||
|
"Documentation for :ref:`Flag <root_api_command_flag>` — flag class with "
|
||||||
|
"validation rules."
|
||||||
|
|
||||||
|
#: ../../root/api/command/validation_status.rst:20
|
||||||
|
msgid ""
|
||||||
|
"Документация по :ref:`PossibleValues <root_api_command_possible_values>` "
|
||||||
|
"— типы допустимых значений."
|
||||||
|
msgstr ""
|
||||||
|
"Documentation for :ref:`PossibleValues <root_api_command_possible_values>` "
|
||||||
|
"— types of allowed values."
|
||||||
|
|
||||||
|
#: ../../root/api/command/validation_status.rst:25
|
||||||
|
msgid "VALID"
|
||||||
|
msgstr "VALID"
|
||||||
|
|
||||||
|
#: ../../root/api/command/validation_status.rst:32
|
||||||
|
msgid "Указывает, что флаг и его значение **прошли** валидацию."
|
||||||
|
msgstr "Indicates that the flag and its value **passed** validation."
|
||||||
|
|
||||||
|
#: ../../root/api/command/validation_status.rst:34
|
||||||
|
msgid ""
|
||||||
|
"Флаги с этим статусом соответствуют правилам, заданным в "
|
||||||
|
"``possible_values`` соответствующего ``Flag``. Их можно безопасно "
|
||||||
|
"использовать в логике приложения без дополнительных проверок."
|
||||||
|
msgstr ""
|
||||||
|
"Flags with this status comply with the rules defined in the ``possible_values`` "
|
||||||
|
"of the corresponding ``Flag``. They can be safely used in application logic without "
|
||||||
|
"additional checks."
|
||||||
|
|
||||||
|
#: ../../root/api/command/validation_status.rst:36
|
||||||
|
msgid "**Условия получения статуса** ``VALID``:"
|
||||||
|
msgstr "**Conditions for receiving** ``VALID`` **status:**"
|
||||||
|
|
||||||
|
#: ../../root/api/command/validation_status.rst:38
|
||||||
|
msgid "Флаг с ``PossibleValues.NEITHER`` передан без значения."
|
||||||
|
msgstr "Flag with ``PossibleValues.NEITHER`` passed without a value."
|
||||||
|
|
||||||
|
#: ../../root/api/command/validation_status.rst:39
|
||||||
|
msgid "Флаг с ``PossibleValues.ALL`` передан с любым значением или без него."
|
||||||
|
msgstr "Flag with ``PossibleValues.ALL`` passed with any value or without one."
|
||||||
|
|
||||||
|
#: ../../root/api/command/validation_status.rst:40
|
||||||
|
msgid "Значение флага входит в список разрешённых."
|
||||||
|
msgstr "Flag value is in the list of allowed values."
|
||||||
|
|
||||||
|
#: ../../root/api/command/validation_status.rst:41
|
||||||
|
msgid "Значение флага соответствует регулярному выражению."
|
||||||
|
msgstr "Flag value matches the regular expression."
|
||||||
|
|
||||||
|
#: ../../root/api/command/validation_status.rst:46
|
||||||
|
msgid "INVALID"
|
||||||
|
msgstr "INVALID"
|
||||||
|
|
||||||
|
#: ../../root/api/command/validation_status.rst:53
|
||||||
|
msgid "Указывает, что флаг или его значение **не прошли** валидацию."
|
||||||
|
msgstr "Indicates that the flag or its value **did not pass** validation."
|
||||||
|
|
||||||
|
#: ../../root/api/command/validation_status.rst:55
|
||||||
|
msgid ""
|
||||||
|
"Флаги с этим статусом нарушают правила, заданные в ``possible_values`` "
|
||||||
|
"соответствующего ``Flag``. Их следует обрабатывать как ошибочные."
|
||||||
|
msgstr ""
|
||||||
|
"Flags with this status violate the rules defined in the ``possible_values`` "
|
||||||
|
"of the corresponding ``Flag``. They should be treated as erroneous."
|
||||||
|
|
||||||
|
#: ../../root/api/command/validation_status.rst:57
|
||||||
|
msgid "**Условия получения статуса** ``INVALID``:"
|
||||||
|
msgstr "**Conditions for receiving** ``INVALID`` **status:**"
|
||||||
|
|
||||||
|
#: ../../root/api/command/validation_status.rst:59
|
||||||
|
msgid "Флаг с ``PossibleValues.NEITHER`` передан со значением."
|
||||||
|
msgstr "Flag with ``PossibleValues.NEITHER`` passed with a value."
|
||||||
|
|
||||||
|
#: ../../root/api/command/validation_status.rst:60
|
||||||
|
msgid "Значение флага не входит в список разрешённых."
|
||||||
|
msgstr "Flag value is not in the list of allowed values."
|
||||||
|
|
||||||
|
#: ../../root/api/command/validation_status.rst:61
|
||||||
|
msgid "Значение флага не соответствует регулярному выражению."
|
||||||
|
msgstr "Flag value does not match the regular expression."
|
||||||
|
|
||||||
|
#: ../../root/api/command/validation_status.rst:62
|
||||||
|
msgid "Флаг требует значение, но передан без него."
|
||||||
|
msgstr "Flag requires a value but was passed without one."
|
||||||
|
|
||||||
|
#: ../../root/api/command/validation_status.rst:67
|
||||||
|
msgid "UNDEFINED"
|
||||||
|
msgstr "UNDEFINED"
|
||||||
|
|
||||||
|
#: ../../root/api/command/validation_status.rst:74
|
||||||
|
msgid "Указывает, что введённый флаг не был зарегистрирован в команде."
|
||||||
|
msgstr "Indicates that the entered flag was not registered in the command."
|
||||||
|
|
||||||
|
#: ../../root/api/command/validation_status.rst:76
|
||||||
|
msgid "**Условия получения статуса** ``UNDEFINED``:"
|
||||||
|
msgstr "**Conditions for receiving** ``UNDEFINED`` **status:**"
|
||||||
|
|
||||||
|
#: ../../root/api/command/validation_status.rst:78
|
||||||
|
msgid "Введённый флаг не найден среди зарегистрированных для данной команды."
|
||||||
|
msgstr "The entered flag is not found among those registered for this command."
|
||||||
|
|
||||||
@@ -0,0 +1,217 @@
|
|||||||
|
# SOME DESCRIPTIVE TITLE.
|
||||||
|
# Copyright (C) 2025, kolo
|
||||||
|
# This file is distributed under the same license as the Argenta package.
|
||||||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, 2025.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Argenta \n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2025-12-02 22:27+0300\n"
|
||||||
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
|
"Language: en\n"
|
||||||
|
"Language-Team: en <LL@li.org>\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=utf-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Generated-By: Babel 2.17.0\n"
|
||||||
|
|
||||||
|
#: ../../root/api/index.rst:5
|
||||||
|
msgid "Публичное API"
|
||||||
|
msgstr "Public API"
|
||||||
|
|
||||||
|
#: ../../root/api/index.rst:8
|
||||||
|
msgid "Описание раздела"
|
||||||
|
msgstr "Section Description"
|
||||||
|
|
||||||
|
#: ../../root/api/index.rst:10
|
||||||
|
msgid "В этом разделе описан публичный API библиотеки. Он включает:"
|
||||||
|
msgstr "This section describes the library's public API. It includes:"
|
||||||
|
|
||||||
|
#: ../../root/api/index.rst:12
|
||||||
|
msgid "Классы и функции для интеграции в ваши приложения."
|
||||||
|
msgstr "Classes and functions for integration into your applications."
|
||||||
|
|
||||||
|
#: ../../root/api/index.rst:13
|
||||||
|
msgid "Рекомендации по использованию и поддерживаемые сценарии."
|
||||||
|
msgstr "Usage recommendations and supported scenarios."
|
||||||
|
|
||||||
|
#: ../../root/api/index.rst:14
|
||||||
|
msgid "Примеры кода, подробные сигнатуры и описание возвращаемых значений."
|
||||||
|
msgstr "Code examples, detailed signatures, and descriptions of return values."
|
||||||
|
|
||||||
|
#: ../../root/api/index.rst:15
|
||||||
|
msgid "Гарантии стабильности и обратной совместимости."
|
||||||
|
msgstr "Stability and backward compatibility guarantees."
|
||||||
|
|
||||||
|
#: ../../root/api/index.rst:17
|
||||||
|
msgid ""
|
||||||
|
"Интерфейсы, не описанные в этом разделе, считаются внутренними. Их "
|
||||||
|
"использование может привести к ошибкам при обновлении библиотеки. При "
|
||||||
|
"разработке собственных решений используйте только компоненты, описанные "
|
||||||
|
"здесь. Это обеспечит стабильность и совместимость ваших продуктов с "
|
||||||
|
"будущими версиями ``Argenta``."
|
||||||
|
msgstr ""
|
||||||
|
"Interfaces not described in this section are considered internal. Using them may "
|
||||||
|
"lead to errors when updating the library. When developing your own solutions, use "
|
||||||
|
"only the components described here. This will ensure the stability and compatibility "
|
||||||
|
"of your products with future versions of ``Argenta``."
|
||||||
|
|
||||||
|
#: ../../root/api/index.rst:22
|
||||||
|
msgid "Публичные импорты"
|
||||||
|
msgstr "Public Imports"
|
||||||
|
|
||||||
|
#: ../../root/api/index.rst:24
|
||||||
|
msgid ""
|
||||||
|
"Все основные компоненты библиотеки доступны для прямого импорта из "
|
||||||
|
"корневого пакета ``argenta`` или его подмодулей."
|
||||||
|
msgstr ""
|
||||||
|
"All main library components are available for direct import from the root package "
|
||||||
|
"``argenta`` or its submodules."
|
||||||
|
|
||||||
|
#: ../../root/api/index.rst:27
|
||||||
|
msgid "Основные компоненты"
|
||||||
|
msgstr "Main Components"
|
||||||
|
|
||||||
|
#: ../../root/api/index.rst:32
|
||||||
|
msgid ""
|
||||||
|
":ref:`App <root_api_app_index>` — Объект приложения, который отвечает за "
|
||||||
|
"логику роутинга, настройки, валидации и т.д."
|
||||||
|
msgstr ""
|
||||||
|
":ref:`App <root_api_app_index>` — Application object responsible for routing logic, "
|
||||||
|
"settings, validation, etc."
|
||||||
|
|
||||||
|
#: ../../root/api/index.rst:33
|
||||||
|
msgid ""
|
||||||
|
":ref:`Orchestrator <root_api_orchestrator_index>` — Класс для "
|
||||||
|
"конфигурирования и запуска всего приложения."
|
||||||
|
msgstr ""
|
||||||
|
":ref:`Orchestrator <root_api_orchestrator_index>` — Class for configuring and "
|
||||||
|
"launching the entire application."
|
||||||
|
|
||||||
|
#: ../../root/api/index.rst:34
|
||||||
|
msgid ""
|
||||||
|
":ref:`Router <root_api_router>` — Класс для группировки и регистрации "
|
||||||
|
"команд."
|
||||||
|
msgstr ":ref:`Router <root_api_router>` — Class for grouping and registering commands."
|
||||||
|
|
||||||
|
#: ../../root/api/index.rst:35
|
||||||
|
msgid ""
|
||||||
|
":ref:`Command <root_api_command_index>` — Класс для создания команд при "
|
||||||
|
"инициализации хэндлеров."
|
||||||
|
msgstr ""
|
||||||
|
":ref:`Command <root_api_command_index>` — Class for creating commands when "
|
||||||
|
"initializing handlers."
|
||||||
|
|
||||||
|
#: ../../root/api/index.rst:36
|
||||||
|
msgid ""
|
||||||
|
":ref:`Response <root_api_response>` — Объект ответа, передаваемый в "
|
||||||
|
"обработчики."
|
||||||
|
msgstr ":ref:`Response <root_api_response>` — Response object passed to handlers."
|
||||||
|
|
||||||
|
#: ../../root/api/index.rst:39
|
||||||
|
msgid "Команды и флаги"
|
||||||
|
msgstr "Commands and Flags"
|
||||||
|
|
||||||
|
#: ../../root/api/index.rst:52
|
||||||
|
msgid ":ref:`Flag <root_api_command_flag>` — Класс для описания флага."
|
||||||
|
msgstr ":ref:`Flag <root_api_command_flag>` — Class for describing a flag."
|
||||||
|
|
||||||
|
#: ../../root/api/index.rst:53
|
||||||
|
msgid ":ref:`Flags <root_api_command_flags>` — Коллекция для регистрации флагов."
|
||||||
|
msgstr ":ref:`Flags <root_api_command_flags>` — Collection for registering flags."
|
||||||
|
|
||||||
|
#: ../../root/api/index.rst:54
|
||||||
|
msgid ""
|
||||||
|
":ref:`InputFlag <root_api_command_input_flag>` — Класс для введённого "
|
||||||
|
"пользователем флага."
|
||||||
|
msgstr ""
|
||||||
|
":ref:`InputFlag <root_api_command_input_flag>` — Class for a user-entered flag."
|
||||||
|
|
||||||
|
#: ../../root/api/index.rst:55
|
||||||
|
msgid ""
|
||||||
|
":ref:`InputFlags <root_api_command_input_flags>` — Коллекция введённых "
|
||||||
|
"флагов."
|
||||||
|
msgstr ":ref:`InputFlags <root_api_command_input_flags>` — Collection of entered flags."
|
||||||
|
|
||||||
|
#: ../../root/api/index.rst:56
|
||||||
|
msgid ""
|
||||||
|
":ref:`PossibleValues <root_api_command_possible_values>` — Правила "
|
||||||
|
"валидации значений флага."
|
||||||
|
msgstr ""
|
||||||
|
":ref:`PossibleValues <root_api_command_possible_values>` — Validation rules for "
|
||||||
|
"flag values."
|
||||||
|
|
||||||
|
#: ../../root/api/index.rst:57
|
||||||
|
msgid ""
|
||||||
|
":ref:`ValidationStatus <root_api_command_validation_status>` — Статусы "
|
||||||
|
"валидации флагов."
|
||||||
|
msgstr ""
|
||||||
|
":ref:`ValidationStatus <root_api_command_validation_status>` — Flag validation statuses."
|
||||||
|
|
||||||
|
#: ../../root/api/index.rst:58
|
||||||
|
msgid ""
|
||||||
|
":ref:`PredefinedFlags <root_api_command_flag_predefined_flags>` — "
|
||||||
|
"Коллекция предопределённых флагов."
|
||||||
|
msgstr ""
|
||||||
|
":ref:`PredefinedFlags <root_api_command_flag_predefined_flags>` — Collection of "
|
||||||
|
"predefined flags."
|
||||||
|
|
||||||
|
#: ../../root/api/index.rst:61
|
||||||
|
msgid "Настройка приложения"
|
||||||
|
msgstr "Application Configuration"
|
||||||
|
|
||||||
|
#: ../../root/api/index.rst:71
|
||||||
|
msgid ""
|
||||||
|
":ref:`AutoCompleter <root_api_app_autocompleter>` - Класс для настройки "
|
||||||
|
"автодополнения."
|
||||||
|
msgstr ""
|
||||||
|
":ref:`AutoCompleter <root_api_app_autocompleter>` - Class for configuring "
|
||||||
|
"autocompletion."
|
||||||
|
|
||||||
|
#: ../../root/api/index.rst:72
|
||||||
|
msgid ""
|
||||||
|
":ref:`StaticDividingLine <root_api_app_dividing_lines>` — Статическая "
|
||||||
|
"разделительная линия для оформления вывода."
|
||||||
|
msgstr ""
|
||||||
|
":ref:`StaticDividingLine <root_api_app_dividing_lines>` — Static dividing line for "
|
||||||
|
"output formatting."
|
||||||
|
|
||||||
|
#: ../../root/api/index.rst:73
|
||||||
|
#: ../../root/api/index.rst:73
|
||||||
|
msgid ""
|
||||||
|
":ref:`DynamicDividingLine <root_api_app_dividing_lines>` — Динамическая "
|
||||||
|
"разделительная линия для оформления вывода."
|
||||||
|
msgstr ""
|
||||||
|
":ref:`DynamicDividingLine <root_api_app_dividing_lines>` — Dynamic dividing line "
|
||||||
|
"for output formatting."
|
||||||
|
#: ../../root/api/index.rst:74
|
||||||
|
msgid ""
|
||||||
|
":ref:`PredefinedMessages <root_api_predefined_messages>` — Готовые "
|
||||||
|
"сообщения для вывода при старте приложения."
|
||||||
|
msgstr ""
|
||||||
|
":ref:`PredefinedMessages <root_api_predefined_messages>` — Ready-made messages for "
|
||||||
|
"output at application startup."
|
||||||
|
|
||||||
|
#: ../../root/api/index.rst:77
|
||||||
|
msgid "Внедрение зависимостей"
|
||||||
|
msgstr "Dependency Injection"
|
||||||
|
|
||||||
|
#: ../../root/api/index.rst:85
|
||||||
|
msgid ""
|
||||||
|
":ref:`FromDishka <root_dependency_injection>` — Маркер аргумента функции "
|
||||||
|
"как зависимости, которая должна быть инжектирована."
|
||||||
|
msgstr ""
|
||||||
|
":ref:`FromDishka <root_dependency_injection>` — Marker for a function argument as a "
|
||||||
|
"dependency that should be injected."
|
||||||
|
|
||||||
|
#: ../../root/api/index.rst:86
|
||||||
|
msgid ""
|
||||||
|
":ref:`inject <root_dependency_injection>` — Декоратор для инжектирования "
|
||||||
|
"зависимостей, указанных в сигнатуре."
|
||||||
|
msgstr ""
|
||||||
|
":ref:`inject <root_dependency_injection>` — Decorator for injecting dependencies "
|
||||||
|
"specified in the signature."
|
||||||
|
|
||||||
@@ -0,0 +1,164 @@
|
|||||||
|
# SOME DESCRIPTIVE TITLE.
|
||||||
|
# Copyright (C) 2025, kolo
|
||||||
|
# This file is distributed under the same license as the Argenta package.
|
||||||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, 2025.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Argenta \n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2026-02-06 23:44+0300\n"
|
||||||
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
|
"Language: en\n"
|
||||||
|
"Language-Team: en <LL@li.org>\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=utf-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Generated-By: Babel 2.17.0\n"
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/argparser.rst:4
|
||||||
|
msgid "ArgParser"
|
||||||
|
msgstr "ArgParser"
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/argparser.rst:6
|
||||||
|
msgid ""
|
||||||
|
"``ArgParser`` предназначен для обработки **аргументов командной строки**,"
|
||||||
|
" передаваемых приложению при запуске. Важно не путать их с флагами, "
|
||||||
|
"которые пользователь вводит в интерактивном режиме. ``ArgParser`` "
|
||||||
|
"позволяет получать внешнюю конфигурацию в момент старта (например, путь к"
|
||||||
|
" файлу настроек, флаги отладки или режим запуска)."
|
||||||
|
msgstr ""
|
||||||
|
"``ArgParser`` is designed for processing **command-line arguments** "
|
||||||
|
"passed to the application at startup. It's important not to confuse them "
|
||||||
|
"with flags that the user enters in interactive mode. ``ArgParser`` allows"
|
||||||
|
" receiving external configuration at startup (e.g., path to settings "
|
||||||
|
"file, debug flags, or launch mode)."
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/argparser.rst:11
|
||||||
|
msgid "Инициализация"
|
||||||
|
msgstr "Initialization"
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/argparser.rst:21
|
||||||
|
msgid "Создаёт экземпляр парсера аргументов командной строки."
|
||||||
|
msgstr "Creates an instance of the command-line argument parser."
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/argparser.rst:23
|
||||||
|
msgid ""
|
||||||
|
"``processed_args``: Список аргументов для обработки при запуске "
|
||||||
|
"приложения. Подробнее см. :ref:`здесь <root_api_orchestrator_arguments>`."
|
||||||
|
msgstr ""
|
||||||
|
"``processed_args``: List of arguments to process at application startup. "
|
||||||
|
"For more details, see :ref:`here <root_api_orchestrator_arguments>`."
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/argparser.rst:24
|
||||||
|
msgid "``name``: Имя приложения для отображения в справке."
|
||||||
|
msgstr "``name``: Application name for display in help."
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/argparser.rst:25
|
||||||
|
msgid "``description``: Описание приложения для отображения в справке."
|
||||||
|
msgstr "``description``: Application description for display in help."
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/argparser.rst:26
|
||||||
|
msgid "``epilog``: Дополнительная информация для отображения в конце справки."
|
||||||
|
msgstr "``epilog``: Additional information for display at the end of help."
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/argparser.rst:31
|
||||||
|
msgid "Атрибуты"
|
||||||
|
msgstr "Attributes"
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/argparser.rst:35
|
||||||
|
msgid ""
|
||||||
|
"Экземпляр ``ArgSpace``, содержащий все обработанные аргументы командной "
|
||||||
|
"строки. Подробнее см. :ref:`здесь <root_api_orchestrator_argspace>`."
|
||||||
|
msgstr ""
|
||||||
|
"``ArgSpace`` instance containing all processed command-line arguments. "
|
||||||
|
"For more details, see :ref:`here <root_api_orchestrator_argspace>`."
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/argparser.rst:38
|
||||||
|
msgid ""
|
||||||
|
"До инициализации ``Orchestrator``, в конструктор которого был передан "
|
||||||
|
"экземпляр ``ArgParser``, атрибут ``parsed_argspace`` будет содержать "
|
||||||
|
"пустой ``ArgSpace``."
|
||||||
|
msgstr ""
|
||||||
|
"Before initializing ``Orchestrator``, to whose constructor an "
|
||||||
|
"``ArgParser`` instance was passed, the ``parsed_argspace`` attribute will"
|
||||||
|
" contain an empty ``ArgSpace``."
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/argparser.rst:40
|
||||||
|
msgid ""
|
||||||
|
"Парсинг и валидация аргументов происходят при инициализации "
|
||||||
|
"``Orchestrator``, поэтому использовать ``parsed_argspace`` "
|
||||||
|
"**целесообразно только после** этого."
|
||||||
|
msgstr ""
|
||||||
|
"Parsing and validation of arguments occur during ``Orchestrator`` "
|
||||||
|
"initialization, so using ``parsed_argspace`` is **advisable only after** "
|
||||||
|
"that."
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/argparser.rst:45
|
||||||
|
msgid "Лучшие практики"
|
||||||
|
msgstr "Best Practices"
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/argparser.rst:47
|
||||||
|
msgid ""
|
||||||
|
"Использовать атрибут ``parsed_argspace`` рекомендуется только на этапе "
|
||||||
|
"настройки приложения. В обработчиках лучшей практикой является получение "
|
||||||
|
"``ArgSpace`` через DI. Подробнее см. :ref:`здесь "
|
||||||
|
"<root_dependency_injection>`."
|
||||||
|
msgstr ""
|
||||||
|
"Using the ``parsed_argspace`` attribute is recommended only during the "
|
||||||
|
"application setup phase. In handlers, the best practice is to obtain "
|
||||||
|
"``ArgSpace`` through DI. For more details, see :ref:`here "
|
||||||
|
"<root_dependency_injection>`."
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/argparser.rst:49
|
||||||
|
msgid "**Пример использования:**"
|
||||||
|
msgstr "**Usage example:**"
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/argparser.rst:56
|
||||||
|
msgid "Обработка ошибок"
|
||||||
|
msgstr "Error Handling"
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/argparser.rst:59
|
||||||
|
msgid ""
|
||||||
|
"Про типы аргументов подробнее в :ref:`Arguments "
|
||||||
|
"<root_api_orchestrator_arguments>`"
|
||||||
|
msgstr ""
|
||||||
|
"For more details on argument types, see :ref:`Arguments "
|
||||||
|
"<root_api_orchestrator_arguments>`"
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/argparser.rst:61
|
||||||
|
msgid ""
|
||||||
|
"При работе с аргументами командной строки стандартный ``ArgumentParser`` "
|
||||||
|
"автоматически обрабатывает следующие ситуации:"
|
||||||
|
msgstr ""
|
||||||
|
"When working with command-line arguments, the standard ``ArgumentParser``"
|
||||||
|
" automatically handles the following situations:"
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/argparser.rst:63
|
||||||
|
msgid "**Отсутствие обязательного аргумента:**"
|
||||||
|
msgstr "**Missing required argument:**"
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/argparser.rst:71
|
||||||
|
msgid "**Недопустимое значение из списка possible_values:**"
|
||||||
|
msgstr "**Invalid value from possible_values list:**"
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/argparser.rst:79
|
||||||
|
msgid "**Использование устаревшего аргумента:**"
|
||||||
|
msgstr "**Using a deprecated argument:**"
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/argparser.rst:81
|
||||||
|
msgid ""
|
||||||
|
"При использовании аргумента с ``is_deprecated=True`` выводится "
|
||||||
|
"предупреждение, но выполнение продолжается:"
|
||||||
|
msgstr ""
|
||||||
|
"When using an argument with ``is_deprecated=True``, a warning is "
|
||||||
|
"displayed, but execution continues:"
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/argparser.rst:90
|
||||||
|
msgid ""
|
||||||
|
"Параметр поддерживается начиная с версии CPython 3.13, если версия ниже, "
|
||||||
|
"то параметр будет игнорироваться."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
@@ -0,0 +1,166 @@
|
|||||||
|
# SOME DESCRIPTIVE TITLE.
|
||||||
|
# Copyright (C) 2025, kolo
|
||||||
|
# This file is distributed under the same license as the Argenta package.
|
||||||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, 2025.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Argenta \n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2025-12-04 20:39+0300\n"
|
||||||
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
|
"Language: en\n"
|
||||||
|
"Language-Team: en <LL@li.org>\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=utf-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Generated-By: Babel 2.17.0\n"
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/argspace.rst:4
|
||||||
|
msgid "ArgSpace"
|
||||||
|
msgstr "ArgSpace"
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/argspace.rst:6
|
||||||
|
msgid ""
|
||||||
|
"``ArgSpace`` — это контейнер для хранения и управления обработанными "
|
||||||
|
"аргументами командной строки. Его основная задача — предоставить удобный "
|
||||||
|
"интерфейс для доступа к значениям, переданным при запуске приложения."
|
||||||
|
msgstr ""
|
||||||
|
"``ArgSpace`` is a container for storing and managing processed command-"
|
||||||
|
"line arguments. Its main purpose is to provide a convenient interface for"
|
||||||
|
" accessing values passed at application startup."
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/argspace.rst:8
|
||||||
|
msgid ""
|
||||||
|
"``ArgSpace`` создаётся автоматически после обработки аргументов с помощью"
|
||||||
|
" ``ArgParser`` и содержит коллекцию объектов ``InputArgument``."
|
||||||
|
msgstr ""
|
||||||
|
"``ArgSpace`` is created automatically after processing arguments using "
|
||||||
|
"``ArgParser`` and contains a collection of ``InputArgument`` objects."
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/argspace.rst:13
|
||||||
|
msgid "Инициализация"
|
||||||
|
msgstr "Initialization"
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/argspace.rst:15
|
||||||
|
msgid ""
|
||||||
|
"Создание экземпляров класса ``ArgSpace`` происходит под `капотом`, вам не"
|
||||||
|
" нужно создавать их вручную."
|
||||||
|
msgstr ""
|
||||||
|
"Creation of ``ArgSpace`` class instances happens under the hood, you "
|
||||||
|
"don't need to create them manually."
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/argspace.rst:17
|
||||||
|
msgid "**Атрибуты:**"
|
||||||
|
msgstr "**Attributes:**"
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/argspace.rst:21
|
||||||
|
msgid "Список всех обработанных аргументов типа ``InputArgument``."
|
||||||
|
msgstr "List of all processed arguments of type ``InputArgument``."
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/argspace.rst:26
|
||||||
|
msgid "Методы"
|
||||||
|
msgstr "Methods"
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/argspace.rst:29
|
||||||
|
msgid "get_by_name"
|
||||||
|
msgstr "get_by_name"
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/argspace.rst:36
|
||||||
|
msgid "Возвращает аргумент по имени."
|
||||||
|
msgstr "Returns an argument by name."
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/argspace.rst
|
||||||
|
msgid "param name"
|
||||||
|
msgstr "param name"
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/argspace.rst:38
|
||||||
|
msgid "Имя искомого аргумента."
|
||||||
|
msgstr "Name of the argument to search for."
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/argspace.rst
|
||||||
|
msgid "return"
|
||||||
|
msgstr "return"
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/argspace.rst:39
|
||||||
|
msgid "Объект ``InputArgument`` или ``None``, если аргумент не найден."
|
||||||
|
msgstr "``InputArgument`` object or ``None`` if the argument is not found."
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/argspace.rst:41
|
||||||
|
#: ../../root/api/orchestrator/argspace.rst:63
|
||||||
|
#: ../../root/api/orchestrator/argspace.rst:90
|
||||||
|
msgid "**Пример использования:**"
|
||||||
|
msgstr "**Usage example:**"
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/argspace.rst:49
|
||||||
|
msgid "get_by_type"
|
||||||
|
msgstr "get_by_type"
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/argspace.rst:56
|
||||||
|
msgid "Возвращает все аргументы определённого типа."
|
||||||
|
msgstr "Returns all arguments of a specific type."
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/argspace.rst
|
||||||
|
msgid "param arg_type"
|
||||||
|
msgstr "param arg_type"
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/argspace.rst:58
|
||||||
|
msgid "Тип аргумента (``BooleanArgument`` или ``ValueArgument``)."
|
||||||
|
msgstr "Argument type (``BooleanArgument`` or ``ValueArgument``)."
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/argspace.rst:59
|
||||||
|
msgid "Список аргументов указанного типа или пустой список."
|
||||||
|
msgstr "List of arguments of the specified type or an empty list."
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/argspace.rst:61
|
||||||
|
msgid ""
|
||||||
|
"Метод фильтрует ``all_arguments`` по атрибуту ``founder_class`` и "
|
||||||
|
"возвращает аргументы, созданные из указанного типа."
|
||||||
|
msgstr ""
|
||||||
|
"The method filters ``all_arguments`` by the ``founder_class`` attribute "
|
||||||
|
"and returns arguments created from the specified type."
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/argspace.rst:71
|
||||||
|
msgid "InputArgument"
|
||||||
|
msgstr "InputArgument"
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/argspace.rst:74
|
||||||
|
msgid ""
|
||||||
|
"Документация по ``InputArgument`` находится :ref:`здесь "
|
||||||
|
"<root_api_orchestrator_arguments_inputargument>`."
|
||||||
|
msgstr ""
|
||||||
|
"Documentation for ``InputArgument`` is located :ref:`here "
|
||||||
|
"<root_api_orchestrator_arguments_inputargument>`."
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/argspace.rst:79
|
||||||
|
msgid "Примеры использования"
|
||||||
|
msgstr "Usage Examples"
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/argspace.rst:81
|
||||||
|
msgid ""
|
||||||
|
"``ArgSpace`` используется для доступа к значениям аргументов после "
|
||||||
|
"запуска приложения. Типичный сценарий включает обработку аргументов через"
|
||||||
|
" ``ArgParser`` и последующее извлечение значений из ``ArgSpace``."
|
||||||
|
msgstr ""
|
||||||
|
"``ArgSpace`` is used to access argument values after the application "
|
||||||
|
"starts. A typical scenario includes processing arguments through "
|
||||||
|
"``ArgParser`` and subsequent extraction of values from ``ArgSpace``."
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/argspace.rst:83
|
||||||
|
msgid "**Полный пример:**"
|
||||||
|
msgstr "**Complete example:**"
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/argspace.rst:88
|
||||||
|
msgid ""
|
||||||
|
"Доступ к аргументам из обработчиков осуществляется с помощью DI. "
|
||||||
|
"Подробнее см. :ref:`здесь <root_dependency_injection>`."
|
||||||
|
msgstr ""
|
||||||
|
"Access to arguments from handlers is done using DI. For more details, see"
|
||||||
|
" :ref:`here <root_dependency_injection>`."
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/argspace.rst:95
|
||||||
|
msgid "**Запуск приложения:**"
|
||||||
|
msgstr "**Running the application:**"
|
||||||
|
|
||||||
@@ -0,0 +1,227 @@
|
|||||||
|
# SOME DESCRIPTIVE TITLE.
|
||||||
|
# Copyright (C) 2025, kolo
|
||||||
|
# This file is distributed under the same license as the Argenta package.
|
||||||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, 2025.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Argenta \n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2025-12-02 22:27+0300\n"
|
||||||
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
|
"Language: en\n"
|
||||||
|
"Language-Team: en <LL@li.org>\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=utf-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Generated-By: Babel 2.17.0\n"
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/arguments.rst:4
|
||||||
|
msgid "Arguments"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/arguments.rst:6
|
||||||
|
msgid ""
|
||||||
|
"Модуль ``Arguments`` предоставляет классы для работы с аргументами "
|
||||||
|
"командной строки. Они позволяют настраивать поведение приложения в момент"
|
||||||
|
" его запуска, передавая различные параметры конфигурации."
|
||||||
|
msgstr ""
|
||||||
|
"The ``Arguments`` module provides classes for working with command-line arguments. "
|
||||||
|
"They allow configuring application behavior at startup by passing various configuration parameters."
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/arguments.rst:8
|
||||||
|
msgid ""
|
||||||
|
"Аргументы регистрируются в ``ArgParser`` и после обработки становятся "
|
||||||
|
"доступными в объекте ``ArgSpace``."
|
||||||
|
msgstr ""
|
||||||
|
"Arguments are registered in ``ArgParser`` and after processing become available in the ``ArgSpace`` object."
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/arguments.rst:13
|
||||||
|
msgid "ValueArgument"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/arguments.rst:15
|
||||||
|
msgid "Класс для аргументов, требующих передачи значения."
|
||||||
|
msgstr "Class for arguments that require passing a value."
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/arguments.rst:31
|
||||||
|
msgid "Создаёт аргумент командной строки, требующий значения."
|
||||||
|
msgstr "Creates a command-line argument that requires a value."
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/arguments.rst
|
||||||
|
msgid "param name"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/arguments.rst:33
|
||||||
|
#: ../../root/api/orchestrator/arguments.rst:74
|
||||||
|
#: ../../root/api/orchestrator/arguments.rst:117
|
||||||
|
msgid "Имя аргумента"
|
||||||
|
msgstr "Argument name"
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/arguments.rst
|
||||||
|
msgid "param prefix"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/arguments.rst:34
|
||||||
|
#: ../../root/api/orchestrator/arguments.rst:75
|
||||||
|
msgid "Префикс (по умолчанию ``--``)"
|
||||||
|
msgstr "Prefix (defaults to ``--``)"
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/arguments.rst
|
||||||
|
msgid "param help"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/arguments.rst:35
|
||||||
|
#: ../../root/api/orchestrator/arguments.rst:76
|
||||||
|
msgid "Сообщение для справки (``--help``)"
|
||||||
|
msgstr "Help message (``--help``)"
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/arguments.rst
|
||||||
|
msgid "param possible_values"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/arguments.rst:36
|
||||||
|
msgid "Список допустимых значений"
|
||||||
|
msgstr "List of allowed values"
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/arguments.rst
|
||||||
|
msgid "param default"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/arguments.rst:37
|
||||||
|
msgid "Значение по умолчанию, если аргумент не передан"
|
||||||
|
msgstr "Default value if the argument is not passed"
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/arguments.rst
|
||||||
|
msgid "param is_required"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/arguments.rst:38
|
||||||
|
msgid ""
|
||||||
|
"Если ``True``, аргумент становится обязательным. Если не передать при "
|
||||||
|
"запуске, приложение не запустится"
|
||||||
|
msgstr ""
|
||||||
|
"If ``True``, the argument becomes required. If not passed at startup, the application will not start"
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/arguments.rst
|
||||||
|
msgid "param is_deprecated"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/arguments.rst:39
|
||||||
|
msgid ""
|
||||||
|
"Если ``True``, помечает аргумент как устаревший. Если передать при "
|
||||||
|
"запуске, будет выведено предупреждение в консоль"
|
||||||
|
msgstr ""
|
||||||
|
"If ``True``, marks the argument as deprecated. If passed at startup, a warning will be displayed in the console"
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/arguments.rst:41
|
||||||
|
#: ../../root/api/orchestrator/arguments.rst:79
|
||||||
|
msgid "**Пример использования:**"
|
||||||
|
msgstr "**Usage example:**"
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/arguments.rst:47
|
||||||
|
#: ../../root/api/orchestrator/arguments.rst:85
|
||||||
|
msgid "**Запуск приложения:**"
|
||||||
|
msgstr "**Running the application:**"
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/arguments.rst:57
|
||||||
|
msgid "BooleanArgument"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/arguments.rst:59
|
||||||
|
msgid ""
|
||||||
|
"Класс для булевых аргументов, не требующих значения. Их наличие при "
|
||||||
|
"запуске устанавливает значение в **True**, отсутствие — в **False**."
|
||||||
|
msgstr ""
|
||||||
|
"Class for boolean arguments that do not require a value. Their presence at startup "
|
||||||
|
"sets the value to **True**, absence to **False**."
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/arguments.rst:72
|
||||||
|
msgid "Создаёт булев аргумент командной строки без значения."
|
||||||
|
msgstr "Creates a boolean command-line argument without a value."
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/arguments.rst:77
|
||||||
|
msgid "Если ``True``, помечает аргумент как устаревший"
|
||||||
|
msgstr "If ``True``, marks the argument as deprecated"
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/arguments.rst:98
|
||||||
|
msgid "InputArgument"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/arguments.rst:101
|
||||||
|
msgid ""
|
||||||
|
"``InputArgument`` напрямую связан с контейнером ``ArgSpace`` и является "
|
||||||
|
"его наполнителем. Подробнее о нём см. :ref:`здесь "
|
||||||
|
"<root_api_orchestrator_argspace>`."
|
||||||
|
msgstr ""
|
||||||
|
"``InputArgument`` is directly related to the ``ArgSpace`` container and serves as its filler. "
|
||||||
|
"For more details, see :ref:`here <root_api_orchestrator_argspace>`."
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/arguments.rst:103
|
||||||
|
msgid ""
|
||||||
|
"Представляет собой обработанный аргумент командной строки. Этот класс "
|
||||||
|
"используется внутри ``ArgSpace`` для хранения значений, полученных после "
|
||||||
|
"парсинга."
|
||||||
|
msgstr ""
|
||||||
|
"Represents a processed command-line argument. This class is used inside ``ArgSpace`` "
|
||||||
|
"to store values obtained after parsing."
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/arguments.rst:115
|
||||||
|
msgid "Создаёт экземпляр обработанного входного аргумента."
|
||||||
|
msgstr "Creates an instance of a processed input argument."
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/arguments.rst
|
||||||
|
msgid "param value"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/arguments.rst:118
|
||||||
|
msgid ""
|
||||||
|
"Значение аргумента. Для ``BooleanArgument`` — **True**, если аргумент "
|
||||||
|
"передан, и **False**, если нет; для ``ValueArgument`` — введённая строка"
|
||||||
|
msgstr ""
|
||||||
|
"Argument value. For ``BooleanArgument`` — **True** if the argument is passed, and **False** if not; "
|
||||||
|
"for ``ValueArgument`` — the entered string"
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/arguments.rst
|
||||||
|
msgid "param founder_class"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/arguments.rst:119
|
||||||
|
msgid ""
|
||||||
|
"Класс-родитель, из которого был создан аргумент (``BooleanArgument`` или "
|
||||||
|
"``ValueArgument``)"
|
||||||
|
msgstr ""
|
||||||
|
"Parent class from which the argument was created (``BooleanArgument`` or ``ValueArgument``)"
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/arguments.rst:121
|
||||||
|
msgid "**Атрибуты:**"
|
||||||
|
msgstr "**Attributes:**"
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/arguments.rst:125
|
||||||
|
msgid ""
|
||||||
|
"Имя аргумента, указанное при создании ``ValueArgument`` или "
|
||||||
|
"``BooleanArgument``."
|
||||||
|
msgstr ""
|
||||||
|
"Argument name specified when creating ``ValueArgument`` or ``BooleanArgument``."
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/arguments.rst:129
|
||||||
|
msgid "Значение аргумента. Тип зависит от исходного класса:"
|
||||||
|
msgstr "Argument value. Type depends on the source class:"
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/arguments.rst:131
|
||||||
|
msgid "Для ``BooleanArgument``: **True**, если аргумент был передан"
|
||||||
|
msgstr "For ``BooleanArgument``: **True** if the argument was passed"
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/arguments.rst:132
|
||||||
|
msgid ""
|
||||||
|
"Для ``ValueArgument``: строка с переданным значением или значением по "
|
||||||
|
"умолчанию"
|
||||||
|
msgstr ""
|
||||||
|
"For ``ValueArgument``: string with the passed value or default value"
|
||||||
|
|
||||||
|
#: ../../root/api/orchestrator/arguments.rst:136
|
||||||
|
msgid "Ссылка на класс-родитель. Используется для определения типа и фильтрации."
|
||||||
|
msgstr "Reference to the parent class. Used for type determination and filtering."
|
||||||
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user