dimcode-darwin-arm64 0.2.19-beta.0 → 0.2.20-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/bin/dimcode +0 -0
  2. package/bin/skills-assets/chrome-control/SKILL.md +96 -0
  3. package/bin/skills-assets/dim-workflow/SKILL.md +78 -30
  4. package/bin/skills-assets/officecli/SKILL.md +423 -0
  5. package/package.json +1 -1
  6. package/bin/skills-assets/docx/SKILL.md +0 -273
  7. package/bin/skills-assets/docx/assets/styles/academic_styles.xml +0 -250
  8. package/bin/skills-assets/docx/assets/styles/corporate_styles.xml +0 -284
  9. package/bin/skills-assets/docx/assets/styles/default_styles.xml +0 -449
  10. package/bin/skills-assets/docx/assets/xsd/aesthetic-rules.xsd +0 -470
  11. package/bin/skills-assets/docx/assets/xsd/business-rules.xsd +0 -130
  12. package/bin/skills-assets/docx/assets/xsd/common-types.xsd +0 -159
  13. package/bin/skills-assets/docx/assets/xsd/wml-subset.xsd +0 -589
  14. package/bin/skills-assets/docx/references/cjk_typography.md +0 -357
  15. package/bin/skills-assets/docx/references/cjk_university_template_guide.md +0 -184
  16. package/bin/skills-assets/docx/references/comments_guide.md +0 -191
  17. package/bin/skills-assets/docx/references/design_good_bad_examples.md +0 -829
  18. package/bin/skills-assets/docx/references/design_principles.md +0 -819
  19. package/bin/skills-assets/docx/references/openxml_element_order.md +0 -308
  20. package/bin/skills-assets/docx/references/openxml_encyclopedia_part1.md +0 -4061
  21. package/bin/skills-assets/docx/references/openxml_encyclopedia_part2.md +0 -2820
  22. package/bin/skills-assets/docx/references/openxml_encyclopedia_part3.md +0 -3381
  23. package/bin/skills-assets/docx/references/openxml_namespaces.md +0 -82
  24. package/bin/skills-assets/docx/references/openxml_units.md +0 -72
  25. package/bin/skills-assets/docx/references/scenario_a_create.md +0 -284
  26. package/bin/skills-assets/docx/references/scenario_b_edit_content.md +0 -295
  27. package/bin/skills-assets/docx/references/scenario_c_apply_template.md +0 -456
  28. package/bin/skills-assets/docx/references/track_changes_guide.md +0 -200
  29. package/bin/skills-assets/docx/references/troubleshooting.md +0 -506
  30. package/bin/skills-assets/docx/references/typography_guide.md +0 -294
  31. package/bin/skills-assets/docx/references/xsd_validation_guide.md +0 -158
  32. package/bin/skills-assets/docx/scripts/doc_to_docx.sh +0 -40
  33. package/bin/skills-assets/docx/scripts/docx_preview.sh +0 -37
  34. package/bin/skills-assets/docx/scripts/dotnet/Docx.Cli/Docx.Cli.csproj +0 -19
  35. package/bin/skills-assets/docx/scripts/dotnet/Docx.Cli/Program.cs +0 -18
  36. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Commands/AnalyzeCommand.cs +0 -147
  37. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Commands/ApplyTemplateCommand.cs +0 -322
  38. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Commands/CreateCommand.cs +0 -324
  39. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Commands/DiffCommand.cs +0 -155
  40. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Commands/EditContentCommand.cs +0 -487
  41. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Commands/FixOrderCommand.cs +0 -108
  42. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Commands/MergeRunsCommand.cs +0 -122
  43. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Commands/ValidateCommand.cs +0 -107
  44. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Docx.Core.csproj +0 -15
  45. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/OpenXml/CommentSynchronizer.cs +0 -169
  46. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/OpenXml/ElementOrder.cs +0 -80
  47. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/OpenXml/NamespaceConstants.cs +0 -42
  48. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/OpenXml/RunMerger.cs +0 -81
  49. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/OpenXml/StyleAnalyzer.cs +0 -81
  50. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/OpenXml/TrackChangesHelper.cs +0 -99
  51. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/OpenXml/UnitConverter.cs +0 -23
  52. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/AestheticRecipeSamples.cs +0 -1832
  53. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/AestheticRecipeSamples_Batch1.cs +0 -910
  54. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/AestheticRecipeSamples_Batch2.cs +0 -999
  55. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/AestheticRecipeSamples_Batch3.cs +0 -1048
  56. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/AestheticRecipeSamples_Batch4.cs +0 -1038
  57. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/CharacterFormattingSamples.cs +0 -1020
  58. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/DocumentCreationSamples.cs +0 -1121
  59. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/FieldAndTocSamples.cs +0 -624
  60. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/FootnoteAndCommentSamples.cs +0 -675
  61. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/HeaderFooterSamples.cs +0 -838
  62. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/ImageSamples.cs +0 -917
  63. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/ListAndNumberingSamples.cs +0 -826
  64. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/ParagraphFormattingSamples.cs +0 -1199
  65. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/StyleSystemSamples.cs +0 -1487
  66. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/TableSamples.cs +0 -1163
  67. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/TrackChangesSamples.cs +0 -595
  68. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Typography/CjkHelper.cs +0 -39
  69. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Typography/FontDefaults.cs +0 -24
  70. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Typography/PageSizes.cs +0 -20
  71. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Validation/BusinessRuleValidator.cs +0 -224
  72. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Validation/GateCheckValidator.cs +0 -148
  73. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Validation/ValidationResult.cs +0 -23
  74. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Validation/XsdValidator.cs +0 -69
  75. package/bin/skills-assets/docx/scripts/dotnet/Docx.slnx +0 -4
  76. package/bin/skills-assets/docx/scripts/env_check.sh +0 -196
  77. package/bin/skills-assets/docx/scripts/setup.ps1 +0 -274
  78. package/bin/skills-assets/docx/scripts/setup.sh +0 -504
  79. package/bin/skills-assets/pptx-generator/SKILL.md +0 -248
  80. package/bin/skills-assets/pptx-generator/references/design-system.md +0 -392
  81. package/bin/skills-assets/pptx-generator/references/editing.md +0 -162
  82. package/bin/skills-assets/pptx-generator/references/pitfalls.md +0 -112
  83. package/bin/skills-assets/pptx-generator/references/pptxgenjs.md +0 -420
  84. package/bin/skills-assets/pptx-generator/references/slide-types.md +0 -413
  85. package/bin/skills-assets/xlsx/SKILL.md +0 -137
  86. package/bin/skills-assets/xlsx/references/create.md +0 -691
  87. package/bin/skills-assets/xlsx/references/edit.md +0 -684
  88. package/bin/skills-assets/xlsx/references/fix.md +0 -37
  89. package/bin/skills-assets/xlsx/references/format.md +0 -768
  90. package/bin/skills-assets/xlsx/references/ooxml-cheatsheet.md +0 -231
  91. package/bin/skills-assets/xlsx/references/read-analyze.md +0 -97
  92. package/bin/skills-assets/xlsx/references/validate.md +0 -772
  93. package/bin/skills-assets/xlsx/scripts/formula_check.py +0 -422
  94. package/bin/skills-assets/xlsx/scripts/libreoffice_recalc.py +0 -248
  95. package/bin/skills-assets/xlsx/scripts/shared_strings_builder.py +0 -163
  96. package/bin/skills-assets/xlsx/scripts/style_audit.py +0 -575
  97. package/bin/skills-assets/xlsx/scripts/xlsx_add_column.py +0 -395
  98. package/bin/skills-assets/xlsx/scripts/xlsx_insert_row.py +0 -274
  99. package/bin/skills-assets/xlsx/scripts/xlsx_pack.py +0 -87
  100. package/bin/skills-assets/xlsx/scripts/xlsx_reader.py +0 -362
  101. package/bin/skills-assets/xlsx/scripts/xlsx_shift_rows.py +0 -396
  102. package/bin/skills-assets/xlsx/scripts/xlsx_unpack.py +0 -130
  103. package/bin/skills-assets/xlsx/templates/minimal_xlsx/[Content_Types].xml +0 -9
  104. package/bin/skills-assets/xlsx/templates/minimal_xlsx/_rels/.rels +0 -6
  105. package/bin/skills-assets/xlsx/templates/minimal_xlsx/xl/_rels/workbook.xml.rels +0 -19
  106. package/bin/skills-assets/xlsx/templates/minimal_xlsx/xl/sharedStrings.xml +0 -33
  107. package/bin/skills-assets/xlsx/templates/minimal_xlsx/xl/styles.xml +0 -160
  108. package/bin/skills-assets/xlsx/templates/minimal_xlsx/xl/workbook.xml +0 -30
  109. package/bin/skills-assets/xlsx/templates/minimal_xlsx/xl/worksheets/sheet1.xml +0 -70
@@ -1,163 +0,0 @@
1
- #!/usr/bin/env python3
2
- # SPDX-License-Identifier: MIT
3
- """
4
- shared_strings_builder.py — Generate a valid sharedStrings.xml from a list of strings.
5
-
6
- Usage (strings as command-line arguments):
7
- python3 shared_strings_builder.py "Revenue" "Cost" "Gross Profit" > sharedStrings.xml
8
-
9
- Usage (strings from a file, one per line):
10
- python3 shared_strings_builder.py --file strings.txt > sharedStrings.xml
11
-
12
- Usage (print index table instead of XML, for reference):
13
- python3 shared_strings_builder.py --index "Revenue" "Cost" "Gross Profit"
14
- python3 shared_strings_builder.py --index --file strings.txt
15
-
16
- Output format:
17
- Valid xl/sharedStrings.xml written to stdout.
18
- Redirect to the correct path:
19
- python3 shared_strings_builder.py "A" "B" > /tmp/xlsx_work/xl/sharedStrings.xml
20
-
21
- Notes:
22
- - Strings are de-duplicated: identical strings appear only once in the table.
23
- - The 'count' attribute equals the number of unique strings (appropriate for new files
24
- where each string is used in exactly one cell). If a string appears in multiple cells,
25
- manually increment 'count' by the number of extra references.
26
- - Special characters (&, <, >) are automatically XML-escaped.
27
- - Leading/trailing spaces are preserved with xml:space="preserve".
28
- """
29
-
30
- import sys
31
- import html
32
- import argparse
33
-
34
-
35
- HEADER = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'
36
- SST_NS = "http://schemas.openxmlformats.org/spreadsheetml/2006/main"
37
-
38
-
39
- def escape_text(s: str) -> tuple[str, bool]:
40
- """
41
- Return (escaped_text, needs_preserve).
42
- needs_preserve is True if the string has leading or trailing whitespace.
43
- """
44
- escaped = html.escape(s, quote=False)
45
- needs_preserve = s != s.strip()
46
- return escaped, needs_preserve
47
-
48
-
49
- def build_xml(strings: list[str]) -> str:
50
- """Build sharedStrings.xml content from a list of unique strings."""
51
- n = len(strings)
52
- lines = [
53
- HEADER,
54
- f'<sst xmlns="{SST_NS}" count="{n}" uniqueCount="{n}">',
55
- ]
56
- for i, s in enumerate(strings):
57
- escaped, preserve = escape_text(s)
58
- if preserve:
59
- lines.append(f' <si><t xml:space="preserve">{escaped}</t></si>'
60
- f' <!-- index {i} -->')
61
- else:
62
- lines.append(f' <si><t>{escaped}</t></si> <!-- index {i} -->')
63
- lines.append("</sst>")
64
- return "\n".join(lines) + "\n"
65
-
66
-
67
- def build_index_table(strings: list[str]) -> str:
68
- """Return a human-readable index table (for agent reference, not written to file)."""
69
- lines = [
70
- f"{'Index':<6} String",
71
- "-" * 50,
72
- ]
73
- for i, s in enumerate(strings):
74
- lines.append(f"{i:<6} {s!r}")
75
- lines.append("")
76
- lines.append(
77
- f"Total: {len(strings)} unique strings. "
78
- "Use these indices in <c t=\"s\"><v>N</v></c> cells."
79
- )
80
- return "\n".join(lines) + "\n"
81
-
82
-
83
- def deduplicate(strings: list[str]) -> list[str]:
84
- """Remove duplicates while preserving first-occurrence order."""
85
- seen: set[str] = set()
86
- result: list[str] = []
87
- for s in strings:
88
- if s not in seen:
89
- seen.add(s)
90
- result.append(s)
91
- return result
92
-
93
-
94
- def load_from_file(path: str) -> list[str]:
95
- """Read one string per non-empty line from a file."""
96
- with open(path, encoding="utf-8") as f:
97
- return [line.rstrip("\n") for line in f if line.strip()]
98
-
99
-
100
- def main() -> None:
101
- parser = argparse.ArgumentParser(
102
- description="Generate xl/sharedStrings.xml from a list of strings.",
103
- formatter_class=argparse.RawDescriptionHelpFormatter,
104
- epilog=__doc__,
105
- )
106
- parser.add_argument(
107
- "strings",
108
- nargs="*",
109
- metavar="STRING",
110
- help="String values to include in the shared string table.",
111
- )
112
- parser.add_argument(
113
- "--file",
114
- "-f",
115
- metavar="PATH",
116
- help="Read strings from a file (one string per line) instead of arguments.",
117
- )
118
- parser.add_argument(
119
- "--index",
120
- action="store_true",
121
- help="Print a human-readable index table instead of XML output.",
122
- )
123
- args = parser.parse_args()
124
-
125
- if args.file:
126
- try:
127
- raw = load_from_file(args.file)
128
- except FileNotFoundError:
129
- print(f"ERROR: File not found: {args.file}", file=sys.stderr)
130
- sys.exit(1)
131
- except OSError as e:
132
- print(f"ERROR: Cannot read file: {e}", file=sys.stderr)
133
- sys.exit(1)
134
- else:
135
- raw = list(args.strings)
136
-
137
- if not raw:
138
- print(
139
- "ERROR: No strings provided.\n"
140
- "Usage: shared_strings_builder.py \"String1\" \"String2\" ...\n"
141
- " or: shared_strings_builder.py --file strings.txt",
142
- file=sys.stderr,
143
- )
144
- sys.exit(1)
145
-
146
- strings = deduplicate(raw)
147
-
148
- if len(strings) < len(raw):
149
- removed = len(raw) - len(strings)
150
- print(
151
- f"Note: {removed} duplicate(s) removed. "
152
- f"{len(strings)} unique strings in table.",
153
- file=sys.stderr,
154
- )
155
-
156
- if args.index:
157
- print(build_index_table(strings))
158
- else:
159
- print(build_xml(strings), end="")
160
-
161
-
162
- if __name__ == "__main__":
163
- main()