diff --git a/README.md b/README.md index 111b23f..23206f6 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,20 @@ # resvg-py -## Usage +`resvg-py` provides a Python interface to the `resvg` library, an open-source SVG rendering library that can be used to convert SVG images to various other formats such as PNG, PDF, and SVGZ. + +The purpose of `resvg-py` is to provide a convenient way to use `resvg` from within Python code, without the need for external dependencies. By using `resvg-py`, developers can incorporate SVG rendering functionality directly into their Python applications, making it easier to work with SVG images and to create high-quality, scalable graphics for their projects. + +With `resvg-py`, developers can: + +* Load SVG files and render them to various output formats +* Control the output size, resolution, and quality of the rendered images +* Modify SVG documents programmatically before rendering +* Work with SVG images directly within their Python code, without the need for external tools or libraries + +Overall, `resvg-py` provides a simple and powerful way to work with SVG images in Python, and can be a useful tool for developers who need to work with vector graphics in their projects. + + +# Usage ```python from pathlib import Path @@ -19,15 +33,36 @@ with Path("resources/examples/svg/octocat.svg").open("r") as f: ``` -## Development +# How To Build + +## Install Rust, Set up Python Dev Requirements + +**Windows** + +```sh +choco install rust +``` + +**Set up Virtual Environemt** + +```sh +python -m venv venv +.\venv\Scripts\Activate.bat +``` + +**Install Maturin and Pytest** + +```sh +pip install -r requirements-dev.txt +``` -### Build +## Build Python Wheel ```sh maturin develop ``` -### Test +## Run Tests ```sh pytest diff --git a/requirements-dev.txt b/requirements-dev.txt new file mode 100644 index 0000000..9504c81 --- /dev/null +++ b/requirements-dev.txt @@ -0,0 +1,3 @@ +maturin +pytest +pytest-snapshot