An open API service indexing awesome lists of open source software.

https://github.com/sylordis/grid-generator

Python tool to generate shapes in a grid from an simple text representative file.
https://github.com/sylordis/grid-generator

board-game grid-layout python python3 shapes

Last synced: 29 days ago
JSON representation

Python tool to generate shapes in a grid from an simple text representative file.

Awesome Lists containing this project

README

        

# Grid Generator

Python tool to generate shapes in a grid from a simple text representative file.

**This project is still under construction.**

## Dependencies

This software uses Python 3.13.

The rest of the dependencies can be seen in the [requirements.txt file](requirements.txt).

## Installation

In the root directory of this repo:

1. Setup a virtual environment `python -m venv .venv`.
1. Activate the virtual environment `source .venv/bin/activate` (linux) or `source .venv/Scripts/activate` (windows).
1. Install the requirements `pip install -r requirements.txt`.

## Usage

From outside this repo, with the virtual environment activated:

```bash
python -m grid-generator [options]
```

SVG files will be created in the directory of the input files or in the directory specified by `--dist`/`-d`.

*Warning:* the dist directory as to be created before-hand.

You can also run `python -m grid-generator --help` for help.

**Using test data as inputs:**

From outside this repo, inside the virtual environment:

```bash
python -m grid-generator -d grid-generator/dist grid-generator/test/data/samples/*.txt
```

## Input files

Grammar of the input file is described in its own [documentation file](doc/input_file_definition.md).

## Development

Unit tests can be run with `pytest grid-generator` from outside the root of this repository.

Coverage results can be obtained with `coverage run -m pytest grid-generator` then `coverage report -m`

## Author / Contributing

* Sylvain Domenjoud aka "[Sylordis](https://github.com/Sylordis)" (creator and maintainer)

## License

This project is licensed under the GPL-3.0 license - see the [LICENSE](LICENSE) file for details

## Links

Project website:

## Issues

Issues are reported here: