first commit
This commit is contained in:
+8
@@ -0,0 +1,8 @@
|
||||
schema_version: 1
|
||||
module_path: tools_export_commands
|
||||
title: Macro Commands Documentation Generator
|
||||
scope:
|
||||
- Tools/ExportCommands/
|
||||
source_files: []
|
||||
depends_on: []
|
||||
related_to: []
|
||||
+1
@@ -0,0 +1 @@
|
||||
Single-file executable (`Program.cs`) targeting `net48` with no external dependencies beyond the standard library and a few referenced assemblies. The entry point accepts one argument — the path to a compiled macro assembly — then iterates over four embedded resource cultures (`en-US`, `it-IT`, `pl-PL`, `ko-KR`), loading the target assembly via reflection for each culture and emitting one per-culture Markdown file plus per-category files under a sibling `Docs/` directory. Reflection is used to discover types in the `ClassicAssist.Data.Macros.Commands` namespace, read `CommandsDisplayAttribute` / `CommandsDisplayStringSeeAlsoAttribute` metadata on public static members, and extract parameter info; attribute values are accessed through `dynamic` because this tool has no compile-time reference to the macro project. Localized strings come from `Properties/Resources.*.resx` resources (generated by `PublicResXFileCodeGenerator`). A custom `AssemblyResolve` handler bridges missing framework assemblies (including a typo workaround for `Colletions` → `System.Collections`) by probing the current directory and the runtime directory. Output model classes (`Commands`, `Parameter`, `CommandComparer`) live alongside `Program` and are not shared with any other project.
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
- Localized user-facing text is never hard-coded; all strings are pulled through `Resources.ResourceManager.GetString(...)` keyed by resource names such as `PARAMETER_DESCRIPTION_*`, `ClassicAssist_Macro_Commands`, etc.
|
||||
- Culture switching is explicit: before reading non-localized metadata the thread culture is reset to `InvariantCulture`, then restored to the target locale before accessing localized resources.
|
||||
- Cross-project attributes are accessed via `dynamic` casts of `GetCustomAttribute` results rather than strong-typed references, keeping this generator decoupled from the macro assembly's compilation.
|
||||
- Per-culture output files follow a naming convention where the English variant drops the locale suffix (`*.md`) while others append `-locale.md`, and category files use the language-neutral category name stripped of accents.
|
||||
+1
@@ -0,0 +1 @@
|
||||
Standalone .NET Framework console tool that reflects ClassicAssist macro command assemblies and emits localized Markdown documentation into a Docs/ folder.
|
||||
+1
@@ -0,0 +1 @@
|
||||
.NET Framework 4.8 (`net48`) CLI project built with the SDK-style `.csproj`; uses `System.Reflection` + `dynamic` to inspect an unrelated assembly at runtime, and `Resources.ResourceManager` for multi-language string lookup.
|
||||
+1
@@ -0,0 +1 @@
|
||||
Build with `dotnet build Tools/ExportCommands/ExportCommands.csproj` (or Visual Studio) producing the binary under `Tools/Output`. Run as `ExportCommands.exe <path-to-macro-assembly.dll>` from the repository root so it can create the sibling `Docs/` folder and resolve dependent assemblies from the current directory.
|
||||
Reference in New Issue
Block a user