dsh-panda-calendar
会话页头的「熊猫日历」标签页:公历/农历、干支、生肖、24 节气、传统与外国节日、中国法定节假日(含调休)、多城市天气、时间戳转换(秒/毫秒 ↔ 年月日时分秒,可选时区)与内置离线的「历史上的今天」,数据免费、无需 API Key。
安装
dsh plugin --profile web add dsh-panda-calendar
沙箱测试结果
| 阶段 | 结果 |
|---|---|
| 1 安装 | ✓ |
| 2 列装 | ✓ |
| 3 挂载 | ✓ |
| 4 启动 | — |
四阶段在隔离沙箱里跑:安装(有网)→ 列装 → 挂载 → 启动(后三步断网)。
README
dsh-panda-calendar
<p align="center">
<a href="https://github.com/runcat-tommy/dsh-panda-calendar/blob/main/README.md"><strong>简体中文</strong></a> ·
</p>
A token-free calendar & weather plugin for DeepSeek Harness Web. Adds a "Panda Calendar (熊猫日历)" tab to the session header (next to 对话/Chat, Trajectory and 诗词/Poetry, right after Poetry), giving you solar/lunar dates, ganzhi, Chinese zodiac, solar terms, festivals, China public holidays (incl. make-up workdays), multi-city weather, an ⏱ epoch converter and 📜 on-this-day history in one place.
<p align="center"><img src="https://raw.githubusercontent.com/runcat-tommy/dsh-panda-calendar/main/assets/preview-en.jpg" alt="Panda Calendar preview" width="85%"></p>
- Lunar engine: built-in offline data tables for 1900–2100, generated from and validated day-by-day against lunar-javascript (6tail, MIT) — works offline, no API key
- Public holidays: free public feed holiday-cn (MIT, based on State Council announcements) with built-in 2025/2026 snapshots plus rule-based fallback
- Weather / geolocation: Open-Meteo (current + 3-day), BigDataCloud reverse geocoding, ip-api.com fallback — all free, no sign-up, no API key
- Pure front-end (no backend); state stays local
- Requires a
dsh webbuild that supports client plugins (same mechanism as dsh-chinese-poetry)
Features
- Today card: local solar date/weekday → lunar (labelled Beijing time) · ganzhi year/month/day · zodiac → solar terms → festival chips (Chinese primary, English in tooltip) → 🇨🇳 statutory status (off / make-up workday, incl. "holiday day N/M") → ✍ Send to chat (writes the day summary into the input box; press Enter to hand it to the AI)
- 📜 On this day: a collapsible section in the today card showing ~3 events + 4–6 curated notable births for the date (historical figures first); the collapsed state already shows the first entry (click it to expand) and the right-hand control is a solid primary button reading "Show all N ▾ / Collapse ▴" (same treatment as the timestamp card's "Now" button: solid fill, 8px radius, shadow, 13px/600); backed by a built-in 366-day offline snapshot (incl. 2/29, fully usable on mainland networks with no Wikipedia access), auto-enhanced with the latest on-this-day content from the Chinese Wikipedia when reachable (12 h cache); source noted as CC BY-SA
- Month grid: 6×7 calendar with solar day + lunar/term/festival subtitle per cell; red 休 / grey 班 statutory badges; today outlined; click any day to inspect it in the today card (cross-month clicks jump months)
- City weather: locate chain (browser geolocation → ip-api.com → default cities) + manual city search (Open-Meteo Geocoding with
language=zh, country disambiguation), switch/remove cities, current + 3-day, refresh — the city list and active city persist to localStorage, surviving plugin updates and reinstalls - Public holidays: red = off day, grey = make-up workday; unpublished/offline years fall back to snapshots and rule tables, with the data source noted
- ⏱ Timestamp converter (its own card below the weather card, computed purely on the client, works offline): timestamp → date (auto-detects 10-digit seconds vs 13-digit milliseconds, or set the unit yourself) and date → timestamp (Y/M/D h:m:s → epoch seconds or milliseconds); a time-zone selector in the card (Local / UTC / Beijing-Shanghai / Hong Kong / Taipei / Tokyo / Singapore / New Delhi / Dubai / Moscow / London / Paris / New York / Chicago / Los Angeles / Sydney, offsets resolved through
Intlso DST is handled); results include weekday, UTC offset, ISO 8601 (UTC) and one-click copy - Bilingual UI: zh/en follows the dsh UI language
Install
Option 1: npm package (once published)
dsh plugin --profile web add dsh-panda-calendar
Option 2: from source (development)
cd dsh-panda-calendar dsh plugin --profile web add .
For live development use a linked install (source changes take effect after a Web UI restart):
dsh plugin --profile web add link:.
Restart dsh web after installing, open any session — the Panda Calendar tab appears in the header bar.
If you don't have pnpm yet:npm i -g pnpm(dsh plugindepends on pnpm).
Usage
1. Open a session and click the Panda Calendar tab.
2. The today card shows today's lunar date, ganzhi, zodiac, terms, festivals and statutory status; "📜 On this day" already previews its first entry while collapsed — click that preview or the "Show all N ▾" pill to reveal every event and notable birth ("Collapse ▴" folds it back).
3. Click ✍ Send to chat to drop that day's summary into the input box (it is not sent automatically); switch back to Chat and press Enter to have the AI elaborate.
4. Flip months, use Today, or click any day for details; add/switch cities from the weather card.
5. ⏱ Timestamp converter (below the weather card): switch to "Timestamp → Date" and paste a 10-digit (seconds) or 13-digit (milliseconds) value to get the full date & time instantly; switch to "Date → Timestamp" and fill in Y/M/D h:m:s to get epoch seconds and milliseconds. Both share the time-zone selector in the card header (Local / UTC / Beijing-Shanghai / Hong Kong / Taipei / Tokyo / Singapore / New Delhi / Dubai / Moscow / London / Paris / New York / Chicago / Los Angeles / Sydney, DST-aware); results include ISO 8601 (UTC) and one-click copy.
Data sources & credits
Data · Source · License
Lunar / ganzhi / zodiac / terms (built-in 1900–2100 tables) · 6tail/lunar-javascript · MIT
China public holidays (yearly JSON, State Council basis) · [imldres/holiday-cn](https://
…(truncated)
以上内容来自 npm 上的 README,我们只做格式化,不改内容。
版本
npm 上共发布:8,最后更新 2026-10-16