Merge branch 'refactor/package-structure' into 'main'
Refactor/package structure See merge request CodeByMrFinchum/optima35!10
This commit is contained in:
commit
3d19c81385
9 changed files with 73 additions and 37 deletions
7
.gitignore
vendored
7
.gitignore
vendored
|
@ -1,7 +1,4 @@
|
||||||
local_files/
|
test/
|
||||||
debug.*
|
dist/
|
||||||
debug_log/
|
|
||||||
.ropeproject/
|
.ropeproject/
|
||||||
__pycache__/
|
__pycache__/
|
||||||
config/tui_settings.yaml
|
|
||||||
config/exif.yaml
|
|
||||||
|
|
|
@ -1,6 +1,12 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## 0.6.x
|
## 0.6.x
|
||||||
|
### 0.6.3-a2
|
||||||
|
- Adding __version__ to `__init__.py` so version is automaticly updated in program as well as pypi.
|
||||||
|
|
||||||
|
### 0.6.3-a1
|
||||||
|
- Adding postfix a to indicate alpha version, making it clear that it is in an early state
|
||||||
|
|
||||||
### 0.6.2
|
### 0.6.2
|
||||||
- Version on pypi.
|
- Version on pypi.
|
||||||
- .1 and .2 have no change, but had to republish the file, which required to increase the version number.
|
- .1 and .2 have no change, but had to republish the file, which required to increase the version number.
|
||||||
|
|
54
README.md
54
README.md
|
@ -1,11 +1,13 @@
|
||||||
# OPTIMA-35
|
# OPTIMA35
|
||||||
Very WIP...
|
[optima35](https://gitlab.com/CodeByMrFinchum/optima35) is a package utilizing pillow and piexif to modify images, I have also an GUI for this package, [OptimaLab35](https://gitlab.com/CodeByMrFinchum/OptimaLab35)
|
||||||
Splitting core (OPTIMA35 (this)) and ui ([OptimaLab35](https://gitlab.com/CodeByMrFinchum/optima-lab-35))
|
|
||||||
|
|
||||||
[pip package](https://pypi.org/project/optima35/)
|
can be installed with pip, dependencies will be installed automaticly.
|
||||||
|
```bash
|
||||||
|
pip install optima35
|
||||||
|
```
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
**OPTIMA-35** (**Organizing, Processing, Tweaking Images, and Modifying scanned Analogs from 35mm Film**) is a Python-based project designed to streamline the management and editing of metadata and images from analog photography. While it was created with analog photography in mind, it is versatile enough to handle any type of images.
|
**OPTIMA35** (**Organizing, Processing, Tweaking Images, and Modifying scanned Analogs from 35mm Film**) is a Python-based project designed to streamline the management and editing of metadata and images from analog photography. While it was created with analog photography in mind, it is versatile enough to handle any type of images.
|
||||||
|
|
||||||
This project replaces my earlier [analogphotography](https://gitlab.com/sf-bashscripts/analogphotography) bash script collection, which has now been archived in favor of OPTIMA-35.
|
This project replaces my earlier [analogphotography](https://gitlab.com/sf-bashscripts/analogphotography) bash script collection, which has now been archived in favor of OPTIMA-35.
|
||||||
|
|
||||||
|
@ -13,29 +15,30 @@ This project replaces my earlier [analogphotography](https://gitlab.com/sf-bashs
|
||||||
|
|
||||||
### Development and Versioning Notes
|
### Development and Versioning Notes
|
||||||
|
|
||||||
**OPTIMA-35** is currently in an **alpha stage** and under active development. As a result:
|
**OPTIMA35** is currently in an **alpha stage** and under active development. As a result:
|
||||||
- The README may occasionally be outdated.
|
- The README may occasionally be outdated.
|
||||||
- Users are encouraged to check for new branches and read the [**CHANGELOG**](https://gitlab.com/CodeByMrFinchum/optima-35/-/blob/main/CHANGELOG.md?ref_type=heads), which is consistently updated and well-documented.
|
- Users are encouraged to check for new branches and read the [**CHANGELOG**](https://gitlab.com/CodeByMrFinchum/optima35/-/blob/main/CHANGELOG.md?ref_type=heads), which is consistently updated and well-documented.
|
||||||
- Bugs or unforeseen behavior may occur.
|
- Bugs or unforeseen behavior may occur.
|
||||||
|
|
||||||
While the project follows a semantic versioning structure (major.minor.patch), breaking changes—typically reserved for major version increments—may also occur in minor version updates during this development phase. Please review the changelog carefully before updating.
|
While the project follows a semantic versioning structure (major.minor.patch), breaking changes—typically reserved for major version increments—may also occur in minor version updates during this development phase. Please review the changelog carefully before updating.
|
||||||
|
|
||||||
### Available Features:
|
### Available Features:
|
||||||
|
|
||||||
**Implemented Features:**
|
**Image Processing:**
|
||||||
- **Image Processing:**
|
- Resizing
|
||||||
- Resizing
|
- Renaming with order adjustment
|
||||||
- Renaming with order adjustment
|
- Grayscale conversion
|
||||||
- Grayscale conversion
|
- Brightness adjustment
|
||||||
- Brightness adjustment
|
- Contrast adjustment
|
||||||
- Contrast adjustment
|
|
||||||
- **EXIF Management:**
|
**EXIF Management:**
|
||||||
- Copy EXIF data
|
- Copy EXIF data
|
||||||
- Add custom EXIF information
|
- Add custom EXIF information
|
||||||
- Add GPS data
|
- Add GPS data
|
||||||
- Add a date to EXIF
|
- Add a date to EXIF
|
||||||
- Remove EXIF
|
- Remove EXIF
|
||||||
- **Watermarking**
|
|
||||||
|
**Watermarking**
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
|
|
||||||
|
@ -43,15 +46,6 @@ While the project follows a semantic versioning structure (major.minor.patch), b
|
||||||
- **piexif**: For reading, modifying, and writing EXIF metadata.
|
- **piexif**: For reading, modifying, and writing EXIF metadata.
|
||||||
- **pillow**: For image processing.
|
- **pillow**: For image processing.
|
||||||
|
|
||||||
### Installing Dependencies
|
|
||||||
|
|
||||||
You can install the dependencies using the requirements.txt
|
|
||||||
|
|
||||||
Using `pip`:
|
|
||||||
```bash
|
|
||||||
pip install -r requirements.txt
|
|
||||||
```
|
|
||||||
|
|
||||||
# Use of LLMs
|
# Use of LLMs
|
||||||
In the interest of transparency, I disclose that Generative AI (GAI) large language models (LLMs), including OpenAI’s ChatGPT and Ollama models (e.g., OpenCoder and Qwen2.5-coder), have been used to assist in this project.
|
In the interest of transparency, I disclose that Generative AI (GAI) large language models (LLMs), including OpenAI’s ChatGPT and Ollama models (e.g., OpenCoder and Qwen2.5-coder), have been used to assist in this project.
|
||||||
|
|
||||||
|
|
29
pyproject.toml
Normal file
29
pyproject.toml
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
[build-system]
|
||||||
|
requires = ["hatchling"]
|
||||||
|
build-backend = "hatchling.build"
|
||||||
|
|
||||||
|
[project]
|
||||||
|
name = "optima35"
|
||||||
|
dynamic = ["version"]
|
||||||
|
authors = [{ name = "Mr. Finchum" }]
|
||||||
|
description = "OPTIMA35 is a package to modify images with pillow and piexif."
|
||||||
|
readme = "README.md"
|
||||||
|
requires-python = ">=3.8"
|
||||||
|
dependencies = ["piexif", "pillow"]
|
||||||
|
classifiers = [
|
||||||
|
"Programming Language :: Python :: 3",
|
||||||
|
"License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)",
|
||||||
|
"Operating System :: OS Independent",
|
||||||
|
]
|
||||||
|
|
||||||
|
[project.urls]
|
||||||
|
Homepage = "https://gitlab.com/CodeByMrFinchum/optima35"
|
||||||
|
|
||||||
|
[project.scripts]
|
||||||
|
optima35 = "optima35.__main__:main"
|
||||||
|
|
||||||
|
[tool.hatch.build.targets.wheel]
|
||||||
|
packages = ["src/optima35"]
|
||||||
|
|
||||||
|
[tool.hatch.version]
|
||||||
|
path = "src/optima35/__init__.py"
|
1
src/optima35/__init__.py
Normal file
1
src/optima35/__init__.py
Normal file
|
@ -0,0 +1 @@
|
||||||
|
__version__ = "0.6.3-a2"
|
8
src/optima35/__main__.py
Normal file
8
src/optima35/__main__.py
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
from . import __version__
|
||||||
|
|
||||||
|
def main():
|
||||||
|
print(f"optima35 (v{__version__}) is a core library and not intended to be run directly.")
|
||||||
|
print("Please use OptimaLab35 for a UI, run pip install OptimaLab35 and start with OptimaLab35.")
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
|
@ -2,11 +2,12 @@ import re
|
||||||
import os
|
import os
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from optima35.image_handler import ImageProcessor, ExifHandler
|
from optima35.image_handler import ImageProcessor, ExifHandler
|
||||||
|
from optima35 import __version__
|
||||||
|
|
||||||
class OptimaManager:
|
class OptimaManager:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.name = "OPTIMA-35"
|
self.name = "OPTIMA35"
|
||||||
self.version = "0.6.0"
|
self.version = __version__
|
||||||
self.image_processor = ImageProcessor()
|
self.image_processor = ImageProcessor()
|
||||||
self.exif_handler = ExifHandler()
|
self.exif_handler = ExifHandler()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue