A C++ proof-of-concept library that offers a command-line utility to embed a Creative Commons license(URL) into image XMP metadata. This library uses Adobe's XMP Toolkit SDK to implement metadata manipulation of an image.
Firstly, clone the repository:
$ git clone https://github.com/gideonthomas/license-embed.git
To use the library, first you have to build Adobe's XMP Toolkit.
- First install the cmake utility for Mac OSX. You will need both the application and the command line interface tool.
To install the CLI tool using Homebrew:
$ brew install cmake
Then, place the CMake.app file into the XMP-Toolkit/tools/cmake/bin
folder (create it if it does not exist).
-
Run the shell script
XMP-Toolkit/build/GenerateXMPToolkitSDK_mac.sh
and choose the appropriate platform for installation (a Mac-based build). You will most likely want to generate a "static" version of the library. -
Open the generated project file in XCode. The file will be located in a path similar to
XMP-Toolkit/build/xcode/static/intel/XMPSDKToolkitSDK.xcodeproj
. -
In the menu in XCode, select Product > Build. Ensure that the build was successful (you might have to change the Base SDK to Mac 10.9 or less).
Now that you have built the Toolkit, you need to build the library itself.
-
Run the shell script
XMP-Toolkit/samples/build/GenerateXMPToolkitSDK_mac.sh
and choose the appropriate platform (Mac OSX). -
Open the generated project file in XCode. The file will be located in a path similar to
XMP-Toolkit/samples/build/xcode/intel/XMPSDKToolkitSample.xcodeproj
-
In the menu in XCode, select Product > Build. Ensure that the build was successful (you might have to change the Base SDK to Mac 10.9 or less).
The library should now be ready to use. It will be located int the XMP-Toolkit/samples/target/macintosh/intel/Debug
folder.
Simply run the MyModifyXMP file and provide a pathname and follow the instructions.
$ ./MyModifyXMP path/to/file/relative/to/MyModifyXMP