mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-06-10 16:14:54 +03:00
feat(meta-info): show LimitLevelCount/LevelCount for hierarchical catalogs
Closes #10 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# meta-info v1.0 — Compact summary of 1C metadata object
|
||||
# meta-info v1.1 — Compact summary of 1C metadata object
|
||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||
param(
|
||||
[Parameter(Mandatory=$true)][string]$ObjectPath,
|
||||
@@ -773,6 +773,13 @@ if (-not $drillDone) {
|
||||
if ($hier -and $hier.InnerText -eq "true") {
|
||||
$ht = $props.SelectSingleNode("md:HierarchyType", $ns)
|
||||
$htText = if ($ht -and $ht.InnerText -eq "HierarchyFoldersAndItems") { "группы и элементы" } else { "элементы" }
|
||||
$limitNode = $props.SelectSingleNode("md:LimitLevelCount", $ns)
|
||||
$levelNode = $props.SelectSingleNode("md:LevelCount", $ns)
|
||||
if ($limitNode -and $limitNode.InnerText -eq "true" -and $levelNode) {
|
||||
$htText += ", уровней: $($levelNode.InnerText)"
|
||||
} else {
|
||||
$htText += ", без ограничения уровней"
|
||||
}
|
||||
$parts += "Иерархический: $htText"
|
||||
}
|
||||
$codeLen = $props.SelectSingleNode("md:CodeLength", $ns)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# meta-info v1.0 — Compact summary of 1C metadata object (Python port)
|
||||
# meta-info v1.1 — Compact summary of 1C metadata object (Python port)
|
||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||
import argparse
|
||||
import os
|
||||
@@ -793,6 +793,12 @@ if not drill_done:
|
||||
if hier is not None and inner_text(hier) == "true":
|
||||
ht = find(props, "md:HierarchyType")
|
||||
ht_text = "группы и элементы" if ht is not None and inner_text(ht) == "HierarchyFoldersAndItems" else "элементы"
|
||||
limit_node = find(props, "md:LimitLevelCount")
|
||||
level_node = find(props, "md:LevelCount")
|
||||
if limit_node is not None and inner_text(limit_node) == "true" and level_node is not None:
|
||||
ht_text += f", уровней: {inner_text(level_node)}"
|
||||
else:
|
||||
ht_text += ", без ограничения уровней"
|
||||
parts.append(f"Иерархический: {ht_text}")
|
||||
code_len = find(props, "md:CodeLength")
|
||||
desc_len = find(props, "md:DescriptionLength")
|
||||
|
||||
Reference in New Issue
Block a user