Commit graph

6 commits

Author SHA1 Message Date
f49ea1dbc5 ingest: Assign uploaded documents to a configurable Paperless owner
The post_document endpoint does not support setting ownership on upload,
so after a successful upload the document is PATCHed to set the owner.

Add optional PAPERLESS_OWNER_ID env var. When set, every newly uploaded
document is assigned to that Paperless user ID via PATCH /api/documents/{id}/.
2026-03-11 23:55:00 +00:00
0aa044eead ingest: Accept RoomMessageFile events regardless of body content
WhatsApp bridge files (e.g. PDFs) may arrive with an empty body field,
causing the previous .pdf extension check to silently skip them. Accept
all RoomMessageFile events and fall back to "document.pdf" as filename.
File content is still validated via magic bytes before upload.
2026-03-11 23:35:23 +00:00
eec2d076e4 ingest: Accept RoomMessageImage events regardless of body content
WhatsApp bridge images arrive as RoomMessageImage events with an empty
body field, so the previous .jpg/.jpeg extension check silently rejected
all of them. Accept all RoomMessageImage events and fall back to
"image.jpg" as filename when body is empty. File content is still
validated via magic bytes before upload.
2026-03-11 23:32:15 +00:00
025228b83c deps: Switch from uv to plain venv and pip-tools
uv installs to ~/.local/bin which is not in PATH for systemd services,
and keeping uv updated on Ubuntu requires manual steps outside of apt.
Switch to a plain Python venv with pip-tools for dependency locking.

- Replace uv venv/sync with python3 -m venv --system-site-packages
- Generate requirements.txt with pip-compile from pyproject.toml
- Update service ExecStart to use .venv/bin/python directly
- Remove uv.lock and [tool.uv] from pyproject.toml
- Update README to document venv+pip-tools workflow
2026-03-11 22:57:41 +00:00
b2646222f8 service: Switch to systemd user service
Run as the current user instead of a dedicated system user, using
systemd user service in ~/.config/systemd/user/. This avoids needing
root for setup and keeps uv and the project in the user's home
directory. Rename service file to matrix-paperless-ingest.service.
2026-03-11 14:02:30 +00:00
d5a3528cde ingest: Initial implementation
Bot that monitors a Matrix room for PDF and JPEG files and uploads
them to Paperless-ngx. Supports E2E encrypted attachments via inline
AES keys, historical catchup on startup, exponential backoff retries
with a permanent give-up after max attempts, file format validation
via magic bytes, Uptime Kuma heartbeat monitoring, and email alerts
on errors via SMTP SSL.
2026-03-11 13:45:28 +00:00