Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/baconismycopilot/imgconvert
https://github.com/baconismycopilot/imgconvert
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/baconismycopilot/imgconvert
- Owner: baconismycopilot
- Created: 2022-03-30T01:09:04.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-03-30T01:18:08.000Z (over 2 years ago)
- Last Synced: 2024-06-28T10:32:50.350Z (5 months ago)
- Language: Python
- Size: 1.95 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# imgconvert
Convert images matching a given list of types to another format.
Does not manipulate source files, only reads and then converts to another format into the `target_dir` in the `target_format`.
## How to use it
### Configuration
Config is read from `config.yaml`.
### Run it
```python
>>> config = read_config("config.yml")
>>> converter = Convert(source_dir=config.get("source_dir"),
target_dir=config.get('target_dir'),
target_format=config.get('target_format'),
file_types=config.get("file_types"))
>>> converter.read_dir()
>>> converter.clean(verbose=True)
>>> converter.convert(verbose=True)
```