Metadata-Version: 2.5
Name: dit-mate
Version: 0.2.0
Summary: A suite of utilities for Digital Imaging Technicians and post-production workflows.
Project-URL: Homepage, https://github.com/lucuma13/dit-mate
Author: Luis Gómez Gutiérrez
License: MIT
License-File: LICENSE
Keywords: bwf,camera,digital-imaging-technician,dit,exiftool,ffmpeg,fps,master-rushes-log,media-management,mediainfo,metadata,post-production,prores,r3d,resolution,rushes,video,wav,xavc
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Classifier: Topic :: Multimedia :: Video
Classifier: Topic :: Utilities
Requires-Python: >=3.11
Requires-Dist: packaging>=26.2
Requires-Dist: platformdirs>=4.10
Requires-Dist: pyperclip>=1.11
Description-Content-Type: text/markdown

# dit-mate

[![PyPI Version](https://img.shields.io/pypi/v/dit-mate.svg)](https://pypi.org/project/dit-mate/)
![OS](https://img.shields.io/badge/OS-macOS%20%7C%20Windows%20%7C%20Linux-lightgrey)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![ty](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ty/main/assets/badge/v0.json)](https://github.com/astral-sh/ty)
[![CI](https://github.com/lucuma13/dit-mate/actions/workflows/ci.yml/badge.svg)](https://github.com/lucuma13/dit-mate/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/lucuma13/dit-mate/graph/badge.svg?token=UAG4HDWR4J)](https://codecov.io/gh/lucuma13/dit-mate)


`dit-mate` is a toolkit for Digital Imaging Technicians and Media Managers, fully cross-platform. It contains the following tools:

* `basicmeta` lists the essential metadata that needs to be consistent across all cameras in a given shooting day: frame rate, resolution and recorded date. It integrates [Media-Info](https://github.com/mediaarea/mediainfo), [ExifTool](https://github.com/exiftool/exiftool) and [REDCINE-X PRO](https://docs.red.com/955-0004_v50/REDCINE-XProOperationGuide/Content/1_RCXP_Intro/1_Intro_Intro.htm) to support all professional camera acquisition formats (MXF, MOV, MP4, R3D, BRAW, and BWF WAV audio), as well as some extra video containers (MKV, AVI, M4V, MTS, FLV, WebM).

* `mkday` creates a user-defined folder structure in the volumes provided, a time-saver at the beginning of each shooting day.

* `mrl` takes a directory with camera rolls and copies to the clipboard the values you need to paste in your Master Rushes Log: first and last clip name, clip count, size and duration. It requires [FFmpeg](https://github.com/ffmpeg/ffmpeg), and it handles clips split across multiple files correctly (like RED .R3D and GoPros).

* `xpandroll` uses an editable dictionary (.TSV) to rename camera rolls in multiple directories. Useful in combination with ShotPut Pro when roll names need to have longer names that the volume admits

### 🚀 Installation

1. Install prerequisites ([Media-Info](https://mediaarea.net/en/MediaInfo/Download), [ExifTool](https://exiftool.org/install.html), [FFmpeg](https://www.ffmpeg.org/download.html)), optional prerequisite ([REDCINE-X PRO](https://docs.red.com/955-0004_v50/REDCINE-XProOperationGuide/Content/2_Download_Install/Download.htm)), and also [uv](https://docs.astral.sh/uv/getting-started/installation/) from the official installers, or:

* macOS: `brew install media-info exiftool ffmpeg redcine-x-pro uv`
* Windows: `winget install MediaArea.MediaInfo OliverBetz.ExifTool Gyan.FFmpeg astral-sh.uv`
* Linux (Debian): `sudo apt-get install mediainfo libimage-exiftool-perl ffmpeg && curl -LsSf https://astral.sh/uv/install.sh | sh`
<!--
* Linux (RHEL): `yum install mediainfo perl-Image-ExifTool ffmpeg uv`
* Linux (SUSE): `zypper install mediainfo exiftool ffmpeg python-uv`
* Linux (Arch): `pacman -S mediainfo exiftool ffmpeg uv`
-->

2. Install the toolkit:

```
uv tool install dit-mate
```

3. Test the installation (if the command is not recognised try `uv tool update-shell` and restart your terminal):

```
dit-mate --help
```

#### Alternative (macOS only)

Install with [Homebrew](https://brew.sh/): `brew install lucuma13/dit/dit-mate`


### 📖 Usage examples

Check the essential metadata of multiple camera rolls:

```bash
basicmeta "path/to/rushes/"
```
Make the folder structure for shooting day 1, using the preset "example", on two backup drives:
```bash
mkday -p example_preset -d 1 "path/to/drive1" "path/to/drive2"
```

Copy the values you need for your Master Rushes Log:

```bash
mrl "path/to/camera/roll"					# copy default values
mrl "path/to/camera/roll" -cs				# copy only clip count and size (in that order)
mrl "path/to/rushes/"						# auto-detects multiple rolls
```

Expand roll names from a dictionary:

```bash
xpandroll -E								# edit the dictionary (.TSV)
xpandroll "path/to/master/day1" "path/to/backup/day1"
```

Run any tool with `--help` to see the full list of options.


### 🧪 Feedback & Contributing

If this tool fails to parse metadata from your specific camera files, or if you have ideas for improvement, please fork the repository and submit a pull request, or open an issue with a sample of the problematic metadata output. Help to make this tool more robust for the DIT and media management community!
