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
-
TUXEDO Computers Unveils Linux Laptop Featuring AMD Ryzen CPU
This latest release is the first laptop to include the new CPU from Ryzen and Linux preinstalled.
-
XZ Gets the All-Clear
The back door xz vulnerability has been officially reverted for Fedora 40 and versions 38 and 39 were never affected.
-
Canonical Collaborates with Qualcomm on New Venture
This new joint effort is geared toward bringing Ubuntu and Ubuntu Core to Qualcomm-powered devices.
-
Kodi 21.0 Open-Source Entertainment Hub Released
After a year of development, the award-winning Kodi cross-platform, media center software is now available with many new additions and improvements.
-
Linux Usage Increases in Two Key Areas
If market share is your thing, you'll be happy to know that Linux is on the rise in two areas that, if they keep climbing, could have serious meaning for Linux's future.
-
Vulnerability Discovered in xz Libraries
An urgent alert for Fedora 40 has been posted and users should pay attention.
-
Canonical Bumps LTS Support to 12 years
If you're worried that your Ubuntu LTS release won't be supported long enough to last, Canonical has a surprise for you in the form of 12 years of security coverage.
-
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.