mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-07-18 08:39:40 +03:00
feat(skd-info): kv-параметры роли в детализации поля
В -Mode fields -Name <field> к сводке Role добавляются не-bool параметры роли (balanceGroupName, balanceType, parentDimension, accountTypeExpression и т.д.) в формате name=value. Bool-флаги (@balance, @dimension, ...) отображаются как раньше. False-значения по-прежнему скрыты. Регресс: 6/6 PS, 6/6 PY (существующие snapshots не задеты). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# skd-info v1.3 — Analyze 1C DCS structure
|
||||
# skd-info v1.4 — Analyze 1C DCS structure
|
||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||
param(
|
||||
[Parameter(Mandatory=$true)]
|
||||
@@ -824,8 +824,14 @@ function Show-Fields {
|
||||
$roleParts = @()
|
||||
if ($role) {
|
||||
foreach ($child in $role.ChildNodes) {
|
||||
if ($child.NodeType -eq "Element" -and $child.InnerText -eq "true") {
|
||||
if ($child.NodeType -ne "Element") { continue }
|
||||
$txt = $child.InnerText.Trim()
|
||||
if ($txt -eq "true") {
|
||||
$roleParts += $child.LocalName
|
||||
} elseif ($txt -eq "false") {
|
||||
# skip default-false flags
|
||||
} else {
|
||||
$roleParts += "$($child.LocalName)=$txt"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
# skd-info v1.3 — Analyze 1C DCS structure
|
||||
# skd-info v1.4 — Analyze 1C DCS structure
|
||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||
|
||||
import argparse
|
||||
@@ -777,8 +777,15 @@ def main():
|
||||
role_parts = []
|
||||
if role is not None:
|
||||
for child in role:
|
||||
if isinstance(child.tag, str) and (child.text or "").strip() == "true":
|
||||
if not isinstance(child.tag, str):
|
||||
continue
|
||||
txt = (child.text or "").strip()
|
||||
if txt == "true":
|
||||
role_parts.append(localname(child))
|
||||
elif txt == "false":
|
||||
pass
|
||||
else:
|
||||
role_parts.append(f"{localname(child)}={txt}")
|
||||
info["role"] = ", ".join(role_parts)
|
||||
|
||||
# UseRestriction
|
||||
|
||||
Reference in New Issue
Block a user