Skip to content
dsh.fish
Bundle

dsh-jmcomic

DeepSeek Harness plugin: a "comic" trigger in the sidebar foot that opens search/download, an importable local library, and an in-modal manga reader. Bundles the jmcomic source so it works without the jmcomic PyPI package.

Source
lywusichen
stars
3 stars
License
MIT
Updated
Updated 22 hours ago

Readme

# dsh-jmcomic

English | [简体中文](README.zh.md)

A [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) plugin.
Adds a comic button to the sidebar: search and download from JMComic (18comic),
browse a local library, and read inside a window without leaving DSH.

The plugin bundles the download engine and the reader frontend, so it works
without installing the jmcomic PyPI package.

## Compatibility

Tested on **DSH 0.1.5-rc.1** (web profile). Also runs on 0.1.2-rc.1 — those two
releases are what `dsh.engines.dsh` in `package.json` declares, so a host or
plugin manager can read the same range without parsing this file.

Uses the `sidebar.footer.action` and `settings.section` slots, the host's
`workspaces.pickDirectory`, and `webServer.register` for its local routes. The
DSH core is not modified.

## Install

1. Add the plugin:

   ```bash
   dsh plugin --profile web add github:lywusichen/dsh-jmcomic
   ```

2. Restart DSH.

3. A comic button appears in the sidebar foot, above the skills button. On first
   use it asks for a local library folder; set the Python path in **Settings →
   jmcomic Settings** if it is not detected.

## What it does

- **Small panel** — search by album ID or title and download. Once a local
  folder is bound, the panel shows the two or three most recent covers; click
  one to start reading.
- **Library window** — a grid of everything in the local folder. Click a cover
  to see its chapter list.
- **Reader** — drag any edge or corner to resize, drag the title bar to move.
  Size and position are remembered. Reopening an album returns to the chapter
  and page you were last on, and the footer has a page jump box.
- Hover a card to reveal a delete button. Only albums inside the base folder can
  be deleted; the root and system directories are protected.
- A `downloading` banner appears at the top while a download runs.

## Screenshots

![Sidebar comic trigger](assets/comic-trigger.png)

![Small panel: search and local covers](assets/comic-pop.png)

![Library window](assets/comic-library.png)

## Offline operation

The plugin ships four things under `vendor/`, so a machine with only DSH and
Python can run it:

- `jmcomic` 2.7.3 source — the download engine
- `commonX` — the engine's support package
- `jmcomic-ai` — helper scripts
- the reader frontend

Missing binary dependencies degrade instead of failing:

| Missing | Behavior |
|---|---|
| curl_cffi | falls back to `requests` |
| Pillow | no image decoding; files download but cannot be previewed |
| pycryptodome | prompts to install it |

## Known limitations

- Python is required. The plugin calls a Python bridge; it does not reimplement
  the download engine in JavaScript.
- Downloads talk to JMComic's mobile API domain directly, so no proxy or
  Cloudflare workaround is needed. If that domain is blocked on your network,
  the plugin has no fallback.
- The plugin does not manage your library for you: it downloads into the folder
  you bind and reads what is there.

## Build

```bash
npm install   # esbuild
npm run build # generates lib/client.js and lib/server.cjs
```

Commit both artifacts. Git-hosted installs consume them directly.

## Configuration

- Settings file: `~/.dsh/plugins/dsh-jmcomic/settings.json` (Windows)
- Directory rule: `Bd/{Atitle}/第{Pindex}話`
- Concurrency is kept low on purpose: 3 for images, 1 for photo albums.

## Credits

The download engine, the reader frontend, and some helper scripts come from
hect0x7's projects, vendored under `vendor/`:

- [JMComic-Crawler-Python](https://github.com/hect0x7/JMComic-Crawler-Python) — download engine
- [jm-view-server](https://github.com/hect0x7/jm-view-server) — reader frontend
- [jmcomic-ai](https://github.com/hect0x7/jmcomic-ai) — helper scripts

Copyright belongs to their respective authors.

## License

[MIT](LICENSE)

Install

dsh plugin --profile web add github:lywusichen/dsh-jmcomic

Profile: web

  • This package builds from source on install. pnpm will ask you to allow its build script — that is permission to run the package’s code on your machine, outside the agent sandbox. Only allow sources you trust.
  • This source has no pinned commit, so a later push upstream changes what installs. Prefer pinning a commit.
Source