Skip to main content

Render random chinese text in 3D

Project description

sanwei

PyPI - Version PyPI - Python Version


Table of Contents

Installation

nix shell git+https://github.com/fetsorn/sanwei
pip install sanwei

Usage

# render a random chinese character with WenQuanYi Zen Hei font
nix build git+https://github.com/fetsorn/sanwei#image
sanwei --binary /path/to/blender \
       --font-path "/path/to/font" \
       --font-name "Font Name Regular"

Docs

  • "--binary", required, path to Blender binary executable, e.g. "/Applications/Blender.app/Contents/MacOS/Blender"

  • "--font-path", required, path to chinese font, e.g. "./path/to/chinese.ttc"

  • "--font-name", required, name of the font in bpy.data.fonts, e.g. "Chinese Font Regular"

  • "--output", optional, name for output file without the .png extension, defaults to "/tmp/sanwei" and creates a "/tmp/sanwei.png" file

  • "--input", optional, arbitrary text to render, defaults to a random chinese character

  • "--resolution", optional, percentage scale for render resolution, int in [1, 32767], default 100

  • "--samples", optional, number of samples for the Cycles render engine, default 128

License

sanwei is distributed under the terms of the MIT license.

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

sanwei-0.0.1.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sanwei-0.0.1-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file sanwei-0.0.1.tar.gz.

File metadata

  • Download URL: sanwei-0.0.1.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.23.3

File hashes

Hashes for sanwei-0.0.1.tar.gz
Algorithm Hash digest
SHA256 4105c9d0eef68c68d8377dd7da5fad5b983c7cf1cca52af54ef7d30e12c2ab1a
MD5 05a6c8071fba9bd275330f306dcf23b8
BLAKE2b-256 3efeff59e5bf6018ddafc3c260240b617b08c4a43e7fcb610d1214c45ac3cb47

See more details on using hashes here.

File details

Details for the file sanwei-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: sanwei-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.23.3

File hashes

Hashes for sanwei-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 11e508ae4988d132caec24532d47658a057e651ee4ca3b853dea61b1457c9011
MD5 2103190ad3dc1a0f0d6eb6b6e508ebd2
BLAKE2b-256 3658342c03120b45cb9a5a587de178d48a185f04925c97dd3bb60e4aebfd2062

See more details on using hashes here.

Supported by

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