|
ilja space
94c4498f90
Add visual to README.md
The README didn't show screenshots of how the tool looks. Being a GUI tool, imo it should have this. The images have gotten an image decription in the EXIF data through the tool (: The same description is also used in the 'alt' attribute in the README.md. |
||
|---|---|---|
| installation | Add installation instructions | |
| LICENSES | Add installation instructions | |
| Qml | Adapt starting size a bit | |
| README | Add visual to README.md | |
| .gitignore | Add visual to README.md | |
| main.py | Improve rotation code | |
| README.md | Add visual to README.md | |
This is a simple gui tool (using QT and Python) to read and change the image description from an image.
The tool has a drop area where one can drop an image. The tool reads the image description from the exif data and shows it in a text box. The description can be changed and saved back to the file.
Scope
The tool should remain simple, but some things could still be improved,
- a fallback to also read and store "Caption-Abstract" could be added.
- If multiple relevant fields are used, maybe they could be shown separate, or maybe in one field with a fallback logic, or it could be some setting or checkbox or something.
- At the moment EXIF Orientation is only used for rotation, not mirroring. If needed, this could be added in the future.
- The QML currently has some hacks who could probably use some clean-up.
Quick Setup
To set up, make sure you have exiftool in your PATH, then you can set this up with
uv venv
source .venv/bin/activate
uv pip install pyside6
python main.py
deactivate
To run
source .venv/bin/activate
python main.py
deactivate
Installation
For a more comprehensive explanation and installation, check installation/README.md
Reading
The code consists of both Python and QML.
The code starts in main.py where we do some imports and set some global variables.
The we have the classes, tagged with @QmlElement, who can be used in the QML parts of our code.
Then we start the GUI, which is also where we load the QML files.
The QML files can be found in the Qml folder. The qmldir contains metadata needed by QML.
The Main.qml is where we start the qml.
To call a Python class tagged with @QmlElement, we can do something like
Python code:
@QmlElement
class EXIFTools(QObject):
# This is a simple demo method, just to easily check if this is working
@Slot(result=str)
def getDemoText(self):
return "it's working alright!"
Corresponding QML code:
// This is the name of the Python class
EXIFTools {
// This allows us to call the EXIFTools object defined in our Python code
id: exiftools
}
TextArea {
text: exiftools.getDemoText()
}
License
See each file for relevant license. In general you can consider the code GPL-3.0-or-later, and the documentation CC-BY-SA-4.0.