CLI utility to read/write XMP fields in files
Project description
This is a simple command line utility to read/write single value fields in XMP files using the python-xmp-toolkit.
Installation
A simple install from pip:
$ pip install xmp-tool
- Note: python-xmp-toolkit depends on Exempi which needs to be
built for XMP to be installed properly.
Use your systems package manager to install Exempi, on Mac OS X with homebrew:
$ brew install exempi
On a Debian based Linux system do:
# apt-get install libexempi-dev
Usage:
$ xmp-tool -h
usage: xmp-tool [-h] [--value VALUE] [--no-sidecar] [field] file [file ...]
Read or write XMP fields in a file
positional arguments:
field The field to read/write. If no field specified entire XMP
document printed.
file A file to work on
optional arguments:
-h, --help show this help message and exit
--value VALUE A value to write to the field specified
--no-sidecar Never write to sidecar files.
Reading a field:
$ xmp-tool format test.jpg
test.jpg: format=image/jpeg
Reading the entire XMP contents of a file:
$ xmp-tool test.jpg
test.jpg: None=<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Exempi + XMP Core 5.1.2">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about=""
xmlns:dc="http://purl.org/dc/elements/1.1/">
<dc:PhysicalMedium>lto01</dc:PhysicalMedium>
</rdf:Description>
</rdf:RDF>
</x:xmpmeta>
<?xpacket end="w"?>
Writing a field:
# First try to read the field when there's no data in it
$ xmp-tool PhysicalMedium test.jpg
test.jpeg: ERROR READING FIELD "PhysicalMedium"
# Then try to add the data and then read the field
$ xmp-tool PhysicalMedium --value lto01 test.jpg
$ xmp-tool PhysicalMedium test.jpg
test.jpg: PhysicalMedium=lto01
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xmp-tool-0.9.2.tar.gz.
File metadata
- Download URL: xmp-tool-0.9.2.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb73521a02857f9c58ec10810eec990a85da55634a41ab68e69c439c929505f4
|
|
| MD5 |
fab60003b3da851bc7b414f3928afbb2
|
|
| BLAKE2b-256 |
e0583296ac32b875117ebdcd1502412ec1f11ab9a79af9d5970017641eef4680
|
File details
Details for the file xmp_tool-0.9.2-py2.py3-none-any.whl.
File metadata
- Download URL: xmp_tool-0.9.2-py2.py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1628e96fcd93601dce7ad0c6ceb953016aa524d3271fb1582b6de6060df9052c
|
|
| MD5 |
3675efd103b5328420869ccef28df345
|
|
| BLAKE2b-256 |
c5d9198521fd283efd594f6cd79bf293379d8a4854e0d9f1e3e612a3dc839c8f
|