johnjung / metadata_converters

Scripts to convert metadata to and from different formats.
GNU General Public License v3.0
3 stars 1 forks source link

add MarcXmlToOpenGraph #5

Open johnjung opened 5 years ago

johnjung commented 5 years ago

Look at the OpenGraph documentation. Website visitors may decide to share links to items from digital collections, e.g. an image from the Photoarchive. If they share these links via Facebook, the Library would like to provide OpenGraph metadata for Facebook's link creator.

Add a MarcXmlToOpenGraph class to classes.py. Look at MarcToDc and MarcXmlToSchemaDotOrg in that file for an example of how to set up the class, including the way that a mappings variable describes the way Twitter Card attributes map to MARC fields. Be sure to add Google style docstrings for Sphinx.

The str() method should output a series of meta tags that could be included in an HTML page- those meta tags should include values like these:

Be sure to add unit tests.

johnjung commented 5 years ago

Stub command finished- waiting for specific URLs to fill in details.