Convert README to Markdown now that PyPI supports it
This commit is contained in:
parent
f1572393fb
commit
428547bea4
2 changed files with 17 additions and 51 deletions
|
@ -1,19 +1,13 @@
|
|||
cube2sphere |PyPI version| |PyPI|
|
||||
cube2sphere [![PyPI version](https://badge.fury.io/py/cube2sphere.svg)](https://pypi.python.org/pypi/cube2sphere) [![PyPI](https://img.shields.io/pypi/pyversions/cube2sphere.svg)](https://pypi.python.org/pypi/cube2sphere)
|
||||
===========
|
||||
|
||||
.. |PyPI version| image:: https://badge.fury.io/py/cube2sphere.svg
|
||||
:target: https://pypi.python.org/pypi/cube2sphere
|
||||
.. |PyPI| image:: https://img.shields.io/pypi/pyversions/cube2sphere.svg
|
||||
:target: https://pypi.python.org/pypi/cube2sphere
|
||||
|
||||
``cube2sphere`` is a Python script to map 6 cube (cubemap, skybox)
|
||||
faces into an equirectangular (cylindrical projection, skysphere) map. See also `cube2sphere`_.
|
||||
`cube2sphere` is a Python script to map 6 cube (cubemap, skybox) faces
|
||||
into an equirectangular (cylindrical projection, skysphere) map. See
|
||||
also [sphere2cube](https://github.com/Xyene/sphere2cube).
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
::
|
||||
|
||||
$ cube2sphere -h
|
||||
usage: cube2sphere [-h] [-v] [-r <width> <height>] [-R <rx> <ry> <rz>]
|
||||
[-o <path>] [-f <name>] [-b <path>] [-t <count>] [-V]
|
||||
|
@ -50,55 +44,26 @@ Usage
|
|||
-V, --verbose enable verbose logging
|
||||
|
||||
Supported output formats depend on the Blender installation, but will
|
||||
generally include TGA, IRIS, JPEG, MOVIE, IRIZ, RAWTGA, AVIRAW, AVIJPEG, PNG,
|
||||
BMP, and FRAMESERVER.
|
||||
generally include TGA, IRIS, JPEG, MOVIE, IRIZ, RAWTGA, AVIRAW, AVIJPEG,
|
||||
PNG, BMP, and FRAMESERVER.
|
||||
|
||||
``cube2sphere`` can be run in a headless environment (e.g., a
|
||||
server).
|
||||
`cube2sphere` can be run in a headless environment (e.g., a server).
|
||||
|
||||
Examples
|
||||
========
|
||||
|
||||
If we wanted to stitch 6 cube faces named ``${face}.jpg`` into a 2048x1024 TGA equirectangular map, we could use the following command:
|
||||
|
||||
::
|
||||
If we wanted to stitch 6 cube faces named `${face}.jpg` into a 2048x1024
|
||||
TGA equirectangular map, we could use the following command:
|
||||
|
||||
$ cube2sphere front.jpg back.jpg right.jpg left.jpg top.jpg bottom.jpg -r 2048 1024 -fTGA -ostitched
|
||||
|
||||
This would generate ``stitched.tga`` in the working directory.
|
||||
This would generate `stitched.tga` in the working directory.
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
``cube2sphere`` can be easily installed with ``pip``. It requires a Python 3 installation.
|
||||
`cube2sphere` can be easily installed with `pip`. It requires a Python 3
|
||||
installation.
|
||||
|
||||
It assumes that Blender is installed and the ``blender`` executable is listed in the system PATH environment variable. If it is not possible for PATH to be edited (as in the case of an unprivileged user), the path to the ``blender`` executable may instead be passed through the ``-b`` flag.
|
||||
|
||||
Windows
|
||||
-------
|
||||
|
||||
Install `Blender`_, and add ``blender.exe`` to ``PATH``. Finally,
|
||||
|
||||
::
|
||||
|
||||
pip install cube2sphere
|
||||
|
||||
Linux
|
||||
-----
|
||||
|
||||
::
|
||||
|
||||
$ apt-get install blender
|
||||
$ pip install cube2sphere
|
||||
|
||||
Mac OS X
|
||||
--------
|
||||
|
||||
Similar to Windows, install `Blender`_, and add the ``blender`` executable to ``$PATH``. Then,
|
||||
|
||||
::
|
||||
|
||||
$ pip install cube2sphere
|
||||
|
||||
.. _cube2sphere: https://github.com/Xyene/cube2sphere
|
||||
.. _Blender: https://www.blender.org/
|
||||
It assumes that Blender is installed and the `blender` executable is
|
||||
listed in the system PATH environment variab
|
5
setup.py
5
setup.py
|
@ -4,8 +4,8 @@ __author__ = 'Xyene'
|
|||
from setuptools import setup, find_packages
|
||||
import os
|
||||
|
||||
with open('README.rst') as file:
|
||||
long_description = file.read()
|
||||
with open(os.path.join(os.path.dirname(__file__), 'README.md')) as fh:
|
||||
long_description = fh.read()
|
||||
|
||||
with open(os.path.join(os.path.dirname(os.path.realpath(__file__)), 'cube2sphere', 'version.py')) as version:
|
||||
exec (version.read())
|
||||
|
@ -14,6 +14,7 @@ setup(name='cube2sphere',
|
|||
version=__version__,
|
||||
description='Utility to map 6 cube (cubemap, skybox) faces into an equirectangular (cylindrical projection, skysphere) map',
|
||||
long_description=long_description,
|
||||
long_description_content_type='text/markdown',
|
||||
author='Tudor Brindus',
|
||||
author_email='me@tbrindus.ca',
|
||||
url='http://github.com/Xyene/cube2sphere',
|
||||
|
|
Loading…
Reference in a new issue