feat: add journal submission kits + paper scaffold; restructure package
- init journal <elsevier|ieee|springer>: self-contained, make-buildable kits (Springer sn-jnl.cls + bst bundled; reuses project references.bib) - init paper scaffold: ctexart + Fandol fonts, bib at root, latexdiff highlighted - move templates/ under mytoolkit/, add info/references, relocate protocols - migrate mytoolkit skill into submodule; update README/CLAUDE docs
This commit is contained in:
@@ -5,20 +5,33 @@ Personal CLI toolkit — unified entry point for everyday file conversion, forma
|
||||
## Install
|
||||
|
||||
```bash
|
||||
make install # builds + symlinks ~/.local/bin/mytoolkit
|
||||
make install # install CLI + sync bundled Claude skill
|
||||
mytoolkit --version
|
||||
mytoolkit templates register ~/workspace/contrib/mytoolkit/templates # one-time, points at template root
|
||||
mytoolkit templates list # verify bundled templates are found
|
||||
```
|
||||
|
||||
`make install` 会同时:
|
||||
1. 用 editable 模式安装 `mytoolkit`;
|
||||
2. 生成 zsh/bash 补全;
|
||||
3. 把 bundled Claude skill 同步到 `~/.claude/skills/mytoolkit/`。
|
||||
|
||||
单独同步 skill(不重装 Python 包):
|
||||
|
||||
```bash
|
||||
make sync-skill
|
||||
```
|
||||
|
||||
## Update
|
||||
|
||||
The installed Python package is **not** refreshed automatically when the source tree changes. After editing source files, or after `git pull` / `git submodule update`, rerun:
|
||||
The installed Python package and the bundled Claude skill are **not** refreshed automatically when the source tree changes. After editing source files, skill docs, or after `git pull` / `git submodule update`, rerun:
|
||||
|
||||
```bash
|
||||
make install # or: mytoolkit update
|
||||
mytoolkit --version # verify the new version is active
|
||||
```
|
||||
|
||||
If you only changed skill files (`SKILL.md` / `references/`), `make sync-skill` is enough.
|
||||
|
||||
## Top-level commands
|
||||
|
||||
```bash
|
||||
@@ -28,6 +41,8 @@ mytoolkit --help
|
||||
| Command | What it does |
|
||||
|---------|--------------|
|
||||
| `convert` | Universal format conversion (md/img/pdf/eps/avi/bib → pdf/docx/tiff/mp4/md). Auto-detects from extensions. |
|
||||
| `init` | Initialize projects/kits from bundled templates (`mytoolkit init paper <dir>`, `mytoolkit init journal <name>`) |
|
||||
| `info` | Show bundled resource paths (`info paths`, `info docs <name>`) |
|
||||
| `pdf` | `compress` / `crop` / `merge` / `bookmark` / `to-tiff` |
|
||||
| `image` | `compress` / `eps-fix` / `eps-to-pdf` / `jpg-to-pdf` / `tiff-to-pdf` / `tiff-compress` / `generate` (Doubao/Seedream) |
|
||||
| `latex` | `compile` / `count` |
|
||||
@@ -35,7 +50,7 @@ mytoolkit --help
|
||||
| `video` | `avi-to-mp4` |
|
||||
| `webpage` | Docusaurus build/list/rebuild/push |
|
||||
| `mail` | IMAP/SMTP client (read/draft/forward/reply, no auto-send) |
|
||||
| `templates` | Register and inspect external template root |
|
||||
| `templates` | Inspect template root; external override still possible |
|
||||
| `env` | Manage stored vars (api keys, paths, feishu app credentials) |
|
||||
| `ssh` | `list` / `connect` / `tunnel` / `cmd` |
|
||||
| `git` | `proxy` (set/unset/list/status) |
|
||||
@@ -47,19 +62,42 @@ For any subcommand: `mytoolkit <cmd> --help`.
|
||||
|
||||
## Templates
|
||||
|
||||
`mytoolkit convert -t <name>` reads templates from an external directory you register (templates are not bundled). Layout:
|
||||
`mytoolkit convert -t <name>` reads templates bundled with the package by default. External overrides are still supported via `mytoolkit templates register`.
|
||||
|
||||
Bundled layout:
|
||||
|
||||
```
|
||||
<root>/md-to-pdf/<name>/template.typ
|
||||
<root>/md-to-docx/<name>/template.docx
|
||||
mytoolkit/templates/md-to-pdf/<name>/template.typ
|
||||
mytoolkit/templates/md-to-docx/<name>/template.docx
|
||||
```
|
||||
|
||||
```bash
|
||||
mytoolkit templates register /path/to/templates
|
||||
mytoolkit templates list # lists each template with its absolute path
|
||||
mytoolkit templates list # lists bundled templates with absolute paths
|
||||
mytoolkit templates register /path/to/templates # optional external override
|
||||
```
|
||||
|
||||
Registry is stored at `~/.mytoolkit/templates.json` (or `$MYTOOLKIT_HOME/templates.json`).
|
||||
Registry is stored at `~/.mytoolkit/templates.json` (or `$MYTOOLKIT_HOME/templates.json`). When the registry is missing or invalid, mytoolkit falls back to the bundled templates.
|
||||
|
||||
## Project scaffolds
|
||||
|
||||
```bash
|
||||
mytoolkit init paper <dir> # create a LaTeX paper project (ctexart + Fandol fonts)
|
||||
```
|
||||
|
||||
This generates `main.tex`, `Makefile`, `references.bib`, `diffpreamble.dtx`, `figs/`, `analysis/`.
|
||||
|
||||
### Journal submission kits
|
||||
|
||||
```bash
|
||||
mytoolkit init journal # list available kits
|
||||
mytoolkit init journal elsevier # -> ./submit-elsevier/
|
||||
mytoolkit init journal ieee mydir # custom target dir
|
||||
```
|
||||
|
||||
Kits (`elsevier` / `ieee` / `springer`) are self-contained — `main.tex`, a
|
||||
pdflatex+bibtex `Makefile`, and any non-bundled class files (Springer's
|
||||
`sn-jnl.cls` + `bst/`). Each compiles standalone with `make`, and reuses the
|
||||
current directory's `references.bib` if present.
|
||||
|
||||
## User config
|
||||
|
||||
|
||||
Reference in New Issue
Block a user