Commit Graph
29 Commits
Author SHA1 Message Date
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 4fd4477a27 style(template): update default docx with kinsoku, three-line tables and spacing
- Enable kinsoku for Chinese punctuation wrap control
- Set first-line indent to 2 characters (304800 EMU)
- Configure three-line table borders (1.5pt top/bottom, 0.75pt header)
- Add 6pt spacing after tables
- Use Cambria + SimSun font pairing
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 11f5635c94 feat(template): themed blockquotes, references, chapter-based numbering for textbook
- Add themed blockquote styles (课堂小实验, 关键洞察, etc.) via quote block
- Add #references() wrapper for bibliography formatting
- Implement chapter-based figure/table numbering (1-1, 2-1, ...)
- Start each chapter on a new page (except first)
- Increase list spacing to match long-form reading rhythm
- Fix first-line indent to apply on all paragraphs
2026-05-08 13:53:31 +08:00
Zhengshou Lai 9eafd7577f style(templates): increase list spacing for readability
Raise list/enum spacing to be ≥ leading line height across default
and manual templates, improving visual separation between items.
2026-05-08 13:53:24 +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 2791a785ff feat: add document conversion templates
Add md-to-pdf and md-to-docx templates for mytoolkit convert command.
Migrated from workspace/templates.
2026-05-06 00:11:37 +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
Zhengshou Lai 3aeaf7cb64 init 2026-04-14 18:39:09 +08:00
Zhengshou Lai 00c608a3bd feat: add interactive config wizard
- Add mycli wizard command for guided configuration
- Interactive menus for paths, SSH, API keys, Feishu apps, git proxies
- User-friendly prompts with numbered choices
- Support add/edit/delete operations via wizard
- Hide sensitive input (API keys, secrets)
- Confirm before destructive operations
2026-04-13 11:53:27 +08:00
Zhengshou Lai 469aefb71f chore: remove config.json from git (contains secrets) 2026-04-13 11:42:01 +08:00
Zhengshou Lai bd167cfb6d feat: add API keys management and config CRUD operations
- Add api_keys and feishu_apps to config.json
- Add env export/init commands for shell integration
- Add config CRUD: list, set, delete, init
- Add config.json.example template
- Add config.json to .gitignore for security
- Update README with new commands

Usage:
  mycli env export              # Export all env vars
  mycli config set key value    # Set config value
  mycli config delete key       # Delete config key
2026-04-13 11:41:57 +08:00
Zhengshou Lai 5a55b4a60d Add .gitignore 2026-04-13 11:38:08 +08:00
Zhengshou Lai ab8067f0c5 Initial commit: mycli toolkit with all commands 2026-04-13 11:38:01 +08:00