Introduction¶
It has always been a challenge in Agent development to have an agent produce a deliverable presentation directly. The common approach is to let the model output Markdown or an outline, and then manually apply templates for formatting; if you want to generate PPTX directly, you have to deal with the complex OOXML format, which is prone to errors.
dsh-np-ppt consolidates this into the DSH (DeepSeek Harness) plugin ecosystem: using a YAML-based PPTD DSL to describe slides, combined with a local visual editor and Python-PPTX compilation kernel, the process of generating from conversation to exporting PPTX is completed on a unified pipeline. Below is an introduction to the positioning, core capabilities, and installation and usage methods of this plugin.
What is this¶
dsh-np-ppt is a native DSH PPT presentation expert plugin, authored by GitHub user z953218350, under the MIT license, version 1.0.0. In one sentence: built-in PPTD DSL engine, 55173 WYSIWYG visual editor, Python-PPTX high-fidelity offline compilation kernel, and one-click PPTX export.
DSH’s philosophy is “Everything is a plugin”; plugins can inject system prompts, register Agent tools, and extend the Web frontend. This plugin works under the same mechanism: after loading, it adds a “PPT Presentation Expert” Agent preset in the DSH Web GUI, automatically injecting the system prompt to give the AI the ability to create presentations directly; at the same time, it copies the preset file to ~/.dsh/.agent-presets/np-ppt/ for easy offline reuse.
Core Features¶
PPTD DSL Engine¶
PPTD uses YAML syntax to describe slides with a standard 16:9 canvas. Pages are modularly split by file, from 01_cover.page to XX_final.page, with each page being independent and self-contained. During compilation, fade transitions are automatically added to all slides.
55173 WYSIWYG Visual Editor¶
The plugin includes a lightweight local Web editor, accessible at http://127.0.0.1:55173/, supporting multi-level nested rich text editing, free drag-and-drop alignment, and real-time rendering.
The export dialog is linked: clicking “Download” triggers the local Python-PPTX compilation engine to generate the file directly; selecting “Image” keeps the native image slicing for download.
Python-PPTX High-Fidelity Offline Compilation Kernel¶
The compilation kernel is located at compiler/export_pptx.py and runs offline. Based on the RichTextHTMLParser state machine, it parses rich text and supports HTML tags with infinite nesting levels (span, strong, b, em, i, u, br), with full color format support for #HEX, rgb(), rgba(), and $theme.
Several fidelity measures were implemented on the output side: locking the Microsoft YaHei font family, DrawingML gradient backgrounds, and noAutofit text boxes to prevent scaling.
9 Major Professional Visual Style Systems¶
Built-in nine visual styles:
- Business Management Style
- Deep/Light Code Style
- High-Energy Growth Style
- Glowing Purple-Green Style
- Cool White Research Style
- Light Neumorphism Style
- Black Gold Experimental Style
- Chromatic Chart Style
- Deep Blue Magazine Style
Agent Tools and Frontend Extensions¶
The plugin registers native Agent Tools (e.g., ppt_export, ppt_serve) and provides DSH Web frontend plugin extensions via client injection.
Installation and Activation¶
First, confirm the environment: You need a DSH environment where dsh command is installed and runnable; Node.js 16+ (18+ recommended), the plugin is pre-compiled ESM, the lib/ directory is ready-to-use without building; Python 3.x, with py -3 / python3 / python being callable.
It is recommended to mount via the DSH command line; execute in the terminal:
dsh plugin --profile web add link:<项目路径>
<项目路径> refers to the local directory path of the plugin; replace it according to the actual location. When adding under the pnpm workspace root directory, you may need to append the -w / --workspace-root parameter:
dsh plugin --profile web add -w link:<项目路径>
If you do not use the command line, you can also configure manually: add in ~/.dsh/profiles/web/cordis.patch.yml:
- insert:
- id: dsh-np-ppt
name: 'dsh-np-ppt'
Then create a symbolic link pointing to the project path under ~/.dsh/profiles/web/node_modules/: use Junction / mklink /J on Windows, and ln -s on macOS and Linux.
After installation, you need to restart the web profile: press Ctrl+C in the terminal running dsh web, then re-execute dsh web, and the plugin will be loaded and effective.
Regarding Python dependencies: pyyaml and python-pptx will be automatically installed via pip on the first run of the compiler; environments without network or pip can manually execute:
pip install pyyaml python-pptx
Typical Usage¶
Conversation-Driven Generation¶
Switch to the “PPT Presentation Expert” preset in the DSH Web GUI and chat directly with the AI, for example:
帮我用科技蓝风格做一份 8 页的《微服务架构重构技术方案》
This preset comes with complete PPTD DSL writing specifications, explanations of the 9 major style themes, and guidance on linking local compilation with the 55173 editor.
Local Visual Editing and Export¶
After installing the plugin via the steps above, you can make visual adjustments in the browser:
- Open
http://127.0.0.1:55173/in the browser; - Click “Open PPTD Folder”, authorize and select the project directory containing
deck.pptd; - Modify text directly on the page, adjust layout, and view rendering effects in real-time;
- Click “Export” in the top right corner -> Select PPT -> Click “Download” to download the PPTX slides.
Direct Compilation via Command Line¶
When an editor is not needed, you can run the built-in compiler directly in the PPTD project directory:
py -3 <项目路径>/compiler/export_pptx.py deck/deck.pptd --output deck/deck.pptx --force
On macOS / Linux, replace py -3 with python3. On the first run, if pyyaml / python-pptx are missing, the script will automatically install them via pip.
Suitable Scenarios and Precautions¶
Suitable scenarios:
- Users already using DSH who want to directly produce deliverable PPTX via conversation;
- Workflows requiring visual micro-adjustments locally after generation and then compiling and exporting;
- Environments wishing to compile offline without depending on online conversion services.
Precautions before use:
- Browser requirements: The 55173 editor uses File System Access API capabilities like
window.showDirectoryPicker()to authorize local directory read/write; Chrome / Edge and other desktop browsers that support this API are recommended. Browsers that do not support this API will downgrade to a read-only upload mode. The browser is not required if only performing “conversation generation + command line compile and export PPTX”. - Permissions and security: The plugin runs with the permissions of the current
dshprocess. It is recommended to read the project source code and license (MIT) before installing to confirm acceptability before mounting. - Manual installation: The method for creating symbolic links varies by system: use Junction /
mklink /Jon Windows, andln -son macOS and Linux.
Conclusion¶
dsh-np-ppt strings together conversation generation, local visual editing, and offline compilation and export into a single pipeline: for DSH users, loading a plugin adds a “PPT Presentation Expert” to the Web GUI, and the output is a standard PPTX file that can directly enter the subsequent usage process.
Project address and directory page:
- GitHub: https://github.com/z953218350/dsh-np-ppt
- Community Plugin Directory: https://www.skillhub.cn/plugins/z953218350/dsh-np-ppt
(The directory is a site independently maintained by the community and has no official affiliation with DeepSeek.)