Merge branch 'refactor/package-structure' into 'main'
Refactor/package structure See merge request CodeByMrFinchum/OptimaLab35!2
This commit is contained in:
commit
daf893ad6f
18 changed files with 86 additions and 108 deletions
7
.gitignore
vendored
7
.gitignore
vendored
|
@ -1,7 +1,4 @@
|
|||
local_files/
|
||||
debug.*
|
||||
debug_log/
|
||||
test/
|
||||
dist/
|
||||
.ropeproject/
|
||||
__pycache__/
|
||||
config/tui_settings.yaml
|
||||
config/exif.yaml
|
||||
|
|
18
CHANGELOG.md
18
CHANGELOG.md
|
@ -1,9 +1,17 @@
|
|||
# Changelog
|
||||
|
||||
## 0.0.x
|
||||
### 0.0.4-a2
|
||||
- Adding __version__ to `__init__.py` so version is automaticly updated in program as well as pypi.
|
||||
|
||||
### 0.0.4-a1
|
||||
- Refactored project structure, moving all code to the `src` directory.
|
||||
- Adjusted imports and setup to accommodate the new folder structure.
|
||||
- Skipped version numbers to `.4` due to PyPI versioning constraints (testing purposes).
|
||||
|
||||
### 0.0.1 - Initial UI-Focused Release
|
||||
- Forked from OPTIMA35
|
||||
- Refactored the project to include only UI elements; all core OPTIMA35 files have been removed.
|
||||
- Updated the changelog to reflect the changes.
|
||||
- Integrated with OPTIMA35 from pip, ensuring TUI and GUI functionalities work seamlessly.
|
||||
- Made initial adjustments to the README for clarity and structure.
|
||||
- Forked from OPTIMA35.
|
||||
- Removed core OPTIMA35 files to focus exclusively on UI components.
|
||||
- Integrated OPTIMA35 functionality via the pip package.
|
||||
- Ensured both TUI and GUI modes operate seamlessly.
|
||||
- Revised the README for improved clarity and structure.
|
||||
|
|
72
README.md
72
README.md
|
@ -1,12 +1,18 @@
|
|||
# OptimaLab35
|
||||
UI for [OPTIMA35](https://gitlab.com/CodeByMrFinchum/optima-35) package, WIP.
|
||||
|
||||
[OptimaLab35](https://gitlab.com/CodeByMrFinchum/OptimaLab35) is UI for [optima35](https://gitlab.com/CodeByMrFinchum/optima35), currently in heavy development.
|
||||
|
||||
## 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.
|
||||
|
||||
## Current Status
|
||||
### Installation
|
||||
install via pip and all dependencies will be installed (exept simple-term-menu which is used for TUI, but that package is only aviable for linux)
|
||||
|
||||
```Bash
|
||||
pip install OptimaLab35
|
||||
```
|
||||
### Development and Versioning Notes
|
||||
|
||||
**OptimaLab35** is currently in an **alpha stage** and under active development. As a result:
|
||||
|
@ -18,53 +24,36 @@ While the project follows a semantic versioning structure (major.minor.patch), b
|
|||
|
||||
**OptimaLab35** supports two modes: **GUI** and **TUI**.
|
||||
- The **GUI** is loaded by default if **PySide6** is available.
|
||||
- The **TUI** serves as a fallback when **PySide6** is unavailable or can be started explicitly using the `--tui` option with `main.py`.
|
||||
- The **TUI** serves as a fallback when **PySide6** (PySide6 is a dependency..) is unavailable or can be started explicitly using the `--tui` option with `main.py`.
|
||||
|
||||
While all features are implemented and functional, the designs of both the GUI and TUI are not yet finalized. Some safety checks are still under development.
|
||||
|
||||
|
||||
### Available Features:
|
||||
### OptimaLab35 used features from optima35 to:
|
||||
**Image Processing:**
|
||||
- Resizing
|
||||
- Renaming with order adjustment
|
||||
- Grayscale conversion
|
||||
- Brightness adjustment
|
||||
- Contrast adjustment
|
||||
|
||||
**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**
|
||||
**EXIF Management:**
|
||||
- Copy EXIF data
|
||||
- Add custom EXIF information
|
||||
- Add GPS data
|
||||
- Add a date to EXIF
|
||||
- Remove EXIF
|
||||
|
||||
**Watermarking**
|
||||
|
||||
|
||||
### Preview GUI
|
||||
**GUI for OPTIMA-35** with KvArcDark theme on Linux
|
||||
|
||||
**Main windows**
|
||||
|
||||
{width=40%}
|
||||
|
||||
**Exif tab when opened, settings disabled by default**
|
||||
|
||||
{width=40%}
|
||||
|
||||
**Exif tab after enabeling own exif data**
|
||||
|
||||
{width=40%}
|
||||
|
||||
**Dialog window to modify exif file without need to open yaml file**
|
||||
|
||||
{width=40%}
|
||||
OUT OF DATE, comming soon
|
||||
|
||||
### Preview TUI
|
||||
**asciinema recording for TUI**
|
||||
|
||||

|
||||
|
||||
OUT OF DATE, comming soon
|
||||
|
||||
## Dependencies
|
||||
|
||||
|
@ -75,15 +64,6 @@ While all features are implemented and functional, the designs of both the GUI a
|
|||
- **pyside6**: For the GUI mode.
|
||||
- **simple_term_menu**: For the TUI mode.
|
||||
|
||||
### Installing Dependencies
|
||||
|
||||
You can install the dependencies using the requirements file
|
||||
|
||||
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.
|
||||
|
||||
|
|
|
@ -1,34 +0,0 @@
|
|||
artist:
|
||||
- Mr. Finchum
|
||||
- John Doe
|
||||
copyright_info:
|
||||
- All Rights Reserved
|
||||
- CC BY-NC 4.0
|
||||
- No Copyright
|
||||
image_description:
|
||||
- ILFORD DELTA 3200
|
||||
- ILFORD ILFOCOLOR
|
||||
- LomoChrome Turquoise
|
||||
- Kodak 200
|
||||
iso:
|
||||
- "100"
|
||||
- "200"
|
||||
- "400"
|
||||
- "800"
|
||||
- "1000"
|
||||
- "1600"
|
||||
- "3200"
|
||||
lens:
|
||||
- Nikon LENS SERIES E 50mm
|
||||
- AF NIKKOR 35-70mm
|
||||
- Canon FD 50mm f/1.4 S.S.C
|
||||
make:
|
||||
- Nikon
|
||||
- Canon
|
||||
model:
|
||||
- FG
|
||||
- F50
|
||||
- AE-1
|
||||
user_comment:
|
||||
- Scanner.NORITSU-KOKI
|
||||
- Scanner.NA
|
29
pyproject.toml
Normal file
29
pyproject.toml
Normal file
|
@ -0,0 +1,29 @@
|
|||
[build-system]
|
||||
requires = ["hatchling"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[project]
|
||||
name = "OptimaLab35"
|
||||
dynamic = ["version"]
|
||||
authors = [{ name = "Mr. Finchum" }]
|
||||
description = "User interface for OPTIMA35."
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.8"
|
||||
dependencies = ["optima35", "pyside6"]
|
||||
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/OptimaLab35"
|
||||
|
||||
[project.scripts]
|
||||
OptimaLab35 = "OptimaLab35.main:main"
|
||||
|
||||
[tool.hatch.build.targets.wheel]
|
||||
packages = ["src/OptimaLab35"]
|
||||
|
||||
[tool.hatch.version]
|
||||
path = "src/OptimaLab35/__init__.py"
|
|
@ -1,4 +0,0 @@
|
|||
pyyaml
|
||||
optima35
|
||||
pyside6
|
||||
simple_term_menu
|
1
src/OptimaLab35/__init__.py
Normal file
1
src/OptimaLab35/__init__.py
Normal file
|
@ -0,0 +1 @@
|
|||
__version__ = "0.0.4-a2"
|
|
@ -3,10 +3,11 @@ import os
|
|||
from datetime import datetime
|
||||
|
||||
from optima35.core import OptimaManager
|
||||
from utils.utility import Utilities
|
||||
from ui.main_window import Ui_MainWindow
|
||||
from ui.exif_handler_window import ExifEditor
|
||||
from ui.simple_dialog import SimpleDialog # Import the SimpleDialog class
|
||||
from OptimaLab35.utils.utility import Utilities
|
||||
from OptimaLab35.ui.main_window import Ui_MainWindow
|
||||
from OptimaLab35.ui.exif_handler_window import ExifEditor
|
||||
from OptimaLab35.ui.simple_dialog import SimpleDialog # Import the SimpleDialog class
|
||||
from OptimaLab35 import __version__
|
||||
|
||||
from PySide6 import QtWidgets
|
||||
from PySide6.QtWidgets import (
|
||||
|
@ -28,7 +29,7 @@ class OptimaLab35(QMainWindow, Ui_MainWindow):
|
|||
def __init__(self):
|
||||
super(OptimaLab35, self).__init__()
|
||||
self.name = "OptimaLab35"
|
||||
self.version = "0.0.1"
|
||||
self.version = __version__
|
||||
self.ui = Ui_MainWindow()
|
||||
self.ui.setupUi(self)
|
||||
self.o = OptimaManager()
|
||||
|
@ -62,7 +63,7 @@ class OptimaLab35(QMainWindow, Ui_MainWindow):
|
|||
self.ui.actionInfo.triggered.connect(self._info_window)
|
||||
|
||||
def _info_window(self):
|
||||
self.sd.show_dialog(f"{self.name} v{self.version}", f"{self.name} is a GUI for {self.o.name} (v{self.o.version})")
|
||||
self.sd.show_dialog(f"{self.name} v{self.version}", f"{self.name} v{self.version} is a GUI for {self.o.name} (v{self.o.version})")
|
||||
|
||||
def _process(self):
|
||||
self.ui.start_button.setEnabled(False)
|
|
@ -1,6 +1,7 @@
|
|||
import os
|
||||
from argparse import ArgumentParser
|
||||
|
||||
from OptimaLab35 import gui, tui
|
||||
from OptimaLab35 import __version__
|
||||
# Mainly from ChatGPT
|
||||
def check_pyside_installed():
|
||||
try:
|
||||
|
@ -10,11 +11,9 @@ def check_pyside_installed():
|
|||
return False
|
||||
|
||||
def start_gui():
|
||||
import gui
|
||||
gui.main()
|
||||
|
||||
def start_tui():
|
||||
import tui
|
||||
tui.main()
|
||||
|
||||
def main():
|
|
@ -2,13 +2,14 @@ import os
|
|||
from datetime import datetime
|
||||
# my packages
|
||||
from optima35.core import OptimaManager
|
||||
from utils.utility import Utilities
|
||||
from ui.simple_tui import SimpleTUI
|
||||
from OptimaLab35.utils.utility import Utilities
|
||||
from OptimaLab35.ui.simple_tui import SimpleTUI
|
||||
from OptimaLab35 import __version__
|
||||
|
||||
class Optima35TUI():
|
||||
class OptimaLab35_lite():
|
||||
def __init__(self):
|
||||
self.name = "OptimaLab35-lite"
|
||||
self.version = "0.0.1"
|
||||
self.version = __version__
|
||||
self.o = OptimaManager()
|
||||
self.u = Utilities()
|
||||
self.tui = SimpleTUI()
|
||||
|
@ -322,7 +323,7 @@ class Optima35TUI():
|
|||
print("Done")
|
||||
|
||||
def main():
|
||||
app = Optima35TUI()
|
||||
app = OptimaLab35_lite()
|
||||
app.run()
|
||||
|
||||
if __name__ == "__main__":
|
Loading…
Add table
Add a link
Reference in a new issue