Core Services, i18n, Pipelines & Native Sidecars
Beyond module hosting and WebView2 bridges, Core/ and Tools/ provide live internationalization, unified AI/media provider routing, lossless processing pipelines, offline-first licensing, and 7 out-of-process native sidecar tools.
1. Internationalization Engine (ShibaLocalizationManager)
Implemented in Core\Localization\ShibaLocalizationManager.cs, ShibaPPT uses a dual-mode hybrid lookup engine (primary lookup by case-insensitive semantic ID, automatic fallback lookup by Chinese source string).
- Built-in Packs:
zh-CN(Simplified Chinese) anden-US(English US). - Persistence: Active language code stored in
HKCU\SOFTWARE\ShibAppt\Settings->Language. - Custom User Packs: Stored at
%AppData%\ShibaPPT\Config\Languages\<code>.json. - Instant Live Broadcast: Calling
ShibaLocalizationManager.SetLanguage("en-US")raisesLanguageChanged, which immediately invalidates and re-labels the PowerPoint Ribbon (Ribbon1.ApplyRibbonLocalization()) and broadcasts{ action: "languageChanged", locale, messages }to every open WebView2 window without restarting PowerPoint.
Language Pack JSON Schema
{
"meta": {
"code": "ja-JP",
"name": "日本語",
"author": "Community",
"version": "1.0",
"baseLanguage": "zh-CN"
},
"ribbon": { "tabShiba": "ShibaPPT", "bt_Design": "デザイン" },
"modules": { "mod_design": "デザインパネル" },
"settings": { "window_title": "プラグイン設定" },
"ui": { "common.save": "保存" }
}2. Configuration Storage & Provider Routing (Configuration & Providers)
1. Storage Boundaries
| Location | Helper / Manager | Stored Data |
|---|---|---|
HKCU\SOFTWARE\ShibAppt\* | ShibaSettingsStore / ShibaModuleHost | Lightweight flags (language, RibbonTabPosition, radial menu engine toggle, module enable states) |
%AppData%\ShibaPPT\Config\ | PathHelper.GetUserWritableConfigPath | User JSON configs (CircularMenu layout, Custom Ribbon layout, hotkeys, custom language packs) |
Documents\ShibAppt\providers_config.json | ProviderConfigManager | AI LLMs, translation, OCR, cutout, stock photo APIs, and local app bindings (API keys obfuscated) |
%LocalAppData%\ShibaPPT\ | RemoteAssetManager / ShibaLogger | On-demand heavy runtime assets (Assets/), rolling logs (Logs/), and WebView2Data |
2. Unified Provider System (ProviderConfigManager & OpenAiCompatibleClient)
ProviderConfigManager ships with 21 built-in provider presets and decouples external services from business modules via Feature Slot Bindings (FeatureKeys):
- Feature Slots:
translation,text-rewrite,chat,vba-editor,ocr,image-edit,image-cutout,image-portrait,image-upscale,stock-image,asset-library. - Supported Protocols:
openai-compatible: Powered byOpenAiCompatibleClient, supporting Zhipu GLM, DeepSeek (including streamingreasoning_contentparser), OpenAI, Qwen, Kimi, SiliconFlow, and keyless local Ollama (with/api/tagsmodel discovery fallback) as well as multimodal Vision requests.- Specialized protocols:
deepl,koukoutu,removebg,paddle-ocr,umi-ocr,wechat-ocr,stock-image(Pexels / Pixabay / Unsplash),eagle,local-exe, andcustom-http-image.
3. Lossless Media & Text Pipelines (Core/Pipelines/)
1. ImagePipeline (Core/Pipelines/Image/ImagePipeline.cs)
Powers subject cutout, portrait segmentation, and AI upscaling:
- Extracts 100% lossless raw media bytes and a GVML snapshot from the selection (
ImageSelectionHelper.GetImageInfoFromSelection, supporting single images, multi-select batches, grouped shapes, and picture fills); - Displays a cancellable
ShibaProgressWebWindowand runs the boundIImageProcessor; - Writes the processed PNG back in-place via GVML (
ApplyProcessedImageViaGvml), preserving original crops, coordinates, group hierarchy, and slide animations.
2. TranslationPipeline & TextRewriteService
- Batches 20–25 text runs into strictly aligned JSON string arrays for DeepL or OpenAI-compatible LLMs;
- Strips
<think>...</think>reasoning blocks and Markdown code fences automatically; - Writes back in-place while preserving paragraph and character-run formatting across shapes and tables.
4. Offline-First Licensing (Core/Licensing/)
Powered by AddInLicense.cs and lib\ShibaKey.Licensing.dll:
- Startup Verification: Local offline Ed25519 signature check completes in milliseconds (never blocks offline users), paired with a silent 6-hour background refresh timer.
- Feature Entitlement Keys (
LicenseFeatures):pro: Master switch unlocking all paid capabilitiesimage_ai: AI cutout, portrait segmentation, upscaling, and VTracer vectorizationsvg_tools: Paper.js vector editor, Fillet & Pen tools, and Outline Strokecustom_ribbon: Custom Ribbon designer and custom macro button executiondev_tools: Live OpenXML code editor and built-in Monaco VBA editor
5. Native Sidecar Tools & On-Demand Assets (Tools/ & RemoteAssetManager)
To support both 32-bit and 64-bit Office installations while keeping the installer compact, heavy or native workloads run as out-of-process sidecars:
| Sidecar Binary | Distribution | Invoking Service & Integration |
|---|---|---|
ClipboardReader.exe | Bundled (Tools\ClipboardReader\) | Invoked by ClipboardGvmlApi (--getshape / --setshape) to unpack/repack Windows Art::GVML ClipFormat streams and .shiba 7z archives |
ShibaVbaRunner.exe | Bundled + .vba shell association | Attaches to running PowerPoint via Marshal.GetActiveObject, injects .vba code into a temporary module, executes it, and removes the module in finally |
vtracer.exe | Bundled (Tools\vtracer\) | Invoked by VtracerService to trace bitmaps into SVGs, insert them onto the slide, and convert them to native editable Office shapes via ExecuteMso("SVGEdit") |
wechat-ocr.exe | Bundled (Tools\WeChatOcr\) | Invoked by OcrService; auto-locates local WeChat 4.x WeChatOcr plugin binaries and outputs bounding-box JSON over stdout |
PersonSegmentationExe.exe | On-demand R2 download (PaddleSegSharp.zip, ~101 MB) | Downloaded on first use to %LocalAppData%\ShibaPPT\Assets\Tools\PaddleSegSharp\ by RemoteAssetManager; runs 64-bit PaddleSeg MODNet portrait cutout |
FontTool.exe | On-demand R2 download (ETag auto-updated) | Downloaded to %LocalAppData%\ShibaPPT\Assets\Tools\FontTool\ for low-level font parsing and operations |
imageMso_images.json | On-demand R2 download (imageMso_images.zip) | Downloaded on first open of the Office built-in icon picker into %LocalAppData%\ShibaPPT\Assets\Config\ |
