https://github.com/anthonybench/convert
A quick way to convert data, document, and image formats.
https://github.com/anthonybench/convert
cli converter data documents images
Last synced: 5 months ago
JSON representation
A quick way to convert data, document, and image formats.
- Host: GitHub
- URL: https://github.com/anthonybench/convert
- Owner: anthonybench
- License: gpl-3.0
- Created: 2025-03-28T22:13:30.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-24T17:16:21.000Z (about 1 year ago)
- Last Synced: 2025-09-29T15:30:07.228Z (9 months ago)
- Topics: cli, converter, data, documents, images
- Language: Python
- Homepage: https://pypi.org/project/sleepyconvert/
- Size: 36.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# **sleepyconvert**
*A quick way to convert file formats.*
## **Welcome to sleepyconvert!**
Do you find yourself bookmarking various online converters or having several tools to convert common file types? I did, and it didn't spark joy.
**`sleepyconvert`** is a tool that handles this in a minimal syntax.
Quickly convert file formats to and from:
- **data**
- `csv`
- `parquet`
- `json`
- `pkl`
- `xlsx`
- **img**
- `png`
- `jpg`/`jpeg`
- **doc**
- `html`
- `pdf`
- `md`
For some data files, you can optionally compress (*gzip*) the output.
> âšī¸ Note that this tool presumes format by file extension. If you leave out extensions, or give csv data a `.json` extension for funsies, then you're being silly.
> âšī¸ Due to how document file formats vary, not all functionality can be preserved from one type to another, and formatting 1-1-ness may vary.
## **Get Started đ**
```sh
pip install sleepyconvert
pip install --upgrade sleepyconvert
python -m sleepyconvert --help
python -m sleepyconvert data data.csv data.parquet --compress
python -m sleepyconvert img photo.png photo.jpg
python -m sleepyconvert doc photo.html photo.pdf
```
## **Usage â**
Set a function in your shell environment to run a script like:
```sh
alias convert='python -m sleepyconvert'
```
Presuming you've named said macro `convert`, print the help message:
```sh
convert --help
convert data data.csv data.parquet
convert img photo.png photo.jpg
convert doc photo.html photo.pdf
```
## **Technologies đ§°**
- [Pandas](https://pandas.pydata.org/docs/)
- [Typer](https://typer.tiangolo.com/)
- [PyArrow](https://arrow.apache.org/docs/python/index.html)
- [openpyxl](https://pypi.org/project/openpyxl/)
- [weasyprint](https://pypi.org/project/weasyprint/)
- [PyMuPDF](https://pymupdf.readthedocs.io/en/latest/)
- [Markdown](PyPIhttps://pypi.org/project/Markdown/)
- [html2text](https://pypi.org/project/html2text/)
## **Contribute đ¤**
If you have thoughts on how to make the tool more pragmatic, submit a PR đ.
To add support for more data/file types:
1. append extension name to `supported__formats` in `sleepyconvert_toolchain.params.py`
2. add detection logic branch to the `main` function in `sleepyconvert_toolchain/commands.py`
3. update this readme
## **License, Stats, Author đ**




See [License](LICENSE) for the full license text.
This package was authored by *Isaac Yep*. \
đ [GitHub](https://github.com/anthonybench/convert) \
đ [PyPI](https://pypi.org/project/sleepyconvert/)