Release 0.3.1: baseconf help, GPL v3, author Michael BAG.

Улучшена справка --help подкоманд (--baseconf до/после подкоманды), добавлены
LICENSE (GPL v3 EN) и LICENSE.ru (справочный перевод), контакты mk@p7net.ru.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
mihailkudravcev
2026-07-17 10:00:09 +03:00
parent a4b7629d6a
commit 45e798f2bf
9 changed files with 1612 additions and 24 deletions
+25 -5
View File
@@ -31,10 +31,10 @@ from index1c.build import build_project_index, default_workers # noqa: E402
from index1c import read_version_file # noqa: E402
from index1c.cli import ( # noqa: E402
BaseconfError,
add_baseconf_args,
add_tool_args,
handle_baseconf_error,
index_db_missing_message,
make_parent_parser,
resolve_project_root,
validate_baseconfs,
)
@@ -168,6 +168,9 @@ def cmd_list_configs(args: argparse.Namespace) -> int:
def build_parser() -> argparse.ArgumentParser:
tool_parent = make_parent_parser(include_baseconf=False)
reindex_parent = make_parent_parser(include_baseconf=True, baseconf_mode="index")
p = argparse.ArgumentParser(
description="Построение единого SQLite-индекса метаданных и BSL-модулей 1С.",
formatter_class=argparse.RawDescriptionHelpFormatter,
@@ -184,8 +187,13 @@ def build_parser() -> argparse.ArgumentParser:
add_tool_args(p)
sub = p.add_subparsers(dest="cmd", required=True)
r = sub.add_parser("reindex", help="Построить / обновить index.sqlite")
add_baseconf_args(r)
r = sub.add_parser(
"reindex",
help="Построить / обновить index.sqlite",
parents=[reindex_parent],
formatter_class=argparse.RawDescriptionHelpFormatter,
description="Построение или инкрементальное обновление index.sqlite.",
)
r.add_argument("--types", "-t", help="Только типы: Documents,Catalogs,рс,рн,…")
r.add_argument("--skip-types", help="Дополнительно пропустить типы")
r.add_argument("--include-skipped", action="store_true")
@@ -205,10 +213,22 @@ def build_parser() -> argparse.ArgumentParser:
r.add_argument("--md", action="store_true", help="Markdown в cache/1c_meta/md/")
r.set_defaults(func=cmd_reindex)
st = sub.add_parser("status", help="Состояние index.sqlite")
st = sub.add_parser(
"status",
help="Состояние index.sqlite",
parents=[tool_parent],
formatter_class=argparse.RawDescriptionHelpFormatter,
description="Размер БД, meta и список проиндексированных конфигураций.",
)
st.set_defaults(func=cmd_status)
lc = sub.add_parser("list", help="Выгрузки в репозитории и в индексе")
lc = sub.add_parser(
"list",
help="Выгрузки в репозитории и в индексе",
parents=[tool_parent],
formatter_class=argparse.RawDescriptionHelpFormatter,
description="Выгрузки 1С с src/ в репозитории и что уже в index.sqlite.",
)
lc.set_defaults(func=cmd_list_configs)
return p