pcdshub / typhos

Automatic-yet-customizable Graphical User Interface Generation for Ophyd Devices
http://pcdshub.github.io/typhos
Other
16 stars 26 forks source link

Helper script: typhos screenshots of all happi items #596

Open klauer opened 10 months ago

klauer commented 10 months ago

Here's a helper script:

#!/bin/bash

PYTHONPATH=$HOME/Repos/typhos:PYTHONPATH
screenshot_path=$HOME/Repos/typhos/screenshots/$(git describe --tags)

mkdir -p ${screenshot_path}
echo "Saving screenshots to: $screenshot_path"

per_instance=10

happi search --names '*' | xargs -d ' ' -L ${per_instance} \
    python -m typhos --screenshot "${screenshot_path}/{device.name}.png" --exit-after 10

and to combine them

$ cat screenshots/to_pdf.sh
#!/bin/bash

convert $1/*.png "typhos_$1.pdf"

See also ~klauer/Repos/typhos/screenshots.sh