Storing metadata in files
Creative Commons
The non-profit Creative Commons organization distributes a variety of easily applicable free licenses for digital works [17] that artists and authors worldwide use to protect their copyrights. Creative Commons recommends XMP as a metadata format. At the same time, the organization posts guidelines on how artists can best utilize the information of the license they use [18] and embed this in their published files. This creates a win-win situation: The license strengthens the position of the author, and the users establish the license conditions in an uncomplicated and reliable way from the objects themselves.
Creative Commons has defined the XML namespace http://creativecommons.org/ns# for XMP, as well as for other purposes; this includes the following four elements cc:license
, cc:morePermissions
, cc:attributionURL
, and cc:attributionName
. The XMP Toolkit makes this namespace available under the consts.XMP_NS_CC
key. Furthermore, the organization recommends the use of the two elements xmpRights:Marked
and xmpRights:UsageTerms
from the XMP rights management schema (Table 1).
A copy of the license notice should also (according to their advice) end up in dc:rights
. Listing 3 shows a Python script that writes the metadata recommended by Creative Commons into a JPG file (not yet containing an XMP packet) with XMP Toolkit for the Attribution-ShareAlike 4.0 license. The result of these efforts is presented in Listing 4.
Listing 3
Generating Creative Commons-Compliant Metadata
Listing 4
Created XMP Package
The xmpRights:WebStatement
text element transports a callable URL, by which details regarding the authorship and conditions of use of a file can be verified. The Creative Commons creators suggest installing a reference under the address given here that also contains the hash value of the published file [19]. In this case, it can be manually or automatically compared to raise the alarm in case of forgeries.
Conclusion
XMP involves a sophisticated and professional metadata system that compiles schemas for different objects and applications. The comprehensive set of descriptive components can even be expanded with elements not provided by the specification.
XMP supports a wide range of file formats in which to embed metadata packets; it is only on exceptional occasions that no solution exists. Nothing else is comparable, especially when it comes to PDF documents, although this is not surprising considering the standard's author (Adobe).
End users can request XMP metadata with ease from the command line, and programmers can develop special XMP applications with a range of C/C++ libraries. Python bindings are available for the existing XMP and Exif libraries, which can also handle XMP.
Exiftool (in the libimage-exiftool-perl Debian package or perl-image-exiftool package for openSUSE and others) and the command-line tool from the Exiv2 library (in the Debian exiv2 package) are also useful for editing XMP data at the command line.
Infos
- Exif specification: http://www.cipa.jp/std/documents/e/DC-008-2012_E.pdf
- XMP specification: http://www.adobe.com/devnet/xmp.html
- XMP ISO standard press release: http://www.iso.org/iso/home/news_index/news_archive/news.htm?refid=Ref1525
- MWG guidelines: http://www.metadataworkinggroup.com/specs
- RDF 1.1 XML syntax: https://www.w3.org/TR/rdf-syntax-grammar
- DCMI metadata terms: http://dublincore.org/documents/dcmi-terms/
- Python XMP Toolkit in GitHub: https://github.com/python-xmp-toolkit/python-xmp-toolkit/
- Exempi: https://libopenraw.freedesktop.org/wiki/Exempi/
- Pyexiv2: http://tilloy.net/dev/pyexiv2/
- Exiv2: http://exiv2.org
- GExiv2: https://wiki.gnome.org/Projects/gexiv2
- PyGObject: https://wiki.gnome.org/Projects/PyGObject
- Python XMP Toolkit in PyPI: https://pypi.python.org/pypi/python-xmp-toolkit/
- XMP Toolkit documentation: http://python-xmp-toolkit.readthedocs.org/en/latest/
- Debian packages: https://packages.qa.debian.org/p/python-xmp-toolkit.html
- Python datetime library: https://docs.python.org/2/library/datetime.html
- Creative Commons licensing types: https://creativecommons.org/share-your-work/licensing-types-examples/
- Creative Commons XMP properties: https://wiki.creativecommons.org/wiki/XMP
- WebStatement: https://wiki.creativecommons.org/wiki/Web_Statement
« Previous 1 2 3
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Fedora 40 Beta Released Soon
With the official release of Fedora 40 coming in April, it's almost time to download the beta and see what's new.
-
New Pentesting Distribution to Compete with Kali Linux
SnoopGod is now available for your testing needs
-
Juno Computers Launches Another Linux Laptop
If you're looking for a powerhouse laptop that runs Ubuntu, the Juno Computers Neptune 17 v6 should be on your radar.
-
ZorinOS 17.1 Released, Includes Improved Windows App Support
If you need or desire to run Windows applications on Linux, there's one distribution intent on making that easier for you and its new release further improves that feature.
-
Linux Market Share Surpasses 4% for the First Time
Look out Windows and macOS, Linux is on the rise and has even topped ChromeOS to become the fourth most widely used OS around the globe.
-
KDE’s Plasma 6 Officially Available
KDE’s Plasma 6.0 "Megarelease" has happened, and it's brimming with new features, polish, and performance.
-
Latest Version of Tails Unleashed
Tails 6.0 is based on Debian 12 and includes GNOME 43.
-
KDE Announces New Slimbook V with Plenty of Power and KDE’s Plasma 6
If you're a fan of KDE Plasma, you'll be thrilled to hear they've announced a new Slimbook with an AMD CPU and the latest version of KDE Plasma desktop.
-
Monthly Sponsorship Includes Early Access to elementary OS 8
If you want to get a glimpse of what's in the pipeline for elementary OS 8, just set up a monthly sponsorship to help fund its continued existence.
-
DebConf24 to be Held in South Korea
Busan will be the location of the latest DebConf running July 28 through August 4