Skip to content

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) and en-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") raises LanguageChanged, 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 ​

json
{
  "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 ​

LocationHelper / ManagerStored Data
HKCU\SOFTWARE\ShibAppt\*ShibaSettingsStore / ShibaModuleHostLightweight flags (language, RibbonTabPosition, radial menu engine toggle, module enable states)
%AppData%\ShibaPPT\Config\PathHelper.GetUserWritableConfigPathUser JSON configs (CircularMenu layout, Custom Ribbon layout, hotkeys, custom language packs)
Documents\ShibAppt\providers_config.jsonProviderConfigManagerAI LLMs, translation, OCR, cutout, stock photo APIs, and local app bindings (API keys obfuscated)
%LocalAppData%\ShibaPPT\RemoteAssetManager / ShibaLoggerOn-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 by OpenAiCompatibleClient, supporting Zhipu GLM, DeepSeek (including streaming reasoning_content parser), OpenAI, Qwen, Kimi, SiliconFlow, and keyless local Ollama (with /api/tags model 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, and custom-http-image.

3. Lossless Media & Text Pipelines (Core/Pipelines/) ​

1. ImagePipeline (Core/Pipelines/Image/ImagePipeline.cs) ​

Powers subject cutout, portrait segmentation, and AI upscaling:

  1. 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);
  2. Displays a cancellable ShibaProgressWebWindow and runs the bound IImageProcessor;
  3. 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 capabilities
    • image_ai: AI cutout, portrait segmentation, upscaling, and VTracer vectorization
    • svg_tools: Paper.js vector editor, Fillet & Pen tools, and Outline Stroke
    • custom_ribbon: Custom Ribbon designer and custom macro button execution
    • dev_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 BinaryDistributionInvoking Service & Integration
ClipboardReader.exeBundled (Tools\ClipboardReader\)Invoked by ClipboardGvmlApi (--getshape / --setshape) to unpack/repack Windows Art::GVML ClipFormat streams and .shiba 7z archives
ShibaVbaRunner.exeBundled + .vba shell associationAttaches to running PowerPoint via Marshal.GetActiveObject, injects .vba code into a temporary module, executes it, and removes the module in finally
vtracer.exeBundled (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.exeBundled (Tools\WeChatOcr\)Invoked by OcrService; auto-locates local WeChat 4.x WeChatOcr plugin binaries and outputs bounding-box JSON over stdout
PersonSegmentationExe.exeOn-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.exeOn-demand R2 download (ETag auto-updated)Downloaded to %LocalAppData%\ShibaPPT\Assets\Tools\FontTool\ for low-level font parsing and operations
imageMso_images.jsonOn-demand R2 download (imageMso_images.zip)Downloaded on first open of the Office built-in icon picker into %LocalAppData%\ShibaPPT\Assets\Config\