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.
Metadata
Release files for df3tools 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| df3tools-0.1.0.tar.gz | 6.3 kB | Details |
Release files / df3tools-0.1.0.tar.gz
| Download URL | df3tools-0.1.0.tar.gz |
|---|---|
| Size | 6.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d5bda564926520c2ad044b4d6f1f25bb0221a5d3f3a375751e89752ebf21c9cb
|
|
BLAKE2b-256 checksum How to use checksums |
b7da859fa064c8852861f1d118948a8b35da0f08ded8f9fb9a468be1c6189726
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |