Photobooth python package. Based on QTs Web Interface and gphoto2 package.
Project description
Photobooth
Photobooth application purely written in Python. Controlling a dslr camera and capturing photo.
Installation on RaspberryPi
Installing the Photobooth package
$ sudo apt-get -y update && sudo apt-get -y upgrade && sudo apt-get -y autoremove
$ sudo apt-get -y install python3-pip python3-pyqt5 libgphoto2-dev
$ sudo pip install photobooth[dslr,rpi]
Start the photobooth with
$ photobooth -c <path/to/photobooth_config.ini>-d <path/to/dslr_config.ini>
Installing the window manager, if using Raspbian Lite
-
Install Packages
$ sudo apt-get install -y --no-install-recommends xserver-xorg x11-xserver-utils xinit openbox $ sudo apt-get install -y unclutterThe package unclutter is optional. It will prevent showing the mouse curser.
-
Change the
.xinitrcfile by adding the following lineexec openbox-session -
Create the
autostartfile unter~/.config/openbox/autostartsetxkbmap -option terminate:ctrl_alt_bksp xset s noblank xset s off xset -dpms unclutter -idle 0.5 -root & photobooth -c <path/to/photobooth_config.ini> -d <path/to/dslr_config.ini>Remarks:
- If you like to show the mouse curser remove
unclutter -idle 0.5 -root & - If you like to use the default configuration remove the options
-cand-d.
- If you like to show the mouse curser remove
-
Start the photobooth with
$ startx -
If you like to autostart the photobooth add the following line to
~/.bash_profileand enable auto-login viaraspi-configstartx
Configuration
The photobooth can be configured via a configuration file.
; Configuration of the application
[widget]
; Title of the application window
title = Photobooth
; Path to the background image
background_image = ./oak.jpg
; Configuration of the gallery screen
[widget.gallery]
; Label for the right button
right_button = Photo
; Position of the images [<x-position>, <y-position>, <angle>]
; - x- and y-position are in percent relative to the center of the page
; - angle is the degree of image rotation
positions = [[0.0, 0.0, 2], [-0.8, -0.6, -6], [0.7, -0.65, 10], [0.4, 0.8, -4], [-0.5, 0.8, 8], [-0.9, 0.6, -6], [0.05, -0.9, 4], [0.95, 0.95, 2], [0.85, -0.05, -4], [-0.95, -0.95, -4], [-0.1, -0.05, 12], [0.9, -0.95, -10], [0.0, 0.95, 2], [-0.65, 0.95, 4], [0.25, 0.05, 4], [-0.5, -0.5, -10]]
; Configuration of the liveview screen
[widget.liveview]
; Label for the left button
left_button = Back
; Label for the right button
right_button = Photo
; Configuration of the capture screen
[widget.capture]
; Countdown text comma separated
countdown = 3,2,Smile!
; Color of the message
countdown_color = "#333333"
; Messages after image is captured. Placeholder {number} is replaced with the photo number.
file_number_message = "This photo has the number: {number}"
; Color of the message
file_number_message_color = "#333333"
; Configuration of the preview screen
[widget.preview]
; Label for the left button
left_button = Delete
; Label for the right button
right_button = Next
; Time the preview is show in milliseconds
timeout = 5000
; Configuration of the hardware buttons
[hardwarebutton]
; GPIO Pin of the left button
left_button = 23
; GPIO Pin of the right button
right_button = 24
; Configuration of the camera
[camera]
; Image naming pattern to use for extraction as regex expression
file_number_pattern = P\d{2}_(\d{4}).JPG
; Time delay of the camera shutter from signal to actual capturing the photo (used to correct the countdown)
shutter_delay = 800
Warranty
No guaranty or coverage of any kind to damages what so ever.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file photobooth-0.0.1.tar.gz.
File metadata
- Download URL: photobooth-0.0.1.tar.gz
- Upload date:
- Size: 2.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00918fb094a2b003cc425319f0fa5b1bd8ee8d5feba3b3cf5d7202eca78dcf3b
|
|
| MD5 |
2d9a997fb7a4e9e42023ce1f71e53f2a
|
|
| BLAKE2b-256 |
873a15ed54472d2bd5942975af88c86647637a2fef6f3833099f923768fb57d8
|
Provenance
The following attestation bundles were made for photobooth-0.0.1.tar.gz:
Publisher:
publish.yaml on pschleiter/photobooth
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
photobooth-0.0.1.tar.gz -
Subject digest:
00918fb094a2b003cc425319f0fa5b1bd8ee8d5feba3b3cf5d7202eca78dcf3b - Sigstore transparency entry: 189753598
- Sigstore integration time:
-
Permalink:
pschleiter/photobooth@a551dc2ca155b0d6862c5afb7904967588b3a2a2 -
Branch / Tag:
refs/tags/0.0.1 - Owner: https://github.com/pschleiter
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@a551dc2ca155b0d6862c5afb7904967588b3a2a2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file photobooth-0.0.1-py3-none-any.whl.
File metadata
- Download URL: photobooth-0.0.1-py3-none-any.whl
- Upload date:
- Size: 2.9 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c1e10d4a8792f24a05f5f6633837bb4368114dc91ab92ae5fa3d0d22966bea8
|
|
| MD5 |
1ee9616f7eba8a7faa5d47ceb1d10b8a
|
|
| BLAKE2b-256 |
d470008a0af00d3b824f4c5d16951c70fef8c64a91797713113415a883448a60
|
Provenance
The following attestation bundles were made for photobooth-0.0.1-py3-none-any.whl:
Publisher:
publish.yaml on pschleiter/photobooth
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
photobooth-0.0.1-py3-none-any.whl -
Subject digest:
1c1e10d4a8792f24a05f5f6633837bb4368114dc91ab92ae5fa3d0d22966bea8 - Sigstore transparency entry: 189753599
- Sigstore integration time:
-
Permalink:
pschleiter/photobooth@a551dc2ca155b0d6862c5afb7904967588b3a2a2 -
Branch / Tag:
refs/tags/0.0.1 - Owner: https://github.com/pschleiter
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@a551dc2ca155b0d6862c5afb7904967588b3a2a2 -
Trigger Event:
push
-
Statement type: