Skip to main content

Draw beautiful ASCII and SVG pine trees (elkis)

Project description

elkjs

Draw beautiful ASCII and SVG pine trees (elkis).

Installation

pip install elkjs

Usage

from elkjs import PineTree, TreeStyle, Forest, render_svg

# Single tree
tree = PineTree(height=12, style=TreeStyle.SNOW, seed=42)
print(tree)

# Festive tree
print(PineTree(height=8, style=TreeStyle.FESTIVE))

# SVG output
svg = render_svg(tree, width=200, height=300)

# Random forest
forest = Forest.generate(count=7, min_height=5, max_height=15, seed=99)
print(forest)

CLI

elkjs tree --height 12 --style snow
elkjs tree --height 8 --style festive --svg tree.svg
elkjs forest --count 7 --seed 42

Styles

  • classic — traditional symmetric pine
  • sparse — airy, fewer branches
  • dense — thick full foliage
  • snow — snow-capped branches
  • minimal — simple outline
  • festive — decorated with ornaments

License

MIT

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

elkjs-0.1.0.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

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

elkjs-0.1.0-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: elkjs-0.1.0.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for elkjs-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f0c87d267ac3e80ae1b4963597f5331914b95d267728ad6b9c227fd4be944ea0
MD5 cb0ca801132736b2ad21fba376235b1d
BLAKE2b-256 5965b9f7e9be66d8f5f8f641a24eed3e0f2a2c699f0f9678be0955d7380e2c66

See more details on using hashes here.

File details

Details for the file elkjs-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: elkjs-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for elkjs-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f0a0fde545e44dfa062eb9ffc3a714323d44e2ecff105bfd21162c5598ae05ab
MD5 5b30f4701575b6341c4bd1d409036e66
BLAKE2b-256 2705d16c6fce782d24b04b30953d9eab34f2e4d6816b8877b2a58cf1b68f23db

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