feat: sap-cli skill v2.1.0 — self-contained distributable package
- assets/: sap-cli source (v2.1.0, 26 commands, 16 object types) - references/: tool constraints + error handling (self-contained) - scripts/setup.py: one-click install/config/verify - SKILL.md: full command reference + dual-platform install guide - VERSION: 2.1.0 Built from D:/Codespace/sap-cli via scripts/pack_skill.py
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
"""sapcli 工具包"""
|
||||
|
||||
from .xml_utils import xml_escape, ddl_escape
|
||||
|
||||
__all__ = ["xml_escape", "ddl_escape"]
|
||||
@@ -0,0 +1,13 @@
|
||||
"""XML 安全转义工具"""
|
||||
|
||||
import xml.sax.saxutils as _saxutils
|
||||
|
||||
|
||||
def xml_escape(s: str) -> str:
|
||||
"""转义 XML 特殊字符(包括双引号),用于属性值安全。"""
|
||||
return _saxutils.escape(s, {'"': '"'})
|
||||
|
||||
|
||||
def ddl_escape(s: str) -> str:
|
||||
"""转义 DDL 字符串中的单引号(ABAP DDL 用两个单引号转义)。"""
|
||||
return s.replace("'", "''")
|
||||
Reference in New Issue
Block a user