Skip to content

Watch/daemon mode: button-initiated and folder-watched scanning #2

Description

@andreashaerter

ScanMole is deliberately not a scan server (see the non-goals in ARCHITECTURE.md): it runs no daemon, offers no network API and does no multi-user queueing. But the CLI contract is intentionally the seam where a server could grow: a daemon would wrap the same engine and speak the same JSON events over a socket instead of stdout.

Scenarios this mode would cover:

  • Scanner-button-initiated scans: press the button on the device and a finished PDF appears in a configured folder. SANE exposes button sensors on some backends (the fujitsu backend has a --scan sensor option, for example); availability varies per device.
  • Headless operation on a machine without a desktop session, e.g. a small box next to the scanner.

Architectural gates before building it:

  • A socket transport for the JSON event protocol (today the protocol lives on the stdout of one process per job).
  • Reassess whether the engine stays Python or gets reimplemented, in either case behind the unchanged CLI contract.

Guardrail until then: do not grow ad-hoc daemon features into the desktop CLI.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions