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

meander --stroke-color black --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.0.1.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.0.1-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: greek_meander-0.0.1.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.0.1.tar.gz
Algorithm Hash digest
SHA256 23ab0f9cf3f8640a943b4f9e73c3b08b85b6be9b5a972121365e776d72ab2faf
MD5 6ecbc4815601acb987ba48e068ca32f9
BLAKE2b-256 0d553c1c4e9bd7c4970d726e950c1462bf883f9dacce0477e904e10cd4cd7b53

See more details on using hashes here.

File details

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

File metadata

  • Download URL: greek_meander-0.0.1-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.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e939ca98d996ac8e82cfc9766c4b0144105cbf5a30a600f66c847027afb1a498
MD5 ae5b9ed89477a3dc9f1d6680144a1beb
BLAKE2b-256 895fbb9de8964b384f374d1480fe3880dabc52da28cd8f5dc9e27bd9347c7680

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