kapy

Kapy is a simple utility designed to copy digital camera photos from an SD card to a disk with transformations. This tool streamlines the process of transferring photos from your camera to your computer, while also providing the ability to make any necessary image transformations during the copying process.

Build

Build on macOS

If you use Homebrew (https://brew.sh/), you can easily install the required packages.
After installing Homebrew, you can install the required packages and build the application by running the following command:

shell $ brew install pkg-config imagemagick exiv2 libssh $ CLIENT_ID={YOUR_CLIENT_ID} CLIENT_SECRET={YOUR_SECRET} cargo build

If you are not using Homebrew, please install the required packages below and set the corresponding environment variables accordingly:

Build on Windows

Pre-requirements

Build

```shell

set CLIENTID={YOURCLIENTID} set CLIENTSECRET={YOURSECRET} set IMAGEMAGICKDIR={YOURMAGICKINSTALLATIONDIR} set EXIV2INCLUDEDIRS={YOUREXIV2INCLUDEDIR} set EXIV2LIBDIRS={YOUREXIVLIBDIR} set LIBSSHINCLUDEDIRS={YOURLIBSSHINCLUDEDIR} set LIBSSHLIBDIRS={YOURLIBSSHLIBDIR} set LIBCLANGPATH={YOURLLVMBINDIR} cargo build ```

Usage

shell $ kapy clone -c ~/.kapy.yaml --from /Volumes/Untitled/DCIM/108HASBL --to ~/images

Disclaimer

To access Google Drive API using your own Google OAuth 2.0 clientid and clientsecret, you will need to set up a project on the Google Developers Console and create OAuth 2.0 credentials. Once you have obtained your credentials, you can set the CLIENTID and CLIENTSECRET as environment variables or include them directly in your code.

shell $ CLIENT_ID={YOUR_CLIENT_ID} CLIENT_SECRET={YOUR_SECRET} kapy login $ kapy clone

If you encounter login issues, you can log in again as follows.

shell $ kapy clean $ CLIENT_ID={YOUR_CLIENT_ID} CLIENT_SECRET={YOUR_SECRET} kapy login

Or, you can assign CLIENTID and CLIENTSECRET values at compile time.

```shell $ CLIENTID={YOURCLIENTID} CLIENTSECRET={YOUR_SECRET} cargo install kapy

OR

$ CLIENTID={YOURCLIENTID} CLIENTSECRET={YOUR_SECRET} cargo build ```

The Google Drive API has a strict application approval process since it can access users' sensitive information. This application was originally created for my personal use, and it is difficult to comply with Google's strict approval process. You should refer to the following document to generate your own Google OAuth 2.0 credentials:

https://developers.google.com/identity/protocols/oauth2/native-app

The following API scopes must be specified:

Configurations