greek-meander


Namegreek-meander JSON
Version 0.1.0 PyPI version JSON
download
home_pageNone
SummaryA package for generating Greek key meanders
upload_time2025-09-05 21:23:35
maintainerNone
docs_urlNone
authorNone
requires_python>=3.7
licenseNone
keywords greek key meander pattern generator svg
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Greek Key Meander Generator

[![PyPI version](https://badge.fury.io/py/greek-meander.svg)](https://badge.fury.io/py/greek-meander)

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

## Examples

### Rectangle

![Meander Rectangle](https://raw.githubusercontent.com/bingqiao/greek_meander/refs/heads/master/images/meander_rectangle.png)

### Circle

![Meander Circle](https://raw.githubusercontent.com/bingqiao/greek_meander/refs/heads/master/images/meander_circle.png)

## 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:

```bash
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.

```bash
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

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

Or if you installed `greak_meander`

```bash
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.

```bash
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

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

Or if you installed `greak_meander`

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

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "greek-meander",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "greek key, meander, pattern, generator, svg",
    "author": null,
    "author_email": "bqiao <bqiaodev@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/2a/d0/4a417be42a471e4521f3d24d2062b56692a8f8de05dc6547211502104a3e/greek_meander-0.1.0.tar.gz",
    "platform": null,
    "description": "# Greek Key Meander Generator\n\n[![PyPI version](https://badge.fury.io/py/greek-meander.svg)](https://badge.fury.io/py/greek-meander)\n\nThis Python script generates Greek key meander patterns as SVG and PNG images.\n\n## Examples\n\n### Rectangle\n\n![Meander Rectangle](https://raw.githubusercontent.com/bingqiao/greek_meander/refs/heads/master/images/meander_rectangle.png)\n\n### Circle\n\n![Meander Circle](https://raw.githubusercontent.com/bingqiao/greek_meander/refs/heads/master/images/meander_circle.png)\n\n## Description\n\nThe 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.\n\n## Installation\n\nYou can install the package from PyPI:\n\n```bash\npip install greek_meander\n```\n\nThis will also install the required dependencies: `drawsvg` and `cairosvg`.\n\nOr you can install via `pip` the two packages above then run the script `meander.py` directly.\n\n## Usage\n\nThe script can be run from the command line with different subcommands to generate various types of meander patterns.\n\n### General Options\n\nThese options apply to all pattern types:\n\n| Argument | Type | Default | Description |\n|---|---|---|---|\n| `--stroke-width` | float | 2.0 | Line thickness in pixels. |\n| `--stroke-color` | str | '#AB8E0E' | Line color (name, hex, or RGB). |\n| `--stroke-opacity`| float | 0.7 | Line transparency (0.0 to 1.0). |\n| `--border-margin` | int | 1 | The margin of borders. |\n| `--file` | str | 'meander' | Output filename for SVG and PNG. |\n\nN.B. you need to have general options before `rect` or `circle` subcommand, followed by subcommand specific options.\n\n### Rectangle Pattern\n\nTo generate a rectangular meander pattern, use the `rect` subcommand.\n\n```bash\nmeander rect [options]\n```\n\n#### Rectangle Options\n\n| Argument | Type | Default | Description |\n|---|---|---|---|\n| `--size` | int | 10 | Size of the pattern unit. |\n| `--width` | int | 16 | Number of patterns horizontally. |\n| `--height` | int | 9 | Number of patterns vertically. |\n\n#### Rectangle Example\n\nTo run the python script directly\n\n```bash\npython meander.py --stroke-color \"#AB8E0E\" --stroke-opacity 0.7 rect --width 24 --height 13 --size 10\n```\n\nOr if you installed `greak_meander`\n\n```bash\nmeander --stroke-color \"#AB8E0E\" --stroke-opacity 0.7 rect --width 24 --height 13 --size 10\n```\n\n### Circle Pattern\n\nTo generate a circular meander pattern, use the `circle` subcommand.\n\n```bash\nmeander circle [options]\n```\n\n#### Circle Options\n\n| Argument | Type | Default | Description |\n|---|---|---|---|\n| `--pattern-count` | int | 30 | Number of patterns in the circle. |\n| `--radius` | int | 300 | The radius of the circle. |\n\n#### Circle Example\nTo run the python script directly\n\n```bash\npython meander.py --stroke-color green --file images/meander_circle circle\n```\n\nOr if you installed `greak_meander`\n\n```bash\nmeander --stroke-color green --file images/meander_circle circle\n```\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A package for generating Greek key meanders",
    "version": "0.1.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/bingqiao/greek_meander/issues",
        "Homepage": "https://github.com/bingqiao/greek_meander"
    },
    "split_keywords": [
        "greek key",
        " meander",
        " pattern",
        " generator",
        " svg"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "aa69976601cad6bd39cfa886479fee725ce971674d90382891af230b20cd63c3",
                "md5": "83dfc4c30716918a3c19fb3564bb70bc",
                "sha256": "dcf10ea20eca3c2093a923d49be277749de27ea0e7f4e4424b033682f762be36"
            },
            "downloads": -1,
            "filename": "greek_meander-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "83dfc4c30716918a3c19fb3564bb70bc",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 3477,
            "upload_time": "2025-09-05T21:23:34",
            "upload_time_iso_8601": "2025-09-05T21:23:34.538619Z",
            "url": "https://files.pythonhosted.org/packages/aa/69/976601cad6bd39cfa886479fee725ce971674d90382891af230b20cd63c3/greek_meander-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "2ad04a417be42a471e4521f3d24d2062b56692a8f8de05dc6547211502104a3e",
                "md5": "ab2b30896e2dd724b5ca62b74dc42ba6",
                "sha256": "a2509b305807e43650393121f9e8a0dd73d233235a86e7cbcdfb2690116ecb11"
            },
            "downloads": -1,
            "filename": "greek_meander-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "ab2b30896e2dd724b5ca62b74dc42ba6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 3290,
            "upload_time": "2025-09-05T21:23:35",
            "upload_time_iso_8601": "2025-09-05T21:23:35.355393Z",
            "url": "https://files.pythonhosted.org/packages/2a/d0/4a417be42a471e4521f3d24d2062b56692a8f8de05dc6547211502104a3e/greek_meander-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-09-05 21:23:35",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "bingqiao",
    "github_project": "greek_meander",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "greek-meander"
}
        
Elapsed time: 0.51932s