kombiHQ / kombi

Kombi is focused in describing and performing tasks
MIT License
2 stars 4 forks source link

Kombi

Build Status

Kombi is focused in describing and performing tasks. These tasks can be used to wrap from executables to arbitrary python implementations. It works by providing an API that simplifies the process of describing nested tasks, passing data across tasks, handling settings for the tasks, dealing with common file system/path operations, splitting the processing and, providing interoperability across different applications bundled with python.

You may find this project useful in situations you need to combine serveral different executables/API's. For instance, during image/video processing, ingestion of files, creating/versioning data (etc).

Kombi can be used through declarative definitions to speed-up prototyping and simplify the maintainability, by reducing the need for writing boilerplate code:

YAML

```yaml --- vars: prefix: "/tmp" tasks: - run: gafferScene metadata: match.types: - png match.vars: imageType: - sequence options: scene: "{configDirectory}/scene.gfr" target: "{prefix}/gafferBlurImageSequence/(newver as )/{name}_.(pad {frame} 6).exr" tasks: - run: ffmpeg options: frameRate: 23.976 sourceColorSpace: bt709 targetColorSpace: smpte170m target: "(dirname {filePath})/{name}.mov" ```

TOML

```toml [vars] prefix = "/tmp" [[tasks]] run = "gafferScene" target = "{prefix}/gafferBlurImageSequence/(newver as )/{name}_.(pad {frame} 6).exr" [tasks.metadata] "match.types" = [ "png" ] [tasks.metadata."match.vars"] imageType = [ "sequence" ] [tasks.options] scene = "{configDirectory}/scene.gfr" [[tasks.tasks]] run = "ffmpeg" target = "(dirname {filePath})/{name}.mov" [tasks.tasks.options] frameRate = 23.976 sourceColorSpace = "bt709" targetColorSpace = "smpte170m" ```

JSON & HJSON It supports both Json and Hjson (a user interface for JSON: https://hjson.org)

```json { "vars": { "prefix": "/tmp" }, "tasks": [ { "run": "gafferScene", "metadata": { "match.types": [ "png" ], "match.vars": { "imageType": [ "sequence" ] } }, "options": { "scene": "{configDirectory}/scene.gfr" }, "target": "{prefix}/gafferBlurImageSequence/(newver as )/{name}_.(pad {frame} 6).exr", "tasks": [ { "run": "ffmpeg", "options":{ "frameRate": 23.976, "sourceColorSpace": "bt709", "targetColorSpace": "smpte170m" }, "target": "(dirname {filePath})/{name}.mov" } ] } ] } ```

Additionally you can run Kombi from:

Python

```python # TODO ```

Gaffer (node-based)

``` coming soon ```

Supported platforms

Requirement

Python 3.5+/2.7+

Optional Dependencies

Name Version
Open Image IO (including python bindings/binary tools) 1.7+
Open Color IO (including python bindings) 1.0+
Gaffer 0.53+
PySide 2.0+
FFmpeg (including ffprobe) 3.0+
nuke 9.0+
maya 2016+
deadline 9.0+

Installation

In case you are building the dependencies manually skip the step below:

Install dependencies

Linux

#### Ubuntu 18.04 (bionic) and derivatives: ```bash pip install PySide2 apt-get install make cmake apt-get install python-openimageio openimageio-tools apt-get install python-pyopencolorio apt-get install ffmpeg ``` #### CentOS/Fedora (requires EPEL): ```bash pip install PySide2 yum install make cmake yum install python-OpenImageIO OpenImageIO-utils yum install ffmpeg ```

windows

- [Cygwin](https://www.cygwin.com) - [Python 3.6+](https://www.python.org/downloads) - [FFmpeg](https://ffmpeg.org) - [PySide2](https://pypi.org/project/PySide2) - [Open Image IO](https://www.lfd.uci.edu/~gohlke/pythonlibs/#openimageio) (Unofficial)

Download and unzip the release

# TODO

Building Kombi for development

Details

> For windows users please make sure you have the posix tools available on your system. It can be done through [Cygwin](https://www.cygwin.com) (During the installation make sure to select `cmake` and `make` under `Devel` category). #### Dependencies Name | Version --- | --- CMake | 2.8+ Make | 3.0+ Pylama | 7.0+ #### Running tests ```bash cd ./runtest ``` #### Running linters ```bash cd ./runlint ``` #### Building Kombi > Hint for windows users: The volumes are available under `/cygdrive/` in cygwin ```bash cd mkdir build cd build cmake -DCMAKE_INSTALL_PREFIX= -G "Unix Makefiles" .. make all install ```

Running

The launchers are provided inside of the "bin" directory found inside of the installation.

Kombi command-line:

kombi --help

Kombi file picker tool (requires PySide2):

kombi-gui

Licensing

Kombi is free software; you can redistribute it and/or modify it under the terms of the MIT License