pressbooks/pressbooks — pull request #62 by bdolor (2014-07-15 23:13:46+00:00)
Title: Cc license

This PR adds the ability to choose a pre-defined license and display that license (or not) on all export formats. Much of the functionality is derived from a call to the creative commons API: http://api.creativecommons.org/docs/readme_15.html
There is some language support as a result and if a particular language is not supported by the API, it defaults to english. Some other features of this PR:
- A page license can override the book license, in a similar fashion to a page author overriding the book author.
- The WP transients API was used to leverage caching and minimize calls to the Creative Commons API. The cache gets updated if any of the title, section author or section license is modified by the user.
- Where license information could be included in metadata fields, such as in an EPUB output, it was.
- The functionality is completely optional for authors and is only additive (it doesn't take away from any existing functionality around copyright.)
- The web output places the license information in the footer of the webpage
- PDF, HPUB output - adds to copyright page, and if there are section licenses, to the TOC (like section author)
- EPUB/EPUB3 output -adds to copyright page and metadata in OPF
- ICML - to the title page
- XML - as part of post_metadata

some screenshots below:

![screen shot 2014-07-03 at 1 05 28 pm](https://cloud.githubusercontent.com/assets/2048170/3592571/3cd2bf16-0c74-11e4-9d33-baae7373acb6.png)

![screen shot 2014-07-03 at 1 11 58 pm](https://cloud.githubusercontent.com/assets/2048170/3592574/4c9358f2-0c74-11e4-8a98-3d45813f9322.png)

![screen shot 2014-07-15 at 4 10 04 pm](https://cloud.githubusercontent.com/assets/2048170/3592641/41f22a62-0c75-11e4-86aa-73a2a459910f.png)

![screen shot 2014-07-15 at 4 10 15 pm](https://cloud.githubusercontent.com/assets/2048170/3592643/4a2e20aa-0c75-11e4-8fb5-16208e71be2b.png)