You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| Paths |`zebra_day/paths.py`| XDG Base Directory helpers |
19
+
20
+
## CLI Rules
21
+
22
+
- The CLI uses **cli-core-yo** as its foundation. All command modules expose a `register(registry, spec)` function.
23
+
-**Global `--json/-j` flag** lives on the root callback. Do NOT add per-command `--json` flags.
24
+
- Use `output.*` primitives (`heading`, `success`, `warning`, `error`, `action`, `detail`, `bullet`, `emit_json`, `print_text`) — never raw `print()` or `console.print()` for user-facing output.
25
+
- In JSON mode, `output.error()` and other display primitives are **auto-suppressed**. Use `output.emit_json()` to emit machine-readable payloads.
26
+
- Pin cli-core-yo, typer, and rich versions per `pyproject.toml` ranges.
@@ -191,7 +209,7 @@ Opt-in shared configuration via AWS DynamoDB with S3 backup snapshots. Local-fil
191
209
| Command | Description | Key Options |
192
210
|---------|-------------|-------------|
193
211
|`zday dynamo init`| Create DynamoDB table and S3 bucket |`--table-name`, `--region`, `--s3-bucket`, `--profile`, `--cost-center`, `--project`, `--skip-checks`|
194
-
|`zday dynamo status`| Show table and S3 backup status |`--json`, `--create-s3-if-missing`|
212
+
|`zday dynamo status`| Show table and S3 backup status |`--create-s3-if-missing` (use global `--json` flag)|
195
213
|`zday dynamo bootstrap`| Push local config + templates to DynamoDB |`--config-file`, `--templates-dir`, `--include-package/--no-include-package`, `--create-s3-if-missing`|
196
214
|`zday dynamo export`| Pull DynamoDB config + templates to local files |`--output-dir`, `--format json|yaml` |
197
215
|`zday dynamo backup`| Trigger immediate S3 backup snapshot |`--create-s3-if-missing`|
@@ -239,6 +257,68 @@ zday man --list # List all topics with descriptions
239
257
zday man --search "template"# Full-text search across all docs
240
258
```
241
259
260
+
#### Printer Simulator (`zday simulator`)
261
+
262
+
A mock Zebra printer simulator for testing and development without physical printers.
263
+
The simulator responds to standard ZPL queries (`~HI`, `~HS`, `~HQSN`, `~HQOD`, `~HQES`)
264
+
on a configurable TCP port (default 9100) and serves a Zebra-like HTTP page.
265
+
266
+
```bash
267
+
# Start a simulator in the foreground (Ctrl+C to stop)
The `notes` field in discovered printers records the discovery method:
318
+
-`"zpl"` — found via ZPL port 9100 only
319
+
-`"http(80)"` — found via HTTP only
320
+
-`"zpl+http(80)"` — found via both ZPL and HTTP
321
+
242
322
#### Migration from 0.5.x
243
323
244
324
The old commands `zday_start` and `zday_quickstart` still work but are deprecated:
@@ -591,7 +671,10 @@ import zebra_day.print_mgr as zdpm
591
671
592
672
zlab = zdpm.zpl()
593
673
594
-
zlab.probe_zebra_printers_add_to_printers_json('192.168.1') # REPLACE the IP stub with the correct value for your network. This may take a few min to run. !! This command is not required if you've sucessuflly run the quickstart already, also, won't hurt.
674
+
# Scan via ZPL port 9100 (default). REPLACE the IP stub with your network.
print(zlab.printers) # This should print out the config dict of all detected zebra printers. An empty dict, {}, is a failure of autodetection, and manual creation of the config file may be needed. If successful, the lab name assigned is 'default', this may be edited later.
597
680
@@ -666,8 +749,8 @@ Returns a list of all configured lab identifiers.
Scans the network range (`{ip_stub}.0` to `{ip_stub}.255`) for Zebra printers via ZPL port 9100 and adds them to the specified lab. Optionally pass `scan_http_port=80` for HTTP fallback discovery.
0 commit comments