add: meal ingestion CLI for images and metadata
All checks were successful
Deploy on push / deploy (push) Has been skipped
All checks were successful
Deploy on push / deploy (push) Has been skipped
This commit is contained in:
17
README.md
17
README.md
@@ -14,6 +14,7 @@ The site is based on the HTML5 UP Lens template and currently ships as a plain s
|
||||
- `data/meals.json`: source of truth for gallery entries
|
||||
- `scripts/build.js`: renders static pages from templates and data
|
||||
- `scripts/generate-thumbnails.js`: regenerates thumbnails from the full-size images
|
||||
- `scripts/ingest-meal.js`: ingests a new meal image and metadata in one command
|
||||
- `package.json`: minimal Node build entrypoint
|
||||
|
||||
## Content Workflow
|
||||
@@ -28,6 +29,17 @@ npm run build
|
||||
|
||||
The build currently renders the main page without changing the existing Lens gallery structure, so the current client-side viewer code continues to work.
|
||||
|
||||
To ingest a new meal image and update the site in one command, run:
|
||||
|
||||
```sh
|
||||
npm run ingest -- --image /path/to/photo.jpg --title "meal title" --description "notes"
|
||||
```
|
||||
|
||||
Optional ingestion flags:
|
||||
|
||||
- `--position "left center"` sets the viewer image alignment
|
||||
- `--focus-x 0.35 --focus-y 0.45` sets the thumbnail crop focal point
|
||||
|
||||
If you only need to regenerate thumbnails, run:
|
||||
|
||||
```sh
|
||||
@@ -73,6 +85,5 @@ The `x` and `y` values are normalized from `0` to `1`, where `0.5, 0.5` is the c
|
||||
|
||||
## Planned Features
|
||||
|
||||
1. Automatic image ingestion, potentially with a stronger data model if the static workflow becomes too limiting.
|
||||
2. An Elo-style ranking page that shows two food images at a time and updates rankings automatically based on the selected winner.
|
||||
3. General cleanup and history cleanup once the bigger structural changes are in place.
|
||||
1. An Elo-style ranking page that shows two food images at a time and updates rankings automatically based on the selected winner.
|
||||
2. General cleanup and history cleanup once the bigger structural changes are in place.
|
||||
|
||||
Reference in New Issue
Block a user