Skip to content

dadav/digipy

Repository files navigation

digipy

This tool is a small wrapper around the digicamcontrol.com API. It is used to control my Canon EOS 600D camera in my photobooth setup.

install

There are two ways to use this.

  1. From Source
  2. Packaged pyinstaller version (easier)

From source

  1. Download python 11 from here
  2. Install python
  3. Download the digipy directory and start script
  4. Put these files into C:\Apache24\htdocs\api\

Packaged version

Download the packaged exe file from here and put it in your api directory (usually C:\Apache24\htdocs\api\).

Usage

You need to give digipy the following informations:

Which mode you want to use, slc or cmd.

The cmd or slc command you want to use.

And the parameters you want to use.

And of cause a running digicamcontrol instance with the webserver listening on port 5513.

Examples

# change the session folder to c:\foo\bar
digipy slc set session.folder c:\foo\bar

# list available cameras
digipy slc list cameras

# capture photo and save it to c:\foo.jpg
digipy slc capture c:\foo.jpg

Photobooth

Adjust the commands in your photobooth setup to this:

# Before photo command: Start Liveview
digipy cmd LiveViewWnd_Show

# Capture command
digipy slc capture %s

# After photo command: Hide Liveview
digipy cmd LiveViewWnd_Hide

Configuration

You can change the host with the DIGIPY_HOST and the port with the DIGIPY_PORT env variable.

For example:

DIGIPY_PORT=9999 digipy slc capture %s

Development

If you want to contribute to this project, then you can run the following commands to get the required environment:

python3 -m venv venv
source ./venv/bin/activate
pip3 install -r dev.txt

Changes in the requirements go into the requirements.in file and can be compiled with

# create new requirements.txt and update deps
pip-compile -U requirements.in

# don't forget dev.in
pip-compile -U dev.in

# then sync the new deps to your env
pip-sync dev.txt

LICENSE

MIT