This guide provides instructions for setting up the necessary dependencies for dt2civitai.py
on macOS, including installing exiftool
and Pillow for Python via Homebrew. If you already have these installed and working, you can skip this section.
Before proceeding, ensure you have the following:
- macOS operating system
- Internet connection
Homebrew is a package manager for macOS. If you already have Homebrew installed, skip to the next section. Otherwise, follow these steps to install it:
- Open Terminal (you can find it using Spotlight search or navigate to
Applications -> Utilities -> Terminal
). - Paste the following command and press Enter:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Follow the prompts to complete the installation.
exiftool
is a powerful tool for reading, writing, and editing meta-information in various files. Follow these steps to install it using Homebrew:
- Open Terminal.
- Run the following command:
brew install exiftool
- Once the installation is complete, verify it by running:
exiftool -ver
Pillow is a Python Imaging Library that adds image processing capabilities to your Python interpreter. To install Pillow, follow these steps:
- Ensure you have Python3 installed. Check by running:
python3 --version
- If Python3 is not installed, download and install it with Homebrew:
brew install python3
- Open Terminal.
- Run the following command to install Pillow using Homebrew:
brew install pillow
- Verify the installation by running a Python script that imports Pillow:
python3 -c "import PIL"
You've successfully installed exiftool
with Homebrew and Pillow for Python on your macOS system. You are now ready to use these tools in your Python scripts. For more information on using exiftool and Pillow, refer to their respective documentation.
dt2civitai.py
may request permission from MacOS to access data from other apps while reading Draw Things' models directory. Please grant it permission.- If you use an external models directory, uncomment the relevant line in the script and modify the path accordingly.
- The shebang in the script assumes Python3 was installed with Homebrew. Modify the path if needed.
The dt2civitai.py
script can be used in various ways:
- Process an individual image:
python3 dt2civitai.py input_image.png output_folder
- Process a folder of images:
python3 dt2civitai.py /path/to/image/folder/ /destination/folder/
- Process all Draw Things images in the current directory:
python3 dt2civitai.py