Simple way to convert files to another formats
Project description
ConvertFilesClass
The main idea is to simplify converting files to another formats
ONLY LINUX!!!
For now support:
From | To |
---|---|
JPG | PNG, BMP, TIFF |
PNG | JPG, BMP, TIFF |
DOCX | PDF, ODT, HTML, TXT, RTF |
HTML |
Converting to
HTML
is sometimes looks weird because oflibreoffice
package
Preparation
- Install
libreoffice
Linux package:- Arch:
yay -S libreoffice
- Ubuntu, RedHat:
sudo apt install libreoffice
- Install
multi-file-converter
:pip install multi-file-converter
Usage
from file_converter import JPG, PNG
jpg = JPG('media/input.jpg') # or io.BytesIO object
png_bytes = jpg.convert_to_png() # convert and return new io.BytesIO object
with open('media/output.png', 'wb') as outfile:
outfile.write(png_bytes.getbuffer()) # write to file
# show converted image
png = PNG(png_bytes)
png.img.show()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file multi_file_converter-1.0.9.tar.gz
.
File metadata
- Download URL: multi_file_converter-1.0.9.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f829171054fc1677ebb2bf828fcffc697f104deae9bc278fe26651fec88a4bad |
|
MD5 | 09029357792df1d9251f66c557314542 |
|
BLAKE2b-256 | cba0e76cfeae5de45cefa2affc112169b403df2143037b978ebb400df2687e0e |
File details
Details for the file multi_file_converter-1.0.9-py3-none-any.whl
.
File metadata
- Download URL: multi_file_converter-1.0.9-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f99b0950f15ab235f937b5639cf4fc79f4b585eea2426c176a4b3d0b4acb4d64 |
|
MD5 | 3d6c0865fa8be0b7f4a0ca88e9427a55 |
|
BLAKE2b-256 | a04a36a4c02bd27c6ca39fc5f560090127e2a3725d41abe47f47035ce6cfdbcb |