Commit Graph
21 Commits
Author SHA1 Message Date
Zhengshou Lai ac605c2c17 feat(mytoolkit): add voice command and improve docx post-processing
- Add voice/TTS CLI command via Volcengine WebSocket API
- Inject suppressAutoHyphens into all docx paragraphs in post-process
- Apply post-process fixes to all templates (not just default)
- Update review template: Cambria+SimSun fonts, 11pt for headings
- Sync default/review docx template formatting
2026-05-27 16:17:47 +08:00
Zhengshou Lai 32834613dd feat(convert): auto post-process default docx template
Replace _fix_docx_hr_indent with _fix_docx_postprocess that runs
automatically after pandoc when template=default. Fixes include:

- Three-line table borders (1.5pt top/bottom, 0.75pt header)
- Remove tblStyle to prevent Word from overriding borders
- Remove first-line indent inside table cells
- Add 6pt spacing before paragraphs following tables
- Apply HorizontalRule style to '---' paragraphs (no indent)
- Remove indent from empty paragraphs
- Inject HorizontalRule style into styles.xml
2026-05-19 23:04:51 +08:00
Zhengshou Lai c18d6d7d1e fix(convert): auto-load default template for md-to-docx
Remove the hard-coded `template != \"default\"` guard so that
the default reference docx template is loaded automatically
when no --reference-doc is explicitly provided.
2026-05-19 21:52:20 +08:00
Zhengshou Lai 11c0950d50 chore(webpage): remove deploy command 2026-05-08 22:52:33 +08:00
Zhengshou Lai 0317189623 refactor(templates): rename show to list for CLI consistency
Other subcommand groups (server, env, ssh, webpage, git proxy) use
`list` for enumeration; align templates with the same convention.
2026-05-08 20:56:14 +08:00
Zhengshou Lai 4cb1419720 feat(mail): add download command, stable UID fetch, MIME decode
- Add `mail download` to save attachments by IMAP UID
- Switch inbox/read/reply/forward to real IMAP UID (stable across sessions)
- Add MIME header decoding for non-ASCII filenames
- Add safe_filename() to prevent path traversal
- Use readonly mode for inbox/list/read to avoid marking unseen
2026-05-08 13:53:17 +08:00
Zhengshou Lai 4a05143bf3 fix(env): remove value masking in env list
Local-only tool; no need to hide API keys/secrets in list output.
2026-05-08 13:53:10 +08:00
Zhengshou Lai 02097a8527 feat(git): add proxy run command with auto-unset on exit
Add `git proxy run <name>` that sets proxy, runs the associated
command, and auto-restores/unsets proxy on exit or Ctrl-C.
Also fix click.Exit usage for Click 8.x compatibility.
2026-05-06 08:16:56 +08:00
Zhengshou Lai dea83774a5 feat(image): support arbitrary size and aspect ratio shortcuts for doubao generate
- --size now accepts free-form values (2K, 3K, 4K, 2304x1728, etc.)
  instead of a fixed [1K, 2K] choice.
- Add --ratio shortcut (1:1, 4:3, 3:4, 16:9, 9:16) mapping to pixel sizes.
- When both --size and --ratio are given, --size takes priority.
- Default remains 2K when neither is specified.
2026-05-05 23:43:58 +08:00
Zhengshou Lai e8ee5a4d0a feat(webpage): add server subcommand delegating to mytoolkit server
`mytoolkit webpage <project> server <action>` mirrors
`mytoolkit server <action> <project>`, so each Docusaurus project can
manage its own dev/serve lifecycle from the webpage namespace.
2026-05-05 23:31:38 +08:00
Zhengshou Lai 151b10000d refactor(webpage): swap project/action order to webpage <project> <action>
Each managed project becomes its own click subgroup, so commands now
read as `mytoolkit webpage mywebpage build` instead of
`mytoolkit webpage build mywebpage`. List remains project-agnostic.
2026-05-05 13:03:19 +08:00
Zhengshou Lai 92f8536604 feat(webpage): add push subcommand with -f flag
新增 `mytoolkit webpage push <name>` 用于推送项目源码仓库,
支持 `-f/--force` 选项(内部使用 --force-with-lease)。
2026-05-05 12:40:10 +08:00
Zhengshou Lai 55af210db7 feat(mycv): add mycv build/open commands with --lang-en option
- build: generate CV PDF from cv-zh.md / cv-en.md via Typst cv template
- open: open generated PDF with default application
- --lang-en flag switches between Chinese and English CV
2026-05-05 09:30:31 +08:00
Zhengshou Lai f2722176eb feat(webpage): add deploy, pdf subcommands and build --serve option
Migrate mywebpage/bin/mywebpage CLI features into mytoolkit:
- deploy: auto-infer GIT_USER from gh CLI or git origin
- pdf build/open: delegate to project's scripts/export-docs-pdf.py
- build --serve: serve built site after successful build
2026-05-05 09:15:19 +08:00
Zhengshou Lai c75cba9fee remove outdated commands: preflight, utils, self legacy group
preflight referenced non-existent work-order.md (replaced by agent-tasks.md).
utils only contained albany-cleanup (Albany supercomputer no longer used).
self was a legacy backward-compat group — update/uninstall are already top-level.
2026-05-05 00:19:25 +08:00
Zhengshou Lai 3e4cf618a8 refactor: restructure mytoolkit with new subcommands and md-to-pdf improvements
- Add new subcommands: convert, preflight, server, templates, webpage
- Migrate config from bin/config.json to ~/.config/mytoolkit
- Fix expand_bookmarks to modify writer objects instead of reader
- Improve md_to_pdf with CJK bookmark support
- Update README and project metadata
2026-05-04 17:19:32 +08:00
Zhengshou Lai 38328c28d0 fix(md_to_pdf): fix TOC links and bookmarks for CJK content
Three fixes:

1. Use pandoc -f markdown-citations to avoid @label citation parsing
   errors in Typst output.

2. Remove Pandoc auto-generated heading labels (<...>) from typst body.
   Without this, Typst creates named-destination links for outline
   entries. Named destinations with non-ASCII characters break in
   macOS Preview and other PDF readers.

3. Fix expand_bookmarks() to clone the full document (preserving all
   /Dest attributes) instead of rebuilding outline from scratch, which
   destroyed the bookmark hierarchy.

4. Add --root / to typst compile for consistent absolute path resolution.
2026-05-04 13:07:29 +08:00
Zhengshou Lai 7547053247 remove old config compat, use ~/.config/mytoolkit only 2026-04-26 10:50:40 +08:00
Zhengshou Lai 706286a303 migrate mail config from ~/.myclaude to ~/.config/mytoolkit 2026-04-26 10:48:35 +08:00
Zhengshou Lai 04cbd9786e add mail command (IMAP/SMTP client, no send, draft-only) 2026-04-26 10:47:38 +08:00
Zhengshou Lai c1df4098b3 refactor: rename package from mytoolkit to bin
- Move all source files from mytoolkit/ to bin/
- Update entry point and build config in pyproject.toml
- Add pillow and pypdf dependencies
- Update README and .gitignore paths
- Remove unused subprocess import in pdf.py
- Clean up duplicate imports in pdf merge command
2026-04-26 09:56:29 +08:00