Skip to main content

Tools to convert Pov-Ray DF3 files to set of images and vice versa

Project description

Build Status Coverage Status Maintainability Status Code Quality Latest PyPI version Supported Python versions

Command-line tools to convert POV-Ray density files (DF3) to a bunch of images and vice versa.

Installation

The easiest way to install is via standard Python package manager:

pip install df3tools

Optionally, you may clone package’s repository, and run setup.py script:

git clone https://github.com/a5kin/df3tools.git
cd df3tools
python setup.py install

Quickstart

After successful installation, two tools will be available at command-line: df3split and df3combine.

The former, by default, splits density file to a bunch of images and saves them into layerNNN.tga files in current directory:

df3split path-to-original-density-file.df3

The latter, by default, combines all layer* files in current directory into a single density file. Image format is auto-detected:

df3combine path-to-new-density-file.df3

You may also pass an images’ prefix like -p data/layer. See the full list of options below.

df3split

Split POV-Ray .df3 density file to a series of separate images.

Usage

df3split [-h] [-t {tga,png}] [-p PREFIX] [-s] df3file

Positional arguments:

df3file    Filename of density file to split.

Optional arguments:

-h, --help                        Show help message and exit.
-t {tga,png}, --format {tga,png}  Output files format.
-p PREFIX, --prefix PREFIX        Output files prefix.
-s, --silent                      Suppress output.

df3combine

Combine a series of separate images into POV-Ray .df3 density file.

Usage:

df3combine [-h] [-p PREFIX] [-s] df3file

Positional arguments:

df3file    Filename of density file to combine images into.

Optional arguments:

-h, --help                        Show help message and exit.
-p PREFIX, --prefix PREFIX        Input files prefix.
-s, --silent                      Suppress output.

Note, images format is autodetected. You may combine any type of images, supported by Pillow.

Tests

To run full test suite for all supported Python versions, install tox package, and run it from project’s top directory, containing setup.py:

pip install tox
tox

Optionally, you can run tests only for your current Python version by typing:

python -m unittest discover -s tests

Acknowledgements

Thanks to Yury Poberezhny for the idea and motivation to create this package.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

df3tools-0.1.0.tar.gz (6.3 kB view details)

Uploaded Source

File details

Details for the file df3tools-0.1.0.tar.gz.

File metadata

  • Download URL: df3tools-0.1.0.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for df3tools-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d5bda564926520c2ad044b4d6f1f25bb0221a5d3f3a375751e89752ebf21c9cb
MD5 d7334054c981b81b01c54bdc9aceeb39
BLAKE2b-256 b7da859fa064c8852861f1d118948a8b35da0f08ded8f9fb9a468be1c6189726

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page