https://github.com/jfriedlein/add_metadata2file_xattr_gui_py
Python graphical user interface that allows to easily add metadata to a file using xattr (Linux)
https://github.com/jfriedlein/add_metadata2file_xattr_gui_py
caja gui linux metadata python xattr
Last synced: 3 months ago
JSON representation
Python graphical user interface that allows to easily add metadata to a file using xattr (Linux)
- Host: GitHub
- URL: https://github.com/jfriedlein/add_metadata2file_xattr_gui_py
- Owner: jfriedlein
- Created: 2025-06-26T05:41:28.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-06-26T06:28:45.000Z (3 months ago)
- Last Synced: 2025-06-26T07:22:41.961Z (3 months ago)
- Topics: caja, gui, linux, metadata, python, xattr
- Language: Python
- Homepage:
- Size: 54.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# add_metadata2File_xattr_GUI_py
Python graphical user interface that allows to easily add metadata to a file using xattr (Linux)## What this does
Instead of putting some information into the filename of e.g. a picture, you can use this GUI to add all the information you want into the metadata of a file.This is set up for Linux using xattr and python.
Some limitations for xattr exist (data size ~kByte, etc.). Also note that copying files with xattr can be strange.
## How-to
### Usage with file explorer caja
- Download the "xattr_gui.py" script and place it into ~/.config/caja/scripts
- You probably need to add some python packages (tkinter, xattr, ...)
- Select a file in the file explorer caja, right-click on the file -> "Scripts" -> "xattr_gui.py"
- A python GUI opens which loads the file attributes for the selected file, e.g. for the python script itself:
- In the text box after "Attribute name:", you can enter the name of the attribute, e.g. "internal length parameter"
- In the text box after "Note:", you can add your text or value, here e.g. "2 mm"
- Clicking on the button "Store" will save the attribute using xattr
- Once one or more attributes exist for a file, a drop-down menu appears which allows to show/edit existing attributes or "Add new attribute..."
- With this window open, you can also drag&drop a different file into it to add or check its attributes
- Note, in the python script the GUI is set as "always on top" to ease drag&drop. In case you don't like this, you remove the Python code line setting the window as topmost.## Health warning
This is a quick&dirty 2 hour AI-based implementation.## ToDos
- Text selection is not possible in my "Note:" field, why?
- Check why file copies add each byte as hex
- collect the needed python packages
- This could be packed into a standalone python executable to avoid the need for a python installation and the GUI packages.