Ansitoimg

Latest version: v2024.2

Safety actively analyzes 688746 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 4

2024.2

- code quality improvements
- use ruff format
- fix --width

2024.1

- **Breaking Change** to `ansiTo.*` functions removing `wide=` option

Note:
py
def ansiToSVG(
ansiText: str,
fileName: str,
theme: str | None = None,
width: int = WIDTH_DEFAULT,
wide: bool = True,
title: str = TITLE,
):


has been replaced by:

py
def ansiToSVG(
ansiText: str,
fileName: str,
theme: str | None = None,
width: int = WIDTH_DEFAULT,
title: str = TITLE,
):


meaning that calling `ansiToSVG` with only `ansiText` and a `fileName` will result in a 49 char wide image compared to the previous 89 char wide image to match the command line behaviour.

2024 - 2024/01/07

- update dependencies

2023.3

- add: `--title` option to cli. Thank you https://github.com/ilyagr
- fix: revert erroneous removal of `_resolveWidth`

2023.2

- Use `tempfile` to manage temporary files
- Update tests

2023.1

- Implement feature: choose custom title text enhancement
(https://github.com/FHPythonUtils/AnsiToImg/issues/7)
- Implement feature: custom width from the CLI enhancement
(https://github.com/FHPythonUtils/AnsiToImg/issues/6)

Note that the `width` param overrides `wide` eg. in the case
`ansiToSVGRender(fancyHelloWorld, f"{THISDIR}/data/hwT20.svg.png", wide=True, width=20)`
the width of the output is `20` chars

Other examples:

python
ansiToSVGRender(fancyHelloWorld, f"{THISDIR}/data/hw20.svg.png", width=20)
ansiToSVGRender(fancyHelloWorld, f"{THISDIR}/data/hwT20.svg.png", wide=True, width=20)
ansiToSVGRender(fancyHelloWorld, f"{THISDIR}/data/hw40test.svg.png", width=40, title="test")


2023 - 2023/01/08

- Add tox config
- Use playwright and install_playwright in-place of pyppeteer

2022.2

- Add custom width by passing `width` to render functions. Thanks https://github.com/punctuations
(https://github.com/FHPythonUtils/AnsiToImg/issues/4)

eg.

py
ansiToSVG(cat, f"{THISDIR}/data/cat.svg", width=100)

Page 1 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.