Difference between revisions of "Cc-xmp-tag.pl"

From CDOT Wiki
Jump to: navigation, search
(Created page with ''''Note: this page will hopefully be moved to wiki.creativecommons.org at some point (once we have accounts on there).''' Get the program from GitHub: https://github.com/creativ…')
 
Line 11: Line 11:
 
== Usage examples ==
 
== Usage examples ==
  
The following examples assume you have an image with appropriate XMP tags.
+
There are a couple of sample .jpg files in the repository next to cc-xmp-tag.pl: example-alltags.jpg and example-notags.jpg. You can use them for testing if you like.
 +
 
 +
These XMP tags are supported:
 +
 
 +
* '''AttributionName''': the name of the author of the work.
 +
* '''AttributionURL''': the URL to the author's website. Ideally to a page specific to this particular work, or lacking that: another appropriate URL for the author.
 +
* '''License''': the URL pointing to the licence.
 +
* '''Title''': the title of the work.
 +
* '''Marked''': if this is true that means the work is not in the public domain. Set automatically when you write any other tags.
 +
* '''UsageTerms''': a human-readable note saying that a licence applies to this work. Set automatically when you write the '''Licence''' tag.
 +
 
 +
=== Reading XMP ===
 +
 
 +
Use a variation of cc-xmp-tag.pl --read filename with a list of tags you want to read.

Revision as of 20:26, 1 April 2015

Note: this page will hopefully be moved to wiki.creativecommons.org at some point (once we have accounts on there).

Get the program from GitHub: https://github.com/creativecommons/seneca/tree/master/cc-xmp-tag/perl

The script cc-xmp-tag.pl was written to easily read and write Creative-Commons-related XMP metadata from media files.

It's using the perl Image::ExifTool module, which means you need that installed on your system. On Debian derivatives you can install it like this:

apt-get install libimage-exiftool-perl

Usage examples

There are a couple of sample .jpg files in the repository next to cc-xmp-tag.pl: example-alltags.jpg and example-notags.jpg. You can use them for testing if you like.

These XMP tags are supported:

  • AttributionName: the name of the author of the work.
  • AttributionURL: the URL to the author's website. Ideally to a page specific to this particular work, or lacking that: another appropriate URL for the author.
  • License: the URL pointing to the licence.
  • Title: the title of the work.
  • Marked: if this is true that means the work is not in the public domain. Set automatically when you write any other tags.
  • UsageTerms: a human-readable note saying that a licence applies to this work. Set automatically when you write the Licence tag.

Reading XMP

Use a variation of cc-xmp-tag.pl --read filename with a list of tags you want to read.