Skip to main content

A package for generating Greek key meanders

Project description

Greek Key Meander Generator

PyPI version

This Python script generates Greek key meander patterns as SVG and PNG images.

Examples

Rectangle

Meander Rectangle

Circle

Meander Circle

Description

The script uses the drawsvg library to create the pattern and cairosvg to convert it to a PNG image. The pattern's dimensions, colors, and other properties can be customized through command-line arguments.

Installation

You can install the package from PyPI:

pip install greek_meander

This will also install the required dependencies: drawsvg and cairosvg.

Or you can install via pip the two packages above then run the script meander.py directly.

Usage

The script can be run from the command line with different subcommands to generate various types of meander patterns.

General Options

These options apply to all pattern types:

Argument Type Default Description
--stroke-width float 2.0 Line thickness in pixels.
--stroke-color str '#AB8E0E' Line color (name, hex, or RGB).
--stroke-opacity float 0.7 Line transparency (0.0 to 1.0).
--border-margin int 1 The margin of borders.
--file str 'meander' Output filename for SVG and PNG.

N.B. you need to have general options before rect or circle subcommand, followed by subcommand specific options.

Rectangle Pattern

To generate a rectangular meander pattern, use the rect subcommand.

meander rect [options]

Rectangle Options

Argument Type Default Description
--size int 10 Size of the pattern unit.
--width int 16 Number of patterns horizontally.
--height int 9 Number of patterns vertically.

Rectangle Example

To run the python script directly

python meander.py --stroke-color "#AB8E0E" --stroke-opacity 0.7 rect --width 24 --height 13 --size 10

Or if you installed greak_meander

meander --stroke-color "#AB8E0E" --stroke-opacity 0.7 rect --width 24 --height 13 --size 10

Circle Pattern

To generate a circular meander pattern, use the circle subcommand.

meander circle [options]

Circle Options

Argument Type Default Description
--pattern-count int 30 Number of patterns in the circle.
--radius int 300 The radius of the circle.

Circle Example

To run the python script directly

python meander.py --stroke-color green --file images/meander_circle circle

Or if you installed greak_meander

meander --stroke-color green --file images/meander_circle circle

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

greek_meander-0.1.0.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

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

greek_meander-0.1.0-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: greek_meander-0.1.0.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for greek_meander-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a2509b305807e43650393121f9e8a0dd73d233235a86e7cbcdfb2690116ecb11
MD5 ab2b30896e2dd724b5ca62b74dc42ba6
BLAKE2b-256 2ad04a417be42a471e4521f3d24d2062b56692a8f8de05dc6547211502104a3e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: greek_meander-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for greek_meander-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dcf10ea20eca3c2093a923d49be277749de27ea0e7f4e4424b033682f762be36
MD5 83dfc4c30716918a3c19fb3564bb70bc
BLAKE2b-256 aa69976601cad6bd39cfa886479fee725ce971674d90382891af230b20cd63c3

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