diff --git a/.gitignore b/.gitignore index b6668dc..3e21bf9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,4 @@ -local_files/ -debug.* -debug_log/ +test/ +dist/ .ropeproject/ __pycache__/ -config/tui_settings.yaml -config/exif.yaml diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a850a1..b0dca39 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ # Changelog ## 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 - Version on pypi. - .1 and .2 have no change, but had to republish the file, which required to increase the version number. diff --git a/README.md b/README.md index 4036576..d9b01d7 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,13 @@ -# OPTIMA-35 -Very WIP... -Splitting core (OPTIMA35 (this)) and ui ([OptimaLab35](https://gitlab.com/CodeByMrFinchum/optima-lab-35)) +# OPTIMA35 +[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) -[pip package](https://pypi.org/project/optima35/) +can be installed with pip, dependencies will be installed automaticly. +```bash +pip install optima35 +``` ## 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. @@ -13,29 +15,30 @@ This project replaces my earlier [analogphotography](https://gitlab.com/sf-bashs ### 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. -- 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. 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: -**Implemented Features:** -- **Image Processing:** - - Resizing - - Renaming with order adjustment - - Grayscale conversion - - Brightness adjustment - - Contrast adjustment -- **EXIF Management:** - - Copy EXIF data - - Add custom EXIF information - - Add GPS data - - Add a date to EXIF - - Remove EXIF -- **Watermarking** +**Image Processing:** +- Resizing +- Renaming with order adjustment +- Grayscale conversion +- Brightness adjustment +- Contrast adjustment + +**EXIF Management:** +- Copy EXIF data +- Add custom EXIF information +- Add GPS data +- Add a date to EXIF +- Remove EXIF + +**Watermarking** ## 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. - **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 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. diff --git a/optima35/__init__.py b/optima35/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..b6e50a1 --- /dev/null +++ b/pyproject.toml @@ -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" diff --git a/src/optima35/__init__.py b/src/optima35/__init__.py new file mode 100644 index 0000000..ccaf771 --- /dev/null +++ b/src/optima35/__init__.py @@ -0,0 +1 @@ +__version__ = "0.6.3-a2" diff --git a/src/optima35/__main__.py b/src/optima35/__main__.py new file mode 100644 index 0000000..5eee31f --- /dev/null +++ b/src/optima35/__main__.py @@ -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() diff --git a/optima35/core.py b/src/optima35/core.py similarity index 97% rename from optima35/core.py rename to src/optima35/core.py index 5450f57..e7e122e 100644 --- a/optima35/core.py +++ b/src/optima35/core.py @@ -2,11 +2,12 @@ import re import os from datetime import datetime from optima35.image_handler import ImageProcessor, ExifHandler +from optima35 import __version__ class OptimaManager: def __init__(self): - self.name = "OPTIMA-35" - self.version = "0.6.0" + self.name = "OPTIMA35" + self.version = __version__ self.image_processor = ImageProcessor() self.exif_handler = ExifHandler() diff --git a/optima35/image_handler.py b/src/optima35/image_handler.py similarity index 100% rename from optima35/image_handler.py rename to src/optima35/image_handler.py