csaxs_bec.bec_ipython_client.plugins.flomni.flomni_webpage_generator.FlomniWebpageGenerator#
- class FlomniWebpageGenerator(bec_client, output_dir: str = '~/data/raw/webpage/', cycle_interval: float = 15, verbosity: int = 1, upload_url: str = None, local_port: int = 8080)[source]#
Bases:
WebpageGeneratorBaseflOMNI-specific webpage generator. Adds: temperatures, sample name, measurement settings from global vars. Logo: flOMNI.png from the same directory as this file.
Methods
Set the web password for the current BEC account.
Start the generator.
Print a human-readable status summary to the console.
Stop the generator thread, local HTTP server, and release the singleton lock.
Attributes
verbosity- set_web_password(password: str) None#
Set the web password for the current BEC account.
Sends the plaintext password to set_password.php on the server (IP-restricted, HTTPS). PHP generates the bcrypt hash and writes session.htpasswd directly — no Python bcrypt package needed.
The username is taken from bec.active_account (e.g. ‘p23092’).
- Example::
flomni.webpage_gen.set_web_password(“my_secret_password”)
- start() None#
Start the generator.
If this session already holds the thread, does nothing. If another session holds a fresh lock, a background watcher thread is launched that polls every 3 s and takes over as soon as the lock goes stale — no blocking, no second call to start() needed. Progress messages during the wait are printed at verbosity >= 2 only.
- status() None#
Print a human-readable status summary to the console.
- stop() None#
Stop the generator thread, local HTTP server, and release the singleton lock.