added new and add commands for local logic

This commit is contained in:
2026-02-08 15:18:49 -05:00
parent 6565a8546f
commit 122b7ea348
7 changed files with 337 additions and 74 deletions

View File

@@ -104,7 +104,27 @@ wp-materialize local /path/to/output
Notes:
1. The local export assumes every post is new and generates create commands.
2. Categories must already exist in WordPress for exact commands.
2. The local export does not call WordPress or resolve category IDs.
Create placeholder config or manifest:
```bash
wp-materialize new --config
wp-materialize new --config /path/to/config.json
wp-materialize new --manifest /path/to/content
```
Add files or subdirectories to a manifest (no evaluation):
```bash
wp-materialize add-file /path/to/content/post.md
wp-materialize add-file /path/to/content/post.md /path/to/content
wp-materialize add-file /path/to/content/post.md --current
wp-materialize add-subdir /path/to/content/notes
wp-materialize add-subdir /path/to/content/notes /path/to/content
wp-materialize add-subdir /path/to/content/notes --current
```
## Manifests
@@ -116,6 +136,11 @@ Each managed directory must contain a `.wp-materialize.json` manifest. See `conf
2. Packages:
- `Markdown>=3.6`
## System Prerequisites
1. `wp` CLI must be installed and available in PATH for `apply`.
2. `local` does not require `wp`.
Install dependencies:
```bash