Prepare v12.1 release

This commit is contained in:
fedora-bot
2026-04-25 11:28:55 +03:00
parent 025cce4f6c
commit 768f8cf7b4
3 changed files with 32 additions and 5 deletions

3
.gitignore vendored
View File

@@ -25,3 +25,6 @@ scicam_capture_base64.txt
# Local device config
scicam/.env
# Tokens
tok

View File

@@ -22,12 +22,15 @@ cd scicam
adb install app/build/outputs/apk/debug/app-debug.apk
```
Min SDK 24, target SDK 34, JVM 17.
- Min SDK 24, target SDK 34, JVM 17.
- Build files are **Groovy DSL** (`.gradle`), not Kotlin DSL.
## API
Server runs on device port `8080`. Device IP is shown in the app UI.
`api_spec.yaml` at repo root is the OpenAPI 3.0 source of truth for endpoints.
| Endpoint | Method | Purpose |
|----------|--------|---------|
| `/api` | GET | API metadata |
@@ -49,19 +52,40 @@ Run the API client test suite against a device on the same network:
./scicam_api_test.sh <device-ip>
```
Add new API endpoints to this script as they are added to `SciCamApiServer.kt`.
- Requires `jq` (used to parse capture-filename responses).
- Add new API endpoints to this script as they are added to `SciCamApiServer.kt`.
## Architecture Notes
- `MainActivity.kt` implements `SciCamApiServer.ApiListener`. The server posts camera control to the UI thread but reads state fields directly.
- Images → `Pictures/SciCam/` (MediaStore, visible over MTP). Sidecars → `Documents/SciCam/`.
- `MetadataLogger.kt` builds sidecar JSON with EXIF + `camera_settings`.
- BoofCV is wired in for in-preview QR detection (replaced ZXing Activity hop). CameraX + MediaStore storage unchanged.
- BoofCV is wired in for in-preview QR detection (replaced the ZXing Activity hop). CameraX + MediaStore storage unchanged.
- `capture()` blocks up to 5 s waiting for the CameraX callback; curl callers should still use `--max-time 15`.
## Clients
Cross-platform API clients live in `clients/` as Git submodules. Upstreams point to `git.tami.sh`. On a fresh clone, run `git submodule update --init`.
Cross-platform API clients live in `clients/` as Git submodules. Upstreams point to Gitea `tami/` org. On a fresh clone, run:
```bash
git submodule update --init
```
## Gitea Workflow
- Remotes point to `https://git.telavivmakers.space`. The **tami** org owns all repos (`tami/timi`, `tami/go-scicam`, `tami/web-scicam`).
- Token lives at `~/.config/timi/gitea-token`. `~/.bashrc` exports it as `GITEA_SERVER_TOKEN`.
- No `tea` CLI installed. For API operations (create/delete repos, transfer), use raw `curl` against the Gitea REST API:
```bash
curl -s -X POST "https://git.telavivmakers.space/api/v1/org/tami/repos?token=$(cat ~/.config/timi/gitea-token)" \
-H "Content-Type: application/json" -d '{"name":"repo-name","private":false}'
```
- **HTTPS push** requires embedding the token in the URL, then stripping it afterward so credentials are not written to `.git/config`:
```bash
git remote set-url origin "https://$(cat ~/.config/timi/gitea-token)@git.telavivmakers.space/tami/REPO.git"
git push -u origin master
git remote set-url origin https://git.telavivmakers.space/tami/REPO.git
```
### Go CLI (`clients/go-scicam/`)
@@ -79,7 +103,7 @@ go test ./...
./go-scicam photo -filename=20260101_120000_ITEM.jpg -o output.jpg
```
The CLI reads default values from `scicam/.env` in the working directory (e.g. `scicam_host_ip`). The `SCICAM_HOST` environment variable overrides the file. `scicam/.env` is gitignored.
The CLI reads default values from `scicam/.env` in the current working directory (key `scicam_host_ip`). The `SCICAM_HOST` environment variable overrides the file. `scicam/.env` is gitignored.
### Web Client (`clients/web-scicam/`)

BIN
scicam/visual/qr_test.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB