cameradeck 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. cameradeck-0.1.0/.gitignore +12 -0
  2. cameradeck-0.1.0/.node-version +1 -0
  3. cameradeck-0.1.0/PKG-INFO +145 -0
  4. cameradeck-0.1.0/README.md +131 -0
  5. cameradeck-0.1.0/UPDATE.md +413 -0
  6. cameradeck-0.1.0/__init__.py +1 -0
  7. cameradeck-0.1.0/app.py +794 -0
  8. cameradeck-0.1.0/camera.py +761 -0
  9. cameradeck-0.1.0/catalog.py +228 -0
  10. cameradeck-0.1.0/deploy/90-cameradeck-power.rules +13 -0
  11. cameradeck-0.1.0/deploy/cameradeck.service +19 -0
  12. cameradeck-0.1.0/frontend/components.json +17 -0
  13. cameradeck-0.1.0/frontend/index.html +13 -0
  14. cameradeck-0.1.0/frontend/licenses/react-remove-scroll-bar.txt +25 -0
  15. cameradeck-0.1.0/frontend/package-lock.json +2411 -0
  16. cameradeck-0.1.0/frontend/package.json +33 -0
  17. cameradeck-0.1.0/frontend/src/Camera.tsx +495 -0
  18. cameradeck-0.1.0/frontend/src/Library.tsx +700 -0
  19. cameradeck-0.1.0/frontend/src/Transfer.tsx +386 -0
  20. cameradeck-0.1.0/frontend/src/api.ts +77 -0
  21. cameradeck-0.1.0/frontend/src/components/ui/button.tsx +34 -0
  22. cameradeck-0.1.0/frontend/src/components/ui/dialog.tsx +34 -0
  23. cameradeck-0.1.0/frontend/src/components/ui/input.tsx +9 -0
  24. cameradeck-0.1.0/frontend/src/lib/utils.ts +5 -0
  25. cameradeck-0.1.0/frontend/src/main.tsx +507 -0
  26. cameradeck-0.1.0/frontend/src/style.css +1024 -0
  27. cameradeck-0.1.0/frontend/src/types.ts +84 -0
  28. cameradeck-0.1.0/frontend/tsconfig.json +14 -0
  29. cameradeck-0.1.0/frontend/vite.config.ts +7 -0
  30. cameradeck-0.1.0/health.py +65 -0
  31. cameradeck-0.1.0/power.py +41 -0
  32. cameradeck-0.1.0/pyproject.toml +89 -0
  33. cameradeck-0.1.0/quality.py +528 -0
  34. cameradeck-0.1.0/scripts/check-idle.py +129 -0
  35. cameradeck-0.1.0/scripts/check-package.py +90 -0
  36. cameradeck-0.1.0/scripts/frontend.py +137 -0
  37. cameradeck-0.1.0/scripts/package_build.py +17 -0
  38. cameradeck-0.1.0/static/dist/.build.json +1 -0
  39. cameradeck-0.1.0/static/dist/THIRD_PARTY_LICENSES.txt +1126 -0
  40. cameradeck-0.1.0/static/dist/assets/index-CJ2AAG0A.css +1 -0
  41. cameradeck-0.1.0/static/dist/assets/index-lfzFqxJr.js +167 -0
  42. cameradeck-0.1.0/static/dist/index.html +14 -0
  43. cameradeck-0.1.0/transfer.py +232 -0
@@ -0,0 +1,12 @@
1
+ .venv/
2
+ __pycache__/
3
+ .pytest_cache/
4
+ media/
5
+ .env
6
+ *.log
7
+ test-results/
8
+ .amp/portals/*
9
+ frontend/node_modules/
10
+ frontend/*.tsbuildinfo
11
+ static/dist/
12
+ static/.frontend-*/
@@ -0,0 +1 @@
1
+ 22.23.3
@@ -0,0 +1,145 @@
1
+ Metadata-Version: 2.5
2
+ Name: cameradeck
3
+ Version: 0.1.0
4
+ Summary: Local-first Raspberry Pi camera console built on Picamera2 and libcamera
5
+ Project-URL: Homepage, https://github.com/markosnarinian/cameradeck
6
+ Project-URL: Issues, https://github.com/markosnarinian/cameradeck/issues
7
+ Requires-Python: >=3.11
8
+ Requires-Dist: av>=18.1.0
9
+ Requires-Dist: flask<4,>=3.1
10
+ Requires-Dist: numpy<3,>=2
11
+ Requires-Dist: pillow>=9
12
+ Requires-Dist: waitress<4,>=3
13
+ Description-Content-Type: text/markdown
14
+
15
+ # CameraDeck
16
+
17
+ A browser-based camera console for Raspberry Pi. Take full-resolution photos,
18
+ run continuous capture, browse your library, and copy files off the Pi—all on
19
+ your local network.
20
+
21
+ CameraDeck uses Picamera2 and libcamera. The web UI is served by the Pi; it needs
22
+ no cloud account, CDN, or internet connection once installed.
23
+
24
+ ## What it does
25
+
26
+ - **Capture:** single photos or continuous capture, defaulting to 5 photos/s.
27
+ Actual throughput depends on your camera, exposure, and storage.
28
+ - **Camera controls:** live preview, exposure, gain, white balance, focus where
29
+ supported, and mounting orientation.
30
+ - **Library:** thumbnails, full-size viewing, range selection across pages,
31
+ original/metadata downloads, ZIP downloads, and deletion with progress.
32
+ - **Transfers:** push your media to another machine over SSH with rsync, or copy
33
+ it to a local mounted drive. Transfers continue after you close the browser.
34
+ - **Status:** free disk space, CPU temperature, and Pi throttling warnings.
35
+
36
+ Capture is photo-only. Existing video files from older versions remain viewable.
37
+
38
+ ## Requirements
39
+
40
+ - A Raspberry Pi running **64-bit Raspberry Pi OS Trixie (Debian 13)**.
41
+ - A working Picamera2/libcamera camera: check `rpicam-hello --list-cameras`.
42
+ - Python 3.11 or newer, reliable power, and enough storage for your photos.
43
+
44
+ CameraDeck does not install camera drivers or firmware. Bookworm's NumPy-1-based
45
+ camera modules are not compatible with this release's NumPy 2 dependencies.
46
+
47
+ ## Install
48
+
49
+ Install the OS dependencies, then create a virtual environment that can see the
50
+ camera packages supplied by Raspberry Pi OS:
51
+
52
+ ```bash
53
+ sudo apt install python3-picamera2 python3-venv python3-pip python3-av ffmpeg rsync
54
+ python3 -m venv --system-site-packages ~/.venvs/cameradeck
55
+ ~/.venvs/cameradeck/bin/python -m pip install cameradeck
56
+ ~/.venvs/cameradeck/bin/cameradeck
57
+ ```
58
+
59
+ Open **http://127.0.0.1:8080** in a browser on the Pi. The PyPI package includes
60
+ the compiled web UI; Node.js and a Git checkout are not needed to run it.
61
+
62
+ ### Connect from another device
63
+
64
+ Set a password before listening on the network:
65
+
66
+ ```bash
67
+ read -rs -p 'CameraDeck password: ' CAMERADECK_PASSWORD; echo
68
+ export CAMERADECK_PASSWORD
69
+ ~/.venvs/cameradeck/bin/cameradeck --host 0.0.0.0
70
+ ```
71
+
72
+ Open `http://<pi-ip>:8080` on the same trusted network. HTTP is not encrypted;
73
+ do not expose CameraDeck directly to the internet. Use an SSH tunnel, VPN, or
74
+ HTTPS reverse proxy for access beyond a trusted LAN.
75
+
76
+ ### Storage and options
77
+
78
+ ```bash
79
+ cameradeck --host 127.0.0.1 --port 8080 --media /path/to/photos
80
+ ```
81
+
82
+ Use the full executable path above unless you have activated the virtual
83
+ environment. Packaged installs save to `~/.local/share/cameradeck/media` by
84
+ default, or `$XDG_DATA_HOME/cameradeck/media` when set. `--media` overrides it.
85
+
86
+ Photos, JSON metadata, thumbnails, and previews live in that directory alongside
87
+ the library index, saved settings, and private session key. Keep the entire
88
+ directory when moving an installation. Sessions survive restarts; changing the
89
+ password signs existing sessions out.
90
+
91
+ There is **no automatic deletion**. Capture stops accepting new photos below a
92
+ 256 MiB free-space reserve. At 5 photos/s, a run can produce 18,000 photos/hour.
93
+ Monitor storage, back up your files, and verify remote copies before deleting.
94
+
95
+ Run one CameraDeck process at a time, and stop other camera applications first.
96
+ Capture sequences and rsync continue until stopped, even if you close the tab.
97
+ ZIP downloads and browser-driven batch operations need the page to stay open.
98
+ Do not run CameraDeck as root or exchange CSI cameras while powered.
99
+
100
+ ## Updates and boot service
101
+
102
+ See **[UPDATE.md](https://github.com/markosnarinian/cameradeck/blob/main/UPDATE.md)**
103
+ for safe upgrades, rollback, and the existing checkout-based systemd setup.
104
+ Always check that the instance is idle before stopping or upgrading it.
105
+
106
+ The example service and power-control rule in `deploy/` are optional and are not
107
+ installed by pip. They target a Git checkout; do not copy them unchanged for a
108
+ PyPI installation. CameraDeck does not need root privileges to run.
109
+
110
+ ## Run from source
111
+
112
+ A source checkout needs a local UI build. Install Git and
113
+ [uv](https://docs.astral.sh/uv/getting-started/installation/), then clone:
114
+
115
+ ```bash
116
+ sudo apt install git
117
+ git clone https://github.com/markosnarinian/cameradeck.git
118
+ cd cameradeck
119
+ ```
120
+
121
+ From the checkout, install the pinned
122
+ [Node/npm toolchain](https://github.com/markosnarinian/cameradeck/blob/main/UPDATE.md#frontend-toolchain),
123
+ then run:
124
+
125
+ ```bash
126
+ uv venv --system-site-packages
127
+ uv sync --frozen --no-dev
128
+ python3 scripts/frontend.py build
129
+ uv run --no-dev python app.py
130
+ ```
131
+
132
+ Source runs keep the existing default storage location, `media/` in the checkout.
133
+ Do not commit `static/dist/`. The build helper stages the UI and verifies it at
134
+ startup; never restart after a failed build.
135
+
136
+ For development, run `uv sync --frozen`, build the UI, then `uv run pytest -q`.
137
+ Browser tests require Chromium (`CHROMIUM` selects its executable); camera tests
138
+ use synthetic requests. Real-camera acceptance still requires testing preview,
139
+ exposure, sustained capture, and skipped frames on your hardware.
140
+
141
+ To build a release, run `uv build` with the pinned Node/npm on PATH. Both the
142
+ wheel and source distribution include the UI. GitHub Actions tests the source,
143
+ validates both distributions, and publishes on a matching `v<version>` release.
144
+ The PyPI account must authorize this repository's `python-publish.yml` workflow
145
+ and `pypi` environment as a Trusted Publisher before the first publication.
@@ -0,0 +1,131 @@
1
+ # CameraDeck
2
+
3
+ A browser-based camera console for Raspberry Pi. Take full-resolution photos,
4
+ run continuous capture, browse your library, and copy files off the Pi—all on
5
+ your local network.
6
+
7
+ CameraDeck uses Picamera2 and libcamera. The web UI is served by the Pi; it needs
8
+ no cloud account, CDN, or internet connection once installed.
9
+
10
+ ## What it does
11
+
12
+ - **Capture:** single photos or continuous capture, defaulting to 5 photos/s.
13
+ Actual throughput depends on your camera, exposure, and storage.
14
+ - **Camera controls:** live preview, exposure, gain, white balance, focus where
15
+ supported, and mounting orientation.
16
+ - **Library:** thumbnails, full-size viewing, range selection across pages,
17
+ original/metadata downloads, ZIP downloads, and deletion with progress.
18
+ - **Transfers:** push your media to another machine over SSH with rsync, or copy
19
+ it to a local mounted drive. Transfers continue after you close the browser.
20
+ - **Status:** free disk space, CPU temperature, and Pi throttling warnings.
21
+
22
+ Capture is photo-only. Existing video files from older versions remain viewable.
23
+
24
+ ## Requirements
25
+
26
+ - A Raspberry Pi running **64-bit Raspberry Pi OS Trixie (Debian 13)**.
27
+ - A working Picamera2/libcamera camera: check `rpicam-hello --list-cameras`.
28
+ - Python 3.11 or newer, reliable power, and enough storage for your photos.
29
+
30
+ CameraDeck does not install camera drivers or firmware. Bookworm's NumPy-1-based
31
+ camera modules are not compatible with this release's NumPy 2 dependencies.
32
+
33
+ ## Install
34
+
35
+ Install the OS dependencies, then create a virtual environment that can see the
36
+ camera packages supplied by Raspberry Pi OS:
37
+
38
+ ```bash
39
+ sudo apt install python3-picamera2 python3-venv python3-pip python3-av ffmpeg rsync
40
+ python3 -m venv --system-site-packages ~/.venvs/cameradeck
41
+ ~/.venvs/cameradeck/bin/python -m pip install cameradeck
42
+ ~/.venvs/cameradeck/bin/cameradeck
43
+ ```
44
+
45
+ Open **http://127.0.0.1:8080** in a browser on the Pi. The PyPI package includes
46
+ the compiled web UI; Node.js and a Git checkout are not needed to run it.
47
+
48
+ ### Connect from another device
49
+
50
+ Set a password before listening on the network:
51
+
52
+ ```bash
53
+ read -rs -p 'CameraDeck password: ' CAMERADECK_PASSWORD; echo
54
+ export CAMERADECK_PASSWORD
55
+ ~/.venvs/cameradeck/bin/cameradeck --host 0.0.0.0
56
+ ```
57
+
58
+ Open `http://<pi-ip>:8080` on the same trusted network. HTTP is not encrypted;
59
+ do not expose CameraDeck directly to the internet. Use an SSH tunnel, VPN, or
60
+ HTTPS reverse proxy for access beyond a trusted LAN.
61
+
62
+ ### Storage and options
63
+
64
+ ```bash
65
+ cameradeck --host 127.0.0.1 --port 8080 --media /path/to/photos
66
+ ```
67
+
68
+ Use the full executable path above unless you have activated the virtual
69
+ environment. Packaged installs save to `~/.local/share/cameradeck/media` by
70
+ default, or `$XDG_DATA_HOME/cameradeck/media` when set. `--media` overrides it.
71
+
72
+ Photos, JSON metadata, thumbnails, and previews live in that directory alongside
73
+ the library index, saved settings, and private session key. Keep the entire
74
+ directory when moving an installation. Sessions survive restarts; changing the
75
+ password signs existing sessions out.
76
+
77
+ There is **no automatic deletion**. Capture stops accepting new photos below a
78
+ 256 MiB free-space reserve. At 5 photos/s, a run can produce 18,000 photos/hour.
79
+ Monitor storage, back up your files, and verify remote copies before deleting.
80
+
81
+ Run one CameraDeck process at a time, and stop other camera applications first.
82
+ Capture sequences and rsync continue until stopped, even if you close the tab.
83
+ ZIP downloads and browser-driven batch operations need the page to stay open.
84
+ Do not run CameraDeck as root or exchange CSI cameras while powered.
85
+
86
+ ## Updates and boot service
87
+
88
+ See **[UPDATE.md](https://github.com/markosnarinian/cameradeck/blob/main/UPDATE.md)**
89
+ for safe upgrades, rollback, and the existing checkout-based systemd setup.
90
+ Always check that the instance is idle before stopping or upgrading it.
91
+
92
+ The example service and power-control rule in `deploy/` are optional and are not
93
+ installed by pip. They target a Git checkout; do not copy them unchanged for a
94
+ PyPI installation. CameraDeck does not need root privileges to run.
95
+
96
+ ## Run from source
97
+
98
+ A source checkout needs a local UI build. Install Git and
99
+ [uv](https://docs.astral.sh/uv/getting-started/installation/), then clone:
100
+
101
+ ```bash
102
+ sudo apt install git
103
+ git clone https://github.com/markosnarinian/cameradeck.git
104
+ cd cameradeck
105
+ ```
106
+
107
+ From the checkout, install the pinned
108
+ [Node/npm toolchain](https://github.com/markosnarinian/cameradeck/blob/main/UPDATE.md#frontend-toolchain),
109
+ then run:
110
+
111
+ ```bash
112
+ uv venv --system-site-packages
113
+ uv sync --frozen --no-dev
114
+ python3 scripts/frontend.py build
115
+ uv run --no-dev python app.py
116
+ ```
117
+
118
+ Source runs keep the existing default storage location, `media/` in the checkout.
119
+ Do not commit `static/dist/`. The build helper stages the UI and verifies it at
120
+ startup; never restart after a failed build.
121
+
122
+ For development, run `uv sync --frozen`, build the UI, then `uv run pytest -q`.
123
+ Browser tests require Chromium (`CHROMIUM` selects its executable); camera tests
124
+ use synthetic requests. Real-camera acceptance still requires testing preview,
125
+ exposure, sustained capture, and skipped frames on your hardware.
126
+
127
+ To build a release, run `uv build` with the pinned Node/npm on PATH. Both the
128
+ wheel and source distribution include the UI. GitHub Actions tests the source,
129
+ validates both distributions, and publishes on a matching `v<version>` release.
130
+ The PyPI account must authorize this repository's `python-publish.yml` workflow
131
+ and `pypi` environment as a Trusted Publisher before the first publication.