Convert README to Markdown now that PyPI supports it

This commit is contained in:
Tudor Brindus 2020-04-01 17:33:12 -04:00
parent f1572393fb
commit 428547bea4
2 changed files with 17 additions and 51 deletions

View file

@ -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 `cube2sphere` is a Python script to map 6 cube (cubemap, skybox) faces
:target: https://pypi.python.org/pypi/cube2sphere into an equirectangular (cylindrical projection, skysphere) map. See
.. |PyPI| image:: https://img.shields.io/pypi/pyversions/cube2sphere.svg also [sphere2cube](https://github.com/Xyene/sphere2cube).
: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`_.
Usage Usage
===== =====
::
$ cube2sphere -h $ cube2sphere -h
usage: cube2sphere [-h] [-v] [-r <width> <height>] [-R <rx> <ry> <rz>] usage: cube2sphere [-h] [-v] [-r <width> <height>] [-R <rx> <ry> <rz>]
[-o <path>] [-f <name>] [-b <path>] [-t <count>] [-V] [-o <path>] [-f <name>] [-b <path>] [-t <count>] [-V]
@ -50,55 +44,26 @@ Usage
-V, --verbose enable verbose logging -V, --verbose enable verbose logging
Supported output formats depend on the Blender installation, but will Supported output formats depend on the Blender installation, but will
generally include TGA, IRIS, JPEG, MOVIE, IRIZ, RAWTGA, AVIRAW, AVIJPEG, PNG, generally include TGA, IRIS, JPEG, MOVIE, IRIZ, RAWTGA, AVIRAW, AVIJPEG,
BMP, and FRAMESERVER. PNG, BMP, and FRAMESERVER.
``cube2sphere`` can be run in a headless environment (e.g., a `cube2sphere` can be run in a headless environment (e.g., a server).
server).
Examples 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 $ 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 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. It assumes that Blender is installed and the `blender` executable is
listed in the system PATH environment variab
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/

View file

@ -4,8 +4,8 @@ __author__ = 'Xyene'
from setuptools import setup, find_packages from setuptools import setup, find_packages
import os import os
with open('README.rst') as file: with open(os.path.join(os.path.dirname(__file__), 'README.md')) as fh:
long_description = file.read() long_description = fh.read()
with open(os.path.join(os.path.dirname(os.path.realpath(__file__)), 'cube2sphere', 'version.py')) as version: with open(os.path.join(os.path.dirname(os.path.realpath(__file__)), 'cube2sphere', 'version.py')) as version:
exec (version.read()) exec (version.read())
@ -14,6 +14,7 @@ setup(name='cube2sphere',
version=__version__, version=__version__,
description='Utility to map 6 cube (cubemap, skybox) faces into an equirectangular (cylindrical projection, skysphere) map', description='Utility to map 6 cube (cubemap, skybox) faces into an equirectangular (cylindrical projection, skysphere) map',
long_description=long_description, long_description=long_description,
long_description_content_type='text/markdown',
author='Tudor Brindus', author='Tudor Brindus',
author_email='me@tbrindus.ca', author_email='me@tbrindus.ca',
url='http://github.com/Xyene/cube2sphere', url='http://github.com/Xyene/cube2sphere',