Skip to content

Instantly share code, notes, and snippets.

@acdha
Last active December 15, 2015 07:39
Show Gist options
  • Save acdha/5224776 to your computer and use it in GitHub Desktop.
Save acdha/5224776 to your computer and use it in GitHub Desktop.
Comparison between microdata.py and microdata.rb for http://www.wdl.org/en/item/1/
{
"items": [
{
"properties": {
"contentLocation": [
{
"properties": {
"address": [
{
"properties": {
"addressCountry": [
"United States of America"
],
"addressLocality": [
"Antietam"
],
"addressRegion": [
"Maryland"
]
},
"type": [
"http://schema.org/PostalAddress"
]
}
]
},
"type": [
"http://schema.org/Place"
]
}
],
"creator": [
{
"properties": {
"additionalType": [
"http://viaf.org/viaf/"
],
"name": [
"Gardner, Alexander (1821-1882)"
]
},
"type": [
"http://schema.org/Person"
]
}
],
"dateCreated": [
"1862-10-03"
],
"description": [
"At the outset of the U.S. Civil War, Mathew Brady dispatched a team of photographers to document the conflict. Among them was a Scottish-born immigrant named Alexander Gardner, the photographer who took this photo of Lincoln at Antietam as well as other famous wartime shots. The man to Lincoln's right is Allan Pinkerton, founder of the Pinkerton National Detective Agency, whom Lincoln had as head of a personal security detail during the war. Gardner titled another shot of Pinkerton and his brother William at Antietam \u201cThe Secret Service.\u201d Gardner photographed Lincoln on seven separate occasions, the last one on February 5, 1865, only a few weeks before Lincoln\u2019s assassination. In 1866 he published Gardner\u2019s Sketchbook of the War, combining plates and text, commemorating such battles as Fredericksburg, Gettysburg, and Petersburg, but the book was a commercial failure. Photographic historians also have suggested that Gardner staged many of his photos, moving dead bodies and using a regular prop gun to create romanticized pictorial narratives.",
"1 negative : glass, wet collodion"
],
"image": [
"http://content.wdl.org/1/thumbnail/308x255.jpg",
"/media/1.png"
],
"keywords": [
"History & geography",
"History of North America",
"United States",
"Antietam, Battle of, Maryland, 1862",
"Lincoln, Abraham, 1809-1865",
"McClernand, John A. (John Alexander), 1812-1900",
"Pinkerton, Allan, 1819-1884",
"United States--History--Civil War, 1861-1865"
],
"name": [
"Antietam, Maryland. Allan Pinkerton, President Lincoln, and Major General John A. McClernand: Another View"
],
"provider": [
{
"properties": {
"name": [
"Library of Congress"
]
},
"type": [
"http://schema.org/Organization"
]
}
],
"url": [
"http://hdl.loc.gov/loc.wdl/dlc.1"
]
},
"type": [
"http://schema.org/ItemPage"
]
}
]
}
{
"items": [
{
"type": [
"http://schema.org/ItemPage"
],
"properties": {
"image": [
"http://content.wdl.org/1/thumbnail/308x255.jpg",
"http://www.wdl.org/media/1.png"
],
"name": [
"Antietam, Maryland. Allan Pinkerton, President Lincoln, and Major General John A. McClernand: Another View"
],
"description": [
"At the outset of the U.S. Civil War, Mathew Brady dispatched a team of photographers to document the conflict. Among them was a Scottish-born immigrant named Alexander Gardner, the photographer who took this photo of Lincoln at Antietam as well as other famous wartime shots. The man to Lincoln's right is Allan Pinkerton, founder of the Pinkerton National Detective Agency, whom Lincoln had as head of a personal security detail during the war. Gardner titled another shot of Pinkerton and his brother William at Antietam “The Secret Service.” Gardner photographed Lincoln on seven separate occasions, the last one on February 5, 1865, only a few weeks before Lincoln’s assassination. In 1866 he published Gardner’s Sketchbook of the War, combining plates and text, commemorating such battles as Fredericksburg, Gettysburg, and Petersburg, but the book was a commercial failure. Photographic historians also have suggested that Gardner staged many of his photos, moving dead bodies and using a regular prop gun to create romanticized pictorial narratives.",
"1 negative : glass, wet collodion"
],
"creator": [
{
"type": [
"http://schema.org/Person"
],
"properties": {
"additionalType": [
"http://viaf.org/viaf/"
],
"name": [
"Gardner, Alexander (1821-1882)"
]
}
}
],
"dateCreated": [
"1862-10-03"
],
"contentLocation": [
{
"type": [
"http://schema.org/Place"
],
"properties": {
"address": [
{
"type": [
"http://schema.org/PostalAddress"
],
"properties": {
"addressCountry": [
"United States of America"
],
"addressRegion": [
"Maryland"
],
"addressLocality": [
"Antietam"
]
}
}
]
}
}
],
"keywords": [
"History & geography",
"History of North America",
"United States",
"Antietam, Battle of, Maryland, 1862",
"Lincoln, Abraham, 1809-1865",
"McClernand, John A. (John Alexander), 1812-1900",
"Pinkerton, Allan, 1819-1884",
"United States--History--Civil War, 1861-1865"
],
"provider": [
{
"type": [
"http://schema.org/Organization"
],
"properties": {
"name": [
"Library of Congress"
]
}
}
],
"url": [
"http://hdl.loc.gov/loc.wdl/dlc.1"
]
}
}
]
}
@acdha
Copy link
Author

acdha commented Mar 23, 2013

Updated python output using my proposed patches for edsu/microdata #13, #11 and #10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment