Skip to content

Commit

Permalink
Merge pull request #318 from adam3smith/nits
Browse files Browse the repository at this point in the history
small fixes and test updates
  • Loading branch information
avram committed Apr 23, 2012
2 parents 6097fba + 5305dbe commit 9ecaeee
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 298 deletions.
172 changes: 1 addition & 171 deletions Princeton Catalog.js
Original file line number Diff line number Diff line change
Expand Up @@ -997,174 +997,4 @@ MAP_ISO6391_ISO6392 = {'aar' : 'Afar',
var lang;
return ((lang = MAP_ISO6391_ISO6392[code]) !== null) ? lang : false;
}
/** BEGIN TEST CASES **/
var testCases = [
{
"type": "web",
"url": "http://searchit.princeton.edu/primo_library/libweb/action/display.do?tabs=detailsTab&ct=display&fn=search&doc=PRN_VOYAGER3232007&indx=1&recIds=PRN_VOYAGER3232007&recIdxs=0&elementId=0&renderMode=poppedOut&displayMode=full&frbrVersion=&dscnt=0&vl(124740333UI0)=any&scp.scps=scope%3A(OTHERS)%2Cscope%3A(FIRE)&frbg=&tab=location&dstmp=1331756863647&srt=title&mode=Basic&dum=true&tb=t&fromLogin=true&vl(1UIStartWith0)=contains&vl(freeText0)=Historiography%20--%20Byzantine%20Empire%20--%20Congresses&vid=PRINCETON",
"items": [
{
"itemType": "book",
"creators": [
{
"firstName": "Klaus",
"lastName": "Belke",
"creatorType": "author"
}
],
"notes": [],
"tags": [
"Byzantine Empire -- Historiography -- Congresses",
"Byzantine Empire -- Civilization -- Congresses"
],
"seeAlso": [],
"attachments": [],
"title": "Byzanz als Raum : zu Methoden und Inhalten der historischen Geographie des östlichen Mittelmeerraumes",
"place": "Wien",
"publisher": "Verlag der Österreichischen Akademie der Wissenschaften",
"date": "2000",
"language": "German",
"numPages": "316",
"pages": "316",
"ISBN": "370012872X",
"series": "Denkschriften (Österreichische Akademie der Wissenschaften. Philosophisch-Historische Klasse)",
"seriesNumber": "283",
"callNumber": "0912.934.6q Bd.283",
"url": "http://searchit.princeton.edu/primo_library/libweb/action/dlDisplay.do?institution=PRN&vid=PRINCETON&docId=PRN_VOYAGER3232007",
"libraryCatalog": "Princeton Catalog+",
"accessDate": "CURRENT_TIMESTAMP",
"shortTitle": "Byzanz als Raum"
}
]
},
{
"type": "web",
"url": "http://searchit.princeton.edu/primo_library/libweb/action/display.do?tabs=detailsTab&ct=display&fn=search&doc=PRN_VOYAGER3255547&indx=2&recIds=PRN_VOYAGER3255547&recIdxs=1&elementId=1&renderMode=poppedOut&displayMode=full&frbrVersion=&dscnt=0&vl(124740333UI0)=any&scp.scps=scope%3A(OTHERS)%2Cscope%3A(FIRE)&frbg=&tab=location&dstmp=1331756863647&srt=title&mode=Basic&dum=true&tb=t&fromLogin=true&vl(1UIStartWith0)=contains&vl(freeText0)=Historiography%20--%20Byzantine%20Empire%20--%20Congresses&vid=PRINCETON",
"items": [
{
"itemType": "book",
"creators": [
{
"firstName": "Italy)",
"lastName": "Giornata di studi bizantini (5th : 1998 : Naples",
"creatorType": "author"
},
{
"firstName": "Criscuolo, Ugo, Maisano, Riccardo, Associazione italiana di studi",
"lastName": "bizantini",
"creatorType": "contributor"
}
],
"notes": [],
"tags": [
"Historiography -- Byzantine Empire -- Congresses",
"Byzantine Empire -- Historiography -- Congresses"
],
"seeAlso": [],
"attachments": [],
"title": "Categorie linguistiche e concettuali della storiografia bizantina : atti della quinta Giornata di studi bizantini, Napoli, 23-24 aprile 1998",
"place": "Napoli",
"publisher": "M. D'Auria",
"date": "2000",
"language": "Italian",
"numPages": "274",
"pages": "274",
"ISBN": "887092176X",
"callNumber": "DF505 .G56 1998",
"url": "http://searchit.princeton.edu/primo_library/libweb/action/dlDisplay.do?institution=PRN&vid=PRINCETON&docId=PRN_VOYAGER3255547",
"libraryCatalog": "Princeton Catalog+",
"accessDate": "CURRENT_TIMESTAMP",
"shortTitle": "Categorie linguistiche e concettuali della storiografia bizantina"
}
]
},
{
"type": "web",
"url": "http://searchit.princeton.edu/primo_library/libweb/action/display.do?tabs=detailsTab&ct=display&fn=search&doc=PRN_VOYAGER3432980&indx=3&recIds=PRN_VOYAGER3432980&recIdxs=2&elementId=2&renderMode=poppedOut&displayMode=full&frbrVersion=&dscnt=0&vl(124740333UI0)=any&scp.scps=scope%3A(OTHERS)%2Cscope%3A(FIRE)&frbg=&tab=location&dstmp=1331756863647&srt=title&mode=Basic&dum=true&tb=t&fromLogin=true&vl(1UIStartWith0)=contains&vl(freeText0)=Historiography%20--%20Byzantine%20Empire%20--%20Congresses&vid=PRINCETON",
"items": [
{
"itemType": "book",
"creators": [
{
"firstName": "Coventry)",
"lastName": "Spring Symposium of Byzantine Studies (33rd : 1999 : University of Warwick",
"creatorType": "author"
},
{
"firstName": "Eastmond, Antony, , Society for the Promotion of Byzantine Studies (Great",
"lastName": "Britain)",
"creatorType": "contributor"
}
],
"notes": [],
"tags": [
"Byzantine Empire -- History -- Congresses",
"Byzantine Empire -- Historiography -- Congresses"
],
"seeAlso": [],
"attachments": [],
"title": "Eastern approaches to Byzantium : papers from the Thirty-third Spring Symposium of Byzantine Studies, University of Warwick, Coventry, March 1999",
"place": "Aldershot ; Burlington, VT",
"publisher": "Ashgate",
"date": "2001",
"language": "English",
"numPages": "297",
"pages": "297",
"ISBN": "0754603229",
"series": "Publications (Society for the Promotion of Byzantine studies (Great Britain))",
"seriesNumber": "9",
"callNumber": "DF552 .S674 1999",
"url": "http://searchit.princeton.edu/primo_library/libweb/action/dlDisplay.do?institution=PRN&vid=PRINCETON&docId=PRN_VOYAGER3432980",
"libraryCatalog": "Princeton Catalog+",
"accessDate": "CURRENT_TIMESTAMP",
"shortTitle": "Eastern approaches to Byzantium"
}
]
},
{
"type": "web",
"url": "http://searchit.princeton.edu/primo_library/libweb/action/display.do?tabs=detailsTab&ct=display&fn=search&doc=PRN_VOYAGER6416191&indx=5&recIds=PRN_VOYAGER6416191&recIdxs=4&elementId=4&renderMode=poppedOut&displayMode=full&frbrVersion=&dscnt=0&vl(124740333UI0)=any&scp.scps=scope%3A(OTHERS)%2Cscope%3A(FIRE)&frbg=&tab=location&dstmp=1331756863647&srt=title&mode=Basic&dum=true&tb=t&fromLogin=true&vl(1UIStartWith0)=contains&vl(freeText0)=Historiography%20--%20Byzantine%20Empire%20--%20Congresses&vid=PRINCETON",
"items": [
{
"itemType": "book",
"creators": [
{
"lastName": "Spring Symposium of Byzantine Studies (40th : 2007 : University of Birmingham)",
"creatorType": "author"
},
{
"firstName": "Macrides, R.",
"lastName": "J",
"creatorType": "contributor"
}
],
"notes": [],
"tags": [
"Historiography -- Byzantine Empire -- Congresses",
"Byzantine literature -- History and criticism -- Congresses",
"Byzantine Empire -- Historiography -- Congresses",
"Byzantine Empire -- History -- Sources -- Congresses"
],
"seeAlso": [],
"attachments": [],
"title": "History as literature in Byzantium : papers from the Fortieth Spring Symposium of Byzantine Studies, University of Birmingham, March 2007",
"place": "Farnham, Surrey, England ; Burlington, VT",
"publisher": "Ashgate",
"date": "2010",
"language": "English",
"numPages": "324",
"pages": "324",
"ISBN": "9781409412069",
"series": "Publications (Society for the Promotion of Byzantine Studies (Great Britain))",
"seriesNumber": "15",
"extra": "Aesthetics -- The aesthetics of history : from Theophanes to Eustathios / Stratis Papaioannou -- Audience -- Uncovering Byzantium's historiographical audience / Brian Croke -- Anna Komnene and Niketas Choniates \"translated\" : the fourteenth-century Byzantine metaphrases / John Davis -- Narrator -- Psellos and \"his emperors\" : fact, fiction, and genre / Michael Jeffreys -- \"Listen, all of you, both Franks and Romans\" : the narrator in the Chronicle of Morea / Teresa Shawcross -- Story-telling -- From propaganda to history to literature : the Byzantine stories of Theodosius' apple and Marcian's eagles / Roger Scott -- Dream narratives in historical writing : making sense of history in Theophanes' Chronographia / George T. Calofonos -- The Venice Alexander romance : pictorial narrative and the art of telling stories / Nicolette S.Trahoulia -- The classical tradition reinterpreted -- A historian and his tragic hero : a literary reading of Theophylact Simocatta's ecumenical history / Stephanos Efthymiades -- Envy and Nemesis in the Vita Basilii and Leo the Deacon : literary mimesis or something more? / Martin Hinterberger -- Sources reconfigured -- The story of the patriarch Constantine II of Constantinople in Theophanes and George the Monk : transformations of a narrative / Dmitry Afinogenov -- Engaging the Byzantine past : strategies of visualizing history in Sicily and Bulgaria / Elena N. Boeck -- The Synopsis chronike and hagiography : the presentation of Constantine the Great / Konstantinos Zafeiris -- Structure and themes -- Procopius' Persian War : a thematic and literary analysis / Anthony Kaldellis -- La chronique de Malalas entre littérature et philosophie / Paolo Odorico -- Rhetoric and history : the case of Niketas Choniates / Athanasios Angelou.",
"callNumber": "DF505 .S67 2007",
"url": "http://searchit.princeton.edu/primo_library/libweb/action/dlDisplay.do?institution=PRN&vid=PRINCETON&docId=PRN_VOYAGER6416191",
"libraryCatalog": "Princeton Catalog+",
"accessDate": "CURRENT_TIMESTAMP",
"shortTitle": "History as literature in Byzantium"
}
]
}
]
/** END TEST CASES **/

12 changes: 6 additions & 6 deletions SlideShare.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"priority": 100,
"inRepository": true,
"translatorType": 4,
"browserSupport": "gcsv",
"lastUpdated": "2012-03-26 03:24:52"
"browserSupport": "gcs",
"lastUpdated": "2012-04-22 00:32:12"
}

function scrape(doc) {
Expand All @@ -22,11 +22,11 @@ function scrape(doc) {
if(creator && creator.trim())
item.creators.push({lastName:creator.trim(), creatorType:'author'});

item.abstractNote = ZU.xpathText(doc, '(//p[@class="descriptionExpanded"] |\
//p[@class="description" and\
not(following-sibling::p[@class="descriptionExpanded"])])');
item.abstractNote = ZU.xpathText(doc, '(//p[contains(@class, "descriptionExpanded")] |\
//p[contains(@class, "description") and\
not(following-sibling::p[contains(@class, "descriptionExpanded")])])');

var tags = ZU.xpath(doc, '//p[@class="slideshow-tags"]/a');
var tags = ZU.xpath(doc, '//p[contains(@class, "slideshow-tags")]/a');
for(var i=0, n=tags.length; i<n; i++) {
item.tags.push(tags[i].textContent.trim());
}
Expand Down
Loading

0 comments on commit 9ecaeee

Please sign in to comment.