Zambrano

From Ancestry.com Wiki

(Difference between revisions)
Jump to: navigation, search
(America (Colonial 1492-1800))
Line 1,121: Line 1,121:
</center>
</center>
-
== America (Colonial 1492-1800) ==
+
== America (Colonial 1492-1800) ==
-
[[Casa de Contrataci�n]] [[Seville|Sevilla]]. Crews logs data base. [http://pares.mcu.es/MovimientosMigratorios/staticContent.form?viewName=fuentes2 Main Web page Casa de contratacion] <ref name="IndiasOviedo1940">{{cite book|author1=Archivo General defckLRIndias|author2=Instituto Gonzalo Fern�ndez de Oviedo|title=Cat�logo defckLRpasajeros a Indias durante los siglos XVI, XVII yfckLRXVIII|url=http://books.google.com/books?id=3I96AAAAMAAJ&amp;pg=PA40|accessdate=3fckLRDecember 2012|year=1940|publisher=Imprenta editorial de lafckLRGavidia|pages=40�}}</ref>  
+
[[Casa de Contrataci�n]] [[Seville|Sevilla]]. Crews logs data base. [http://pares.mcu.es/MovimientosMigratorios/staticContent.form?viewName=fuentes2 Main Web page Casa de contratacion] <ref name="IndiasOviedo1940">{{cite book|author1=Archivo General defckLRIndias|author2=Instituto Gonzalo Fern�ndez de Oviedo|title=Cat�logo defckLRpasajeros a Indias durante los siglos XVI, XVII yfckLRXVIII|url=http://books.google.com/books?id=3I96AAAAMAAJ&amp;amp;amp;pg=PA40|accessdate=3fckLRDecember 2012|year=1940|publisher=Imprenta editorial de lafckLRGavidia|pages=40�}}</ref>  
-
Zambrano en Sevilla. <ref name="Gu�a de Sevilla: Su provincia, arzobispado, capitania general, tercio naval, audiencia territorial y distrito universitario...">{{cite book|title=Gu�a de Sevilla: Su provincia,fckLRarzobispado, capitania general, tercio naval, audiencia territorial yfckLRdistrito universitario...|url=http://books.google.com/books?id=yZIxAQAAMAAJ&amp;pg=PR172|accessdate=27fckLRMarch 2013|year=1878|publisher=La Andalucia.}}</ref>  
+
Zambrano en Sevilla. <ref name="Gu�a de Sevilla: Su provincia, arzobispado, capitania general, tercio naval, audiencia territorial y distrito universitario...">{{cite book|title=Gu�a de Sevilla: Su provincia,fckLRarzobispado, capitania general, tercio naval, audiencia territorial yfckLRdistrito universitario...|url=http://books.google.com/books?id=yZIxAQAAMAAJ&amp;amp;amp;pg=PR172|accessdate=27fckLRMarch 2013|year=1878|publisher=La Andalucia.}}</ref>  
-
<br>Juan Zambrano, Guadalajara, Spain, Died in battle under Charles V. 1535. <ref name="Sandoval1681">{{cite book|author=Prudencio defckLRSandoval|title=Historia de la vida y hechos del emperador CarlosfckLRV...|url=http://books.google.com/books?id=_dT54zUVudsC&amp;pg=PA176|accessdate=22fckLRMarch 2013|year=1681|publisher=por Geronymo Verdussen, Impressor yfckLRmercader de Libros|pages=176�}}</ref>  
+
<br>Juan Zambrano, Guadalajara, Spain, Died in battle under Charles V. 1535. <ref name="Sandoval1681">{{cite book|author=Prudencio defckLRSandoval|title=Historia de la vida y hechos del emperador CarlosfckLRV...|url=http://books.google.com/books?id=_dT54zUVudsC&amp;amp;amp;pg=PA176|accessdate=22fckLRMarch 2013|year=1681|publisher=por Geronymo Verdussen, Impressor yfckLRmercader de Libros|pages=176�}}</ref>  
-
Rodrigo Zambrano <ref name="Mir1995">{{cite book|author=Adolfo defckLRSalazar Mir|title=Los Expedientes de Limpieza de Sangre de la CatedralfckLRde Sevilla (Genealog�as): Tomo I. (Expedientes 1 AlfckLR541)|url=http://books.google.com/books?id=W4psMQ8X2sEC&amp;pg=PA169|accessdate=10fckLRDecember 2012|year=1995|publisher=EdicionesfckLRHidalguia|isbn=978-84-87204-82-1|pages=169�}}</ref>  
+
Rodrigo Zambrano <ref name="Mir1995">{{cite book|author=Adolfo defckLRSalazar Mir|title=Los Expedientes de Limpieza de Sangre de la CatedralfckLRde Sevilla (Genealog�as): Tomo I. (Expedientes 1 AlfckLR541)|url=http://books.google.com/books?id=W4psMQ8X2sEC&amp;amp;amp;pg=PA169|accessdate=10fckLRDecember 2012|year=1995|publisher=EdicionesfckLRHidalguia|isbn=978-84-87204-82-1|pages=169�}}</ref>  
<br>Manuel Zambrano <ref name="Genealog� y Her�ldica">{{citefckLRbook|title=Genealog� yfckLRHer�ldica|url=http://books.google.com/books?id=rfQ8AQAAIAAJ|accessdate=2fckLRMarch 2013|year=1967|page=248}}</ref>  
<br>Manuel Zambrano <ref name="Genealog� y Her�ldica">{{citefckLRbook|title=Genealog� yfckLRHer�ldica|url=http://books.google.com/books?id=rfQ8AQAAIAAJ|accessdate=2fckLRMarch 2013|year=1967|page=248}}</ref>  
-
<br>[[Hernando de Soto]] Alvaro Zambrano part of crew.<ref name="Galloway2006">{{cite book|author=Patricia Kay Galloway|title=ThefckLRHernando De Soto Expedition: History, Historiography, And "Discovery"fckLRin the Southeast|url=http://books.google.com/books?id=zzGphaI83EUC&amp;pg=PA209|accessdate=3fckLRDecember 2012|year=2006|publisher=U of NebraskafckLRPress|isbn=978-0-8032-7122-7|pages=209�}}</ref> <ref name="Narratives of the Career of Hernando de Soto in the Conquest of Florida">{{cite book|title=Narratives of the Career offckLRHernando de Soto in the Conquest offckLRFlorida|url=http://books.google.com/books?id=bXopAAAAYAAJ&amp;pg=PA293|accessdate=3fckLRDecember 2012|year=1866|pages=294�}}</ref>  
+
<br>[[Hernando de Soto]] Alvaro Zambrano part of crew.<ref name="Galloway2006">{{cite book|author=Patricia Kay Galloway|title=ThefckLRHernando De Soto Expedition: History, Historiography, And "Discovery"fckLRin the Southeast|url=http://books.google.com/books?id=zzGphaI83EUC&amp;amp;amp;pg=PA209|accessdate=3fckLRDecember 2012|year=2006|publisher=U of NebraskafckLRPress|isbn=978-0-8032-7122-7|pages=209�}}</ref> <ref name="Narratives of the Career of Hernando de Soto in the Conquest of Florida">{{cite book|title=Narratives of the Career offckLRHernando de Soto in the Conquest offckLRFlorida|url=http://books.google.com/books?id=bXopAAAAYAAJ&amp;amp;amp;pg=PA293|accessdate=3fckLRDecember 2012|year=1866|pages=294�}}</ref>  
<br>[[St. Augustine, Florida]]Rodrigo Zambrano y Alonso Zambrano and two sisters 1 Servant.  
<br>[[St. Augustine, Florida]]Rodrigo Zambrano y Alonso Zambrano and two sisters 1 Servant.  
-
<br>[http://www.panoramio.com/photo/50578904 Casa Museo Alfonso Zambrano]. Woodcraft master . [http://www.culturapasto.gov.co/index.php?option=com_content&amp;view=article&amp;id=26:museo-alfonso-zambrano&amp;catid=6:museos-pasto&amp;Itemid=4 Gallery].  
+
<br>[http://www.panoramio.com/photo/50578904 Casa Museo Alfonso Zambrano]. Woodcraft master . [http://www.culturapasto.gov.co/index.php?option=com_content&view=article&id=26:museo-alfonso-zambrano&catid=6:museos-pasto&Itemid=4 Gallery].  
-
=== Clergyman ===
+
=== Clergyman ===
-
Fray Juan Zambrano, Chiapas, Mexico. Service to the church in 1537. <ref name="Garc�a2001">{{cite book|author=Irma ContrerasfckLRGarc�a|title=Las etnias del estado de Chiapas: castellanizaci�n yfckLRbiograf�as|url=http://books.google.com/books?id=Sorac3Ul6nAC&amp;pg=PA291|accessdate=22fckLRMarch 2013|year=2001|publisher=UNAM|isbn=978-968-36-9089-0|pages=33�}}</ref>  
+
Fray Juan Zambrano, Chiapas, Mexico. Service to the church in 1537. <ref name="Garc�a2001">{{cite book|author=Irma ContrerasfckLRGarc�a|title=Las etnias del estado de Chiapas: castellanizaci�n yfckLRbiograf�as|url=http://books.google.com/books?id=Sorac3Ul6nAC&amp;amp;amp;pg=PA291|accessdate=22fckLRMarch 2013|year=2001|publisher=UNAM|isbn=978-968-36-9089-0|pages=33�}}</ref>  
Ecuador: MonSenor Alverto Zambrano, Bishop from Loja, Ecuador. <ref name="G�mez1981">{{cite book|author=Pedro CreamerfckLRG�mez|title=Iglesia y Sociedad en el Ecuador Contempor�neo:fckLRInterpretaci�n Teol�gico-pastoral de la Documentaci�nfckLREpiscopal|url=http://books.google.com/books?id=a8FaAAAAMAAJ|accessdate=1fckLRApril 2013|year=1981|publisher=Imprenta del Colegio Tecnico DonfckLRBosco|page=480}}</ref> [[http://www.diocesisdeloja.org/obispos%20historia.html]]  
Ecuador: MonSenor Alverto Zambrano, Bishop from Loja, Ecuador. <ref name="G�mez1981">{{cite book|author=Pedro CreamerfckLRG�mez|title=Iglesia y Sociedad en el Ecuador Contempor�neo:fckLRInterpretaci�n Teol�gico-pastoral de la Documentaci�nfckLREpiscopal|url=http://books.google.com/books?id=a8FaAAAAMAAJ|accessdate=1fckLRApril 2013|year=1981|publisher=Imprenta del Colegio Tecnico DonfckLRBosco|page=480}}</ref> [[http://www.diocesisdeloja.org/obispos%20historia.html]]  
-
=== Mexico colonies. ===
+
=== Mexico colonies. ===
-
<ref name="FerrariNovo1961">{{cite book|author1=Enrique de Olavarr�a yfckLRFerrari|author2=Salvador Novo|title=Rese�a hist�rica del teatro enfckLRM�xico, 1538-1911|url=http://books.google.com/books?id=fbQrAAAAMAAJ|accessdate=28fckLRNovember 2012|year=1961|publisher=Ed�torial Porr�a|page=3280}}</ref> <ref name="Pi�a1863">{{cite book|author=Luis Alfaro yfckLRPi�a|title=Relacion descriptiva de la fundacion, dedicacion etc., defckLRlas iglesias y conventos de M�xico: con una rese�a de la variacion quefckLRhan sufrido durante el gobierno de D. BenitofckLRJuarez|url=http://books.google.com/books?id=rXU3AAAAMAAJ&amp;pg=PA135|accessdate=26fckLRMarch 2013|year=1863|publisher=Tip. de M.fckLRVillanueva|pages=135�222}}</ref>  
+
<ref name="FerrariNovo1961">{{cite book|author1=Enrique de Olavarr�a yfckLRFerrari|author2=Salvador Novo|title=Rese�a hist�rica del teatro enfckLRM�xico, 1538-1911|url=http://books.google.com/books?id=fbQrAAAAMAAJ|accessdate=28fckLRNovember 2012|year=1961|publisher=Ed�torial Porr�a|page=3280}}</ref> <ref name="Pi�a1863">{{cite book|author=Luis Alfaro yfckLRPi�a|title=Relacion descriptiva de la fundacion, dedicacion etc., defckLRlas iglesias y conventos de M�xico: con una rese�a de la variacion quefckLRhan sufrido durante el gobierno de D. BenitofckLRJuarez|url=http://books.google.com/books?id=rXU3AAAAMAAJ&amp;amp;amp;pg=PA135|accessdate=26fckLRMarch 2013|year=1863|publisher=Tip. de M.fckLRVillanueva|pages=135�222}}</ref>  
-
=== Durango Mexico. ===
+
=== Durango Mexico. ===
-
[[Durango, Durango|Palacio Zambrano]] Juan Jose Zambrano from the Order of Santiago.<ref name="Boehm2000">{{cite book|author=Eric H.fckLRBoehm|title=Historical Abstracts: Modern history abstracts,fckLR1450-1914|url=http://books.google.com/books?id=ah9BAQAAIAAJ|accessdate=27fckLRNovember 2012|year=2000|publisher=American Bibliographical Center-CliofckLRPress|page=75}}</ref><ref>http://cdnc.ucr.edu/cdnc/cgi-bin/cdnc?a=d&amp;cl=search&amp;d=SFC18980123.2.95&amp;srpos=1&amp;e=-------en--20--1--txt-IN-juan+jose+zambrano----</ref> <ref name="The Encyclopaedia Britannica: a dictionary of arts, sciences, and general literature">{{cite book|title=The EncyclopaediafckLRBritannica: a dictionary of arts, sciences, and generalfckLRliterature|url=http://books.google.com/books?id=p11JAAAAYAAJ&amp;pg=PA477|accessdate=1fckLRApril 2013|year=1894|publisher=Maxwell Sommerville|pages=477�}}</ref>  
+
[[Durango, Durango|Palacio Zambrano]] Juan Jose Zambrano from the Order of Santiago.<ref name="Boehm2000">{{cite book|author=Eric H.fckLRBoehm|title=Historical Abstracts: Modern history abstracts,fckLR1450-1914|url=http://books.google.com/books?id=ah9BAQAAIAAJ|accessdate=27fckLRNovember 2012|year=2000|publisher=American Bibliographical Center-CliofckLRPress|page=75}}</ref><ref>http://cdnc.ucr.edu/cdnc/cgi-bin/cdnc?a=d&amp;amp;amp;cl=search&amp;amp;amp;d=SFC18980123.2.95&amp;amp;amp;srpos=1&amp;amp;amp;e=-------en--20--1--txt-IN-juan+jose+zambrano----</ref> <ref name="The Encyclopaedia Britannica: a dictionary of arts, sciences, and general literature">{{cite book|title=The EncyclopaediafckLRBritannica: a dictionary of arts, sciences, and generalfckLRliterature|url=http://books.google.com/books?id=p11JAAAAYAAJ&amp;amp;amp;pg=PA477|accessdate=1fckLRApril 2013|year=1894|publisher=Maxwell Sommerville|pages=477�}}</ref>  
-
=== Jalisco Mexico ===
+
=== Jalisco Mexico ===
[http://www.panoramio.com/photo/40415978 Hacienda de Zambrano]. Jalisco Mexico. Near Sierra de los lobos. and Leon Guanajuato.  
[http://www.panoramio.com/photo/40415978 Hacienda de Zambrano]. Jalisco Mexico. Near Sierra de los lobos. and Leon Guanajuato.  
-
=== Chile ===
+
=== Chile ===
[[Government Junta of Chile (1810)]] President Mateo de Toro Zambrano. [[Casa Colorada|Casa solar Casa Colorada]] [[http://es.wikipedia.org/wiki/Casa_Colorada]]  
[[Government Junta of Chile (1810)]] President Mateo de Toro Zambrano. [[Casa Colorada|Casa solar Casa Colorada]] [[http://es.wikipedia.org/wiki/Casa_Colorada]]  
-
=== New Mexico ===
+
=== New Mexico ===
[[Mission Nuestra Se�ora de los �ngeles de Porci�ncula de los Pecos]] Fray Pedro Zambrano Ortiz.  
[[Mission Nuestra Se�ora de los �ngeles de Porci�ncula de los Pecos]] Fray Pedro Zambrano Ortiz.  
-
=== California. ===
+
=== California. ===
-
[[Mission San Fernando Rey de Espa�a]] Manuel Nicolas Zambrano, Order of Santiago.<ref name="Crosby2003">{{cite book|author=HarryfckLRCrosby|title=Gateway to Alta California: The Expedition to San Diego,fckLR1769|url=http://books.google.com/books?id=aozaguafweIC&amp;pg=PA216|accessdate=3fckLRDecember 2012|year=2003|publisher=Sunbelt Publications,fckLRInc.|isbn=978-0-932653-57-4|pages=216�}}</ref> <ref name="Crosby2003">{{cite book|author=Harry Crosby|title=GatewayfckLRto Alta California: The Expedition to San Diego,fckLR1769|url=http://books.google.com/books?id=aozaguafweIC&amp;pg=PA216|accessdate=4fckLRMarch 2013|year=2003|publisher=Sunbelt Publications,fckLRInc.|isbn=978-0-932653-57-4|pages=216�}}</ref>  
+
[[Mission San Fernando Rey de Espa�a]] Manuel Nicolas Zambrano, Order of Santiago.<ref name="Crosby2003">{{cite book|author=HarryfckLRCrosby|title=Gateway to Alta California: The Expedition to San Diego,fckLR1769|url=http://books.google.com/books?id=aozaguafweIC&amp;amp;amp;pg=PA216|accessdate=3fckLRDecember 2012|year=2003|publisher=Sunbelt Publications,fckLRInc.|isbn=978-0-932653-57-4|pages=216�}}</ref> <ref name="Crosby2003">{{cite book|author=Harry Crosby|title=GatewayfckLRto Alta California: The Expedition to San Diego,fckLR1769|url=http://books.google.com/books?id=aozaguafweIC&amp;amp;amp;pg=PA216|accessdate=4fckLRMarch 2013|year=2003|publisher=Sunbelt Publications,fckLRInc.|isbn=978-0-932653-57-4|pages=216�}}</ref>  
-
=== Spanish Empire Netherland, Italy and (Indias America and philippines). ===
+
=== Spanish Empire Netherland, Italy and (Indias America and philippines). ===
-
Don Pedro Zambrano y Gordillo, Marquez Zambrano ''(Marquis von zambrano)''1761. Under Spanish Flanders. The title migrated to Italy under [[Ferdinand VII of Spain|Ferdinand VII.]]. <ref name="Catal�Galcer�n1769">{{cite book|author1=Jos� Bern� yfckLRCatal�|author2=Vicente Galcer�n|author3=Jos� Camaron|coauthors=Jos�fckLRMurguia|title=Creaci�n antig�edad y privilegios de los t�tulos defckLRCastilla|url=http://books.google.com/books?id=m94_AAAAcAAJ&amp;pg=PA497|accessdate=21fckLRNovember 2012|year=1769|publisher=en la imprenta particular del autorfckLR; en Madrid|pages=497�}}</ref> <ref name="Fontane1848">{{cite book|author=TheodorfckLRFontane|title=K�niglich privilegirte Berlinische Zeitung von Staats-fckLRund gelehrten Sachen|url=http://books.google.com/books?id=BwJEAAAAcAAJ&amp;pg=PA59-IA8|accessdate=18fckLRMarch 2013|year=1848|publisher=Voss. Erben|pages=59�}}</ref> <ref name="Oesterreichischer Beobachter">{{citefckLRbook|title=OesterreichischerfckLRBeobachter|url=http://books.google.com/books?id=ULNIAAAAcAAJ&amp;pg=PA230|accessdate=18fckLRMarch 2013|year=1847|publisher=Strau�|pages=230�}}</ref> <ref name="BerghausHumboldt1829">{{cite book|author1=Heinrich KarlfckLRWilhelm Berghaus|author2=Alexander von Humboldt|author3=Karl FriedrichfckLRVollrath Hoffmann|title=Hertha, zeitschrift f�r erd-, v�lker- undfckLRstaatenkunde|url=http://books.google.com/books?id=JG4EAAAAQAAJ&amp;pg=PA105|accessdate=18fckLRMarch 2013|year=1829|publisher=In der J.G. Cotta'schenfckLRbuchhandlung|pages=105�}}</ref> <ref name="Bayreuther Zeitung">{{cite book|title=BayreutherfckLRZeitung|url=http://books.google.com/books?id=x_tDAAAAcAAJ&amp;pg=PA922|accessdate=18fckLRMarch 2013|year=1825|publisher=Giessel|pages=697�922}}</ref> <ref name="Conversations-Lexikon der Gegenwart: In vier B�nden. K bis O">{{cite book|title=Conversations-Lexikon der Gegenwart: In vierfckLRB�nden. K bis O|url=http://books.google.com/books?id=jrdMAAAAcAAJ&amp;pg=PA355|accessdate=18fckLRMarch 2013|year=1840|publisher=Brockhaus|pages=355�392}}</ref> <ref name="Suplemento al Elenco de grandezas y t�tulos nobiliarios espa�oles: T�tulos vacantes y t�tulos extranjeros cuyo uso fue autorizado en Espa�a">{{cite book|title=Suplemento al Elenco defckLRgrandezas y t�tulos nobiliarios espa�oles: T�tulos vacantes y t�tulosfckLRextranjeros cuyo uso fue autorizado enfckLREspa�a|url=http://books.google.com/books?id=RUAtzflOx7kC&amp;pg=PA92|accessdate=22fckLRMarch 2013|year=1991|publisher=EdicionesfckLRHidalguia|isbn=978-84-87204-29-6|pages=92�}}</ref> <ref name="Der Oesterreichische Beobachter">{{cite book|title=DerfckLROesterreichischefckLRBeobachter|url=http://books.google.com/books?id=PD9DAAAAcAAJ&amp;pg=PA77|accessdate=22fckLRMarch 2013|year=1826|publisher=Strau�|pages=77�}}</ref> <ref name="Ranft1762">{{cite book|author=Michael Ranft|title=NeuefckLRgenealogisch-historische Nachrichten von den vornehmstenfckLRBegebenheiten, welche sich an den europ�ischen H�fenfckLRzugetragen|url=http://books.google.com/books?id=UTtBAAAAcAAJ&amp;pg=PA292|accessdate=22fckLRMarch 2013|year=1762|publisher=Heinsius|pages=292�}}</ref>  
+
Don Pedro Zambrano y Gordillo, Marquez Zambrano ''(Marquis von zambrano)''1761. Under Spanish Flanders. The title migrated to Italy under [[Ferdinand VII of Spain|Ferdinand VII.]]. <ref name="Catal�Galcer�n1769">{{cite book|author1=Jos� Bern� yfckLRCatal�|author2=Vicente Galcer�n|author3=Jos� Camaron|coauthors=Jos�fckLRMurguia|title=Creaci�n antig�edad y privilegios de los t�tulos defckLRCastilla|url=http://books.google.com/books?id=m94_AAAAcAAJ&amp;amp;amp;pg=PA497|accessdate=21fckLRNovember 2012|year=1769|publisher=en la imprenta particular del autorfckLR; en Madrid|pages=497�}}</ref> <ref name="Fontane1848">{{cite book|author=TheodorfckLRFontane|title=K�niglich privilegirte Berlinische Zeitung von Staats-fckLRund gelehrten Sachen|url=http://books.google.com/books?id=BwJEAAAAcAAJ&amp;amp;amp;pg=PA59-IA8|accessdate=18fckLRMarch 2013|year=1848|publisher=Voss. Erben|pages=59�}}</ref> <ref name="Oesterreichischer Beobachter">{{citefckLRbook|title=OesterreichischerfckLRBeobachter|url=http://books.google.com/books?id=ULNIAAAAcAAJ&amp;amp;amp;pg=PA230|accessdate=18fckLRMarch 2013|year=1847|publisher=Strau�|pages=230�}}</ref> <ref name="BerghausHumboldt1829">{{cite book|author1=Heinrich KarlfckLRWilhelm Berghaus|author2=Alexander von Humboldt|author3=Karl FriedrichfckLRVollrath Hoffmann|title=Hertha, zeitschrift f�r erd-, v�lker- undfckLRstaatenkunde|url=http://books.google.com/books?id=JG4EAAAAQAAJ&amp;amp;amp;pg=PA105|accessdate=18fckLRMarch 2013|year=1829|publisher=In der J.G. Cotta'schenfckLRbuchhandlung|pages=105�}}</ref> <ref name="Bayreuther Zeitung">{{cite book|title=BayreutherfckLRZeitung|url=http://books.google.com/books?id=x_tDAAAAcAAJ&amp;amp;amp;pg=PA922|accessdate=18fckLRMarch 2013|year=1825|publisher=Giessel|pages=697�922}}</ref> <ref name="Conversations-Lexikon der Gegenwart: In vier B�nden. K bis O">{{cite book|title=Conversations-Lexikon der Gegenwart: In vierfckLRB�nden. K bis O|url=http://books.google.com/books?id=jrdMAAAAcAAJ&amp;amp;amp;pg=PA355|accessdate=18fckLRMarch 2013|year=1840|publisher=Brockhaus|pages=355�392}}</ref> <ref name="Suplemento al Elenco de grandezas y t�tulos nobiliarios espa�oles: T�tulos vacantes y t�tulos extranjeros cuyo uso fue autorizado en Espa�a">{{cite book|title=Suplemento al Elenco defckLRgrandezas y t�tulos nobiliarios espa�oles: T�tulos vacantes y t�tulosfckLRextranjeros cuyo uso fue autorizado enfckLREspa�a|url=http://books.google.com/books?id=RUAtzflOx7kC&amp;amp;amp;pg=PA92|accessdate=22fckLRMarch 2013|year=1991|publisher=EdicionesfckLRHidalguia|isbn=978-84-87204-29-6|pages=92�}}</ref> <ref name="Der Oesterreichische Beobachter">{{cite book|title=DerfckLROesterreichischefckLRBeobachter|url=http://books.google.com/books?id=PD9DAAAAcAAJ&amp;amp;amp;pg=PA77|accessdate=22fckLRMarch 2013|year=1826|publisher=Strau�|pages=77�}}</ref> <ref name="Ranft1762">{{cite book|author=Michael Ranft|title=NeuefckLRgenealogisch-historische Nachrichten von den vornehmstenfckLRBegebenheiten, welche sich an den europ�ischen H�fenfckLRzugetragen|url=http://books.google.com/books?id=UTtBAAAAcAAJ&amp;amp;amp;pg=PA292|accessdate=22fckLRMarch 2013|year=1762|publisher=Heinsius|pages=292�}}</ref>  
-
=== Spain ===
+
=== Spain ===
-
[http://www.acsandino.org.ni/index.php?option=com_content&amp;view=article&amp;id=42&amp;Itemid=115 ORLANDO JOS� ZAMBRANO B�EZ]., Born in 1� de Septiembre de 1894, and Died on 13 de Noviembre de 1959.  
+
[http://www.acsandino.org.ni/index.php?option=com_content&view=article&id=42&Itemid=115 ORLANDO JOS� ZAMBRANO B�EZ]., Born in 1� de Septiembre de 1894, and Died on 13 de Noviembre de 1959.  
<br>
<br>
-
=== Texas. ===
+
=== Texas. ===
Juan Manuel Zambrano <ref name="CommissionCasta�eda1976">{{cite book|author1=Texas KnightsfckLRof Columbus Historical Commission|author2=Carlos EduardofckLRCasta�eda|title=Our Catholic Heritage in Texas, 1519-1936: TransitionfckLRperiod: the fight for freedom,fckLR1810-1836|url=http://books.google.com/books?id=Zx8jAQAAIAAJ|accessdate=5fckLRMarch 2013|year=1976|publisher=Arno Press|pages=18 , 36, 179}}</ref>  
Juan Manuel Zambrano <ref name="CommissionCasta�eda1976">{{cite book|author1=Texas KnightsfckLRof Columbus Historical Commission|author2=Carlos EduardofckLRCasta�eda|title=Our Catholic Heritage in Texas, 1519-1936: TransitionfckLRperiod: the fight for freedom,fckLR1810-1836|url=http://books.google.com/books?id=Zx8jAQAAIAAJ|accessdate=5fckLRMarch 2013|year=1976|publisher=Arno Press|pages=18 , 36, 179}}</ref>  
-
[http://books.google.com/books?id=1X4FAAAAQAAJ&amp;pg=PA186&amp;dq=zambrano+laredo+tejas&amp;hl=en&amp;sa=X&amp;ei=Ot-OUKeRJMG82wXGxYGYAQ&amp;ved=0CC8Q6AEwAA#v=onepage&amp;q=zambrano%20laredo%20tejas&amp;f=false Canas de Zambrano in Texas colony 1789] [[Republic of Texas]]<ref name="Fil�solaAlmonte1849">{{cite book|author1=VicentefckLRFil�sola|author2=Juan Nepomuceno Almonte|title=Memorias para lafckLRhistoria de la guerra defckLRTejas|url=http://books.google.com/books?id=1X4FAAAAQAAJ&amp;pg=PA186|accessdate=21fckLRNovember 2012|year=1849|publisher=Tip. de R. Rafael|pages=186�}}</ref> <ref name="Teja1996">{{cite book|author=Jes�s F. de la Teja|title=SanfckLRAntonio de B�xar: A Community on New Spain's NorthernfckLRFrontie|url=http://books.google.com/books?id=KGthczL6K5MC&amp;pg=PA224|accessdate=21fckLRNovember 2012|date=1 July 1996|publisher=UNMfckLRPress|isbn=978-0-8263-1751-3|pages=224�}}</ref> <ref name="Alam�n1850">{{cite book|author=Lucas Alam�n|title=HistoriafckLRde M�jico: Desde los primeros movimientos que prepararon sufckLRindependencia en el a�o de 1808 hasta la �pocafckLRpresente|url=http://books.google.com/books?id=cUo6AAAAcAAJ&amp;pg=PA488|accessdate=21fckLRNovember 2012|year=1850|pages=488�}}</ref><ref name="Fil�solaAlmonte1849">{{cite book|author1=VicentefckLRFil�sola|author2=Juan Nepomuceno Almonte|title=Memorias para lafckLRhistoria de la guerra defckLRTejas|url=http://books.google.com/books?id=1X4FAAAAQAAJ&amp;pg=PA186|accessdate=19fckLRNovember 2012|year=1849|publisher=Tip. de R.fckLRRafael|pages=186�}}</ref><ref name="Faulk1964">{{cite book|author=OdiefckLRB. Faulk|title=The Last Years of Spanish Texas,fckLR1778-1821|url=http://books.google.com/books?id=0mMLAAAAYAAJ|accessdate=27fckLRNovember 2012|year=1964|publisher=Mouton|page=32}}</ref> [http://www.tamu.edu/faculty/ccbn/dewitt/zambrano.htm Zambrano Spanish Index]  
+
[http://books.google.com/books?id=1X4FAAAAQAAJ&pg=PA186&dq=zambrano+laredo+tejas&hl=en&sa=X&ei=Ot-OUKeRJMG82wXGxYGYAQ&ved=0CC8Q6AEwAA#v=onepage&q=zambrano%20laredo%20tejas&f=false Canas de Zambrano in Texas colony 1789] [[Republic of Texas]]<ref name="Fil�solaAlmonte1849">{{cite book|author1=VicentefckLRFil�sola|author2=Juan Nepomuceno Almonte|title=Memorias para lafckLRhistoria de la guerra defckLRTejas|url=http://books.google.com/books?id=1X4FAAAAQAAJ&amp;amp;amp;pg=PA186|accessdate=21fckLRNovember 2012|year=1849|publisher=Tip. de R. Rafael|pages=186�}}</ref> <ref name="Teja1996">{{cite book|author=Jes�s F. de la Teja|title=SanfckLRAntonio de B�xar: A Community on New Spain's NorthernfckLRFrontie|url=http://books.google.com/books?id=KGthczL6K5MC&amp;amp;amp;pg=PA224|accessdate=21fckLRNovember 2012|date=1 July 1996|publisher=UNMfckLRPress|isbn=978-0-8263-1751-3|pages=224�}}</ref> <ref name="Alam�n1850">{{cite book|author=Lucas Alam�n|title=HistoriafckLRde M�jico: Desde los primeros movimientos que prepararon sufckLRindependencia en el a�o de 1808 hasta la �pocafckLRpresente|url=http://books.google.com/books?id=cUo6AAAAcAAJ&amp;amp;amp;pg=PA488|accessdate=21fckLRNovember 2012|year=1850|pages=488�}}</ref><ref name="Fil�solaAlmonte1849">{{cite book|author1=VicentefckLRFil�sola|author2=Juan Nepomuceno Almonte|title=Memorias para lafckLRhistoria de la guerra defckLRTejas|url=http://books.google.com/books?id=1X4FAAAAQAAJ&amp;amp;amp;pg=PA186|accessdate=19fckLRNovember 2012|year=1849|publisher=Tip. de R.fckLRRafael|pages=186�}}</ref><ref name="Faulk1964">{{cite book|author=OdiefckLRB. Faulk|title=The Last Years of Spanish Texas,fckLR1778-1821|url=http://books.google.com/books?id=0mMLAAAAYAAJ|accessdate=27fckLRNovember 2012|year=1964|publisher=Mouton|page=32}}</ref> [http://www.tamu.edu/faculty/ccbn/dewitt/zambrano.htm Zambrano Spanish Index]  
<br>
<br>
-
=== Mexico Monterey. ===
+
=== Mexico Monterey. ===
-
<ref name="Cavazos2009">{{cite book|author=Juan Manuel Casas y V�ctorfckLRCavazos|title=Panteones de El Carmen y Dolores: patrimonio cultural defckLRNuevo Le�n|url=http://books.google.com/books?id=sgZrDVt0U-gC&amp;pg=PA250|accessdate=13fckLRNovember 2012|year=2009|publisher=Fondo Editorial defckLRNL|isbn=978-607-7577-22-5|pages=250�}}</ref>  
+
<ref name="Cavazos2009">{{cite book|author=Juan Manuel Casas y V�ctorfckLRCavazos|title=Panteones de El Carmen y Dolores: patrimonio cultural defckLRNuevo Le�n|url=http://books.google.com/books?id=sgZrDVt0U-gC&amp;amp;amp;pg=PA250|accessdate=13fckLRNovember 2012|year=2009|publisher=Fondo Editorial defckLRNL|isbn=978-607-7577-22-5|pages=250�}}</ref>  
-
=== [[Nuevo Leon]]. ===
+
=== [[Nuevo Leon]]. ===
-
<ref name="Cavazos2009">{{cite book|author=Juan Manuel Casas y V�ctorfckLRCavazos|title=Panteones de El Carmen y Dolores: patrimonio cultural defckLRNuevo Le�n|url=http://books.google.com/books?id=sgZrDVt0U-gC&amp;pg=PA221|accessdate=3fckLRDecember 2012|year=2009|publisher=Fondo Editorial defckLRNL|isbn=978-607-7577-22-5|pages=221�}}</ref> <ref name="Torres2006">{{cite book|author=Oscar FloresfckLRTorres|title=Monterrey en la Revoluci�n,fckLR1909-1923|url=http://books.google.com/books?id=5cLTW2zBl0kC&amp;pg=PA260|accessdate=3fckLRDecember 2012|year=2006|publisher=Oscar FloresfckLRTorres|isbn=978-968-6858-17-4|pages=259�}}</ref> <ref name="QuirogaMac�as2006">{{cite book|author1=Miguel A. Gonz�lezfckLRQuiroga|author2=C�sar Morado Mac�as|title=Nuevo Le�n Ocupado: AspectosfckLRde la Guerra M�xico-EstadosfckLRUnidos|url=http://books.google.com/books?id=TNfpPj4agIwC&amp;pg=PA142|accessdate=3fckLRDecember 2012|date=1 January 2006|publisher=Fondo Editorial defckLRNL|isbn=978-970-9715-19-4|pages=142�}}</ref> <ref name="Congress1920">{{cite book|author=United States.fckLRCongress|title=CongressionalfckLRedition|url=http://books.google.com/books?id=yNNGAQAAIAAJ&amp;pg=PA3466|accessdate=3fckLRDecember 2012|year=1920|publisher=U.S. G.P.O.|pages=3465�}}</ref> <ref name="Villarreal2004">{{cite book|author=Daniel ZambranofckLRVillarreal|title=El apellido Zambrano en Nuevo Le�n en los siglosfckLRXVIII y XIX: cronolog�as yfckLRgenealog�as|url=http://books.google.com/books?id=NZ8ZHQAACAAJ|accessdate=3fckLRDecember 2012|year=2004}}</ref>  
+
<ref name="Cavazos2009">{{cite book|author=Juan Manuel Casas y V�ctorfckLRCavazos|title=Panteones de El Carmen y Dolores: patrimonio cultural defckLRNuevo Le�n|url=http://books.google.com/books?id=sgZrDVt0U-gC&amp;amp;amp;pg=PA221|accessdate=3fckLRDecember 2012|year=2009|publisher=Fondo Editorial defckLRNL|isbn=978-607-7577-22-5|pages=221�}}</ref> <ref name="Torres2006">{{cite book|author=Oscar FloresfckLRTorres|title=Monterrey en la Revoluci�n,fckLR1909-1923|url=http://books.google.com/books?id=5cLTW2zBl0kC&amp;amp;amp;pg=PA260|accessdate=3fckLRDecember 2012|year=2006|publisher=Oscar FloresfckLRTorres|isbn=978-968-6858-17-4|pages=259�}}</ref> <ref name="QuirogaMac�as2006">{{cite book|author1=Miguel A. Gonz�lezfckLRQuiroga|author2=C�sar Morado Mac�as|title=Nuevo Le�n Ocupado: AspectosfckLRde la Guerra M�xico-EstadosfckLRUnidos|url=http://books.google.com/books?id=TNfpPj4agIwC&amp;amp;amp;pg=PA142|accessdate=3fckLRDecember 2012|date=1 January 2006|publisher=Fondo Editorial defckLRNL|isbn=978-970-9715-19-4|pages=142�}}</ref> <ref name="Congress1920">{{cite book|author=United States.fckLRCongress|title=CongressionalfckLRedition|url=http://books.google.com/books?id=yNNGAQAAIAAJ&amp;amp;amp;pg=PA3466|accessdate=3fckLRDecember 2012|year=1920|publisher=U.S. G.P.O.|pages=3465�}}</ref> <ref name="Villarreal2004">{{cite book|author=Daniel ZambranofckLRVillarreal|title=El apellido Zambrano en Nuevo Le�n en los siglosfckLRXVIII y XIX: cronolog�as yfckLRgenealog�as|url=http://books.google.com/books?id=NZ8ZHQAACAAJ|accessdate=3fckLRDecember 2012|year=2004}}</ref>  
-
=== Nueva granada (South America). ===
+
=== Nueva granada (South America). ===
-
<ref name="Eli�n2001">{{cite book|author=Juan Sebasti�n Eli�n|title=ElfckLRGran libro de los apellidos y lafckLRher�ldica|url=http://books.google.com/books?id=xx3TKbYQcnYC&amp;pg=PA76|accessdate=13fckLRNovember 2012|year=2001|publisher=American BarfckLRAssociation|isbn=978-84-7927-549-5|pages=76�}}</ref> <ref name="Cruz-Coke1995">{{cite book|author=RicardofckLRCruz-Coke|title=Historia de La MedicinafckLRChilena|url=http://books.google.com/books?id=Y02VLchRopUC&amp;pg=PA207|accessdate=19fckLRNovember 2012|year=1995|publisher=AndresfckLRBello|isbn=978-956-13-1303-3|pages=207�}}</ref> <ref name="IndiasHerrera1984">{{cite book|author1=Archivo General defckLRIndias|author2=Antonia Heredia Herrera|title=(1605 -fckLR1609).|url=http://books.google.com/books?id=WyWSV4Y1StMC&amp;pg=PA562|accessdate=19fckLRNovember 2012|year=1984|publisher=CSIC-Dpto. defckLRPublicaciones|isbn=978-84-505-0200-8|pages=562�}}</ref> <ref name="Fil�solaAlmonte1848">{{cite book|author1=VicentefckLRFil�sola|author2=Juan Nepomuceno Almonte|title=Memorias para lafckLRhistoria de la guerra defckLRTejas|url=http://books.google.com/books?id=qWbpgg5kq0kC&amp;pg=PA30|accessdate=19fckLRNovember 2012|year=1848|publisher=Editora Nacional|pages=30�}}</ref> <ref name="VillenaSolano1993">{{cite book|author1=Guillermo LohmannfckLRVillena|author2=Francisco de Solano|title=Los Americanos en lasfckLR�rdenes nobiliarias|url=http://books.google.com/books?id=Jlefq-NJKq0C&amp;pg=PA237|accessdate=10fckLRDecember 2012|year=1993|publisher=CSIC-Dpto. defckLRPublicaciones|isbn=978-84-00-07351-0|pages=410�}}</ref>  
+
<ref name="Eli�n2001">{{cite book|author=Juan Sebasti�n Eli�n|title=ElfckLRGran libro de los apellidos y lafckLRher�ldica|url=http://books.google.com/books?id=xx3TKbYQcnYC&amp;amp;amp;pg=PA76|accessdate=13fckLRNovember 2012|year=2001|publisher=American BarfckLRAssociation|isbn=978-84-7927-549-5|pages=76�}}</ref> <ref name="Cruz-Coke1995">{{cite book|author=RicardofckLRCruz-Coke|title=Historia de La MedicinafckLRChilena|url=http://books.google.com/books?id=Y02VLchRopUC&amp;amp;amp;pg=PA207|accessdate=19fckLRNovember 2012|year=1995|publisher=AndresfckLRBello|isbn=978-956-13-1303-3|pages=207�}}</ref> <ref name="IndiasHerrera1984">{{cite book|author1=Archivo General defckLRIndias|author2=Antonia Heredia Herrera|title=(1605 -fckLR1609).|url=http://books.google.com/books?id=WyWSV4Y1StMC&amp;amp;amp;pg=PA562|accessdate=19fckLRNovember 2012|year=1984|publisher=CSIC-Dpto. defckLRPublicaciones|isbn=978-84-505-0200-8|pages=562�}}</ref> <ref name="Fil�solaAlmonte1848">{{cite book|author1=VicentefckLRFil�sola|author2=Juan Nepomuceno Almonte|title=Memorias para lafckLRhistoria de la guerra defckLRTejas|url=http://books.google.com/books?id=qWbpgg5kq0kC&amp;amp;amp;pg=PA30|accessdate=19fckLRNovember 2012|year=1848|publisher=Editora Nacional|pages=30�}}</ref> <ref name="VillenaSolano1993">{{cite book|author1=Guillermo LohmannfckLRVillena|author2=Francisco de Solano|title=Los Americanos en lasfckLR�rdenes nobiliarias|url=http://books.google.com/books?id=Jlefq-NJKq0C&amp;amp;amp;pg=PA237|accessdate=10fckLRDecember 2012|year=1993|publisher=CSIC-Dpto. defckLRPublicaciones|isbn=978-84-00-07351-0|pages=410�}}</ref>  
<br>
<br>
-
=== Italy. ===
+
=== Italy. ===
<ref name="Delille1985">{{cite book|author=G�rardfckLRDelille|title=Famille et propri�t� dans le Royaume de Naples, XVe-XIXefckLRsi�cle|url=http://books.google.com/books?id=ndsaAAAAYAAJ|accessdate=28fckLRNovember 2012|year=1985|publisher=Boccard|isbn=978-2-7283-0079-2|page=429}}</ref> <ref name="Delille1988">{{cite book|author=GerardfckLRDelille|title=Famiglia e propriet� nel Regno di Napoli, XV-XIXfckLRsecolo|url=http://books.google.com/books?id=ju4hAAAAMAAJ|accessdate=28fckLRNovember 2012|year=1988|publisher=Einaudi|page=390}}</ref> <ref name="Passarelliitaliano1999">{{cite book|author1=PasqualefckLRPassarelli|author2=Istituto enciclopedico italiano|author3=SerenafckLRCherubini|title=Campania|url=http://books.google.com/books?id=gRMUAQAAMAAJ|accessdate=28fckLRNovember 2012|year=1999|publisher=Istituto enciclopedicofckLRitaliano|page=253}}</ref> <ref name="araldico1923">{{cite book|author=CollegiofckLRaraldico|title=Rivista|url=http://books.google.com/books?id=CfwIAQAAIAAJ|accessdate=13fckLRDecember 2012|year=1923|publisher=Presso il CollegiofckLRaraldico.|page=26}}</ref>  
<ref name="Delille1985">{{cite book|author=G�rardfckLRDelille|title=Famille et propri�t� dans le Royaume de Naples, XVe-XIXefckLRsi�cle|url=http://books.google.com/books?id=ndsaAAAAYAAJ|accessdate=28fckLRNovember 2012|year=1985|publisher=Boccard|isbn=978-2-7283-0079-2|page=429}}</ref> <ref name="Delille1988">{{cite book|author=GerardfckLRDelille|title=Famiglia e propriet� nel Regno di Napoli, XV-XIXfckLRsecolo|url=http://books.google.com/books?id=ju4hAAAAMAAJ|accessdate=28fckLRNovember 2012|year=1988|publisher=Einaudi|page=390}}</ref> <ref name="Passarelliitaliano1999">{{cite book|author1=PasqualefckLRPassarelli|author2=Istituto enciclopedico italiano|author3=SerenafckLRCherubini|title=Campania|url=http://books.google.com/books?id=gRMUAQAAMAAJ|accessdate=28fckLRNovember 2012|year=1999|publisher=Istituto enciclopedicofckLRitaliano|page=253}}</ref> <ref name="araldico1923">{{cite book|author=CollegiofckLRaraldico|title=Rivista|url=http://books.google.com/books?id=CfwIAQAAIAAJ|accessdate=13fckLRDecember 2012|year=1923|publisher=Presso il CollegiofckLRaraldico.|page=26}}</ref>  
-
=== Uruguay. ===
+
=== Uruguay. ===
Jose Zambrano y Vienna <ref name="Villena1947">{{cite book|author=Guillermo LohmannfckLRVillena|title=Santiago|url=http://books.google.com/books?id=VBwbAAAAYAAJ|accessdate=10fckLRDecember 2012|year=1947|publisher=Consejo Superior de InvestigacionesfckLRCient�ficas, Instituto "Gonzalo Fern�ndez de Oviedo,"|page=462}}</ref> <ref name="Apolant1966">{{cite book|author=Juan AlejandrofckLRApolant|title=G�nesis de la familia uruguaya: los habitantes defckLRMontevideo en sus primeros 40 a�os, filiaciones, ascendencias,fckLRentronques, descendencias|url=http://books.google.com/books?id=L4vRAAAAMAAJ|accessdate=4fckLRDecember 2012|year=1966|publisher=Instituto Hist�rico y Geogr�fico delfckLRUruguay|page=971}}</ref>  
Jose Zambrano y Vienna <ref name="Villena1947">{{cite book|author=Guillermo LohmannfckLRVillena|title=Santiago|url=http://books.google.com/books?id=VBwbAAAAYAAJ|accessdate=10fckLRDecember 2012|year=1947|publisher=Consejo Superior de InvestigacionesfckLRCient�ficas, Instituto "Gonzalo Fern�ndez de Oviedo,"|page=462}}</ref> <ref name="Apolant1966">{{cite book|author=Juan AlejandrofckLRApolant|title=G�nesis de la familia uruguaya: los habitantes defckLRMontevideo en sus primeros 40 a�os, filiaciones, ascendencias,fckLRentronques, descendencias|url=http://books.google.com/books?id=L4vRAAAAMAAJ|accessdate=4fckLRDecember 2012|year=1966|publisher=Instituto Hist�rico y Geogr�fico delfckLRUruguay|page=971}}</ref>  
-
=== Philippines. ===
+
=== Philippines. ===
-
Andres Zambrano <ref name="Colecci�n de documentos in�ditos para la historia de Espa�a">{{cite book|title=Colecci�n de documentos in�ditos para lafckLRhistoria de Espa�a|url=http://books.google.com/books?id=InBJAAAAMAAJ|accessdate=10fckLRDecember 2012|year=1882|publisher=Academia de lafckLRHistoria|page=435}}</ref> <ref name="AduarteCruz1693">{{cite book|author1=DiegofckLRAduarte|author2=Baltasar �de Santa Cruz|author3=Vicente �defckLRSalazar|coauthors=Domingo Gonzalez, Pedro M. �defckLRBuenacasa|title=Historia De La Provincia Del Santo Rosario DefckLRFilipinas, Iap�n Y China, De La Sagrada Orden DefckLRPredicadores|url=http://books.google.com/books?id=9l5PAAAAcAAJ&amp;pg=PA161|accessdate=28fckLRNovember 2012|year=1693|publisher=Gascon|pages=161�}}</ref>  
+
Andres Zambrano <ref name="Colecci�n de documentos in�ditos para la historia de Espa�a">{{cite book|title=Colecci�n de documentos in�ditos para lafckLRhistoria de Espa�a|url=http://books.google.com/books?id=InBJAAAAMAAJ|accessdate=10fckLRDecember 2012|year=1882|publisher=Academia de lafckLRHistoria|page=435}}</ref> <ref name="AduarteCruz1693">{{cite book|author1=DiegofckLRAduarte|author2=Baltasar �de Santa Cruz|author3=Vicente �defckLRSalazar|coauthors=Domingo Gonzalez, Pedro M. �defckLRBuenacasa|title=Historia De La Provincia Del Santo Rosario DefckLRFilipinas, Iap�n Y China, De La Sagrada Orden DefckLRPredicadores|url=http://books.google.com/books?id=9l5PAAAAcAAJ&amp;amp;amp;pg=PA161|accessdate=28fckLRNovember 2012|year=1693|publisher=Gascon|pages=161�}}</ref>  
-
=== Spanish Monasteries. ===
+
=== Spanish Monasteries. ===
-
<ref name="Dom�nguezAdams2012">{{cite book|author1=Francisco AtanasiofckLRDom�nguez|author2=Eleanor B Adams|author3=Fray AngelicofckLRChavez|title=The Missions of New Mexico,fckLR1776|url=http://books.google.com/books?id=p30lEvbkVBwC&amp;pg=PA223|accessdate=28fckLRNovember 2012|date=March 2012|publisher=SunstonefckLRPress|isbn=978-0-86534-869-1|pages=387�}}</ref>  
+
<ref name="Dom�nguezAdams2012">{{cite book|author1=Francisco AtanasiofckLRDom�nguez|author2=Eleanor B Adams|author3=Fray AngelicofckLRChavez|title=The Missions of New Mexico,fckLR1776|url=http://books.google.com/books?id=p30lEvbkVBwC&amp;amp;amp;pg=PA223|accessdate=28fckLRNovember 2012|date=March 2012|publisher=SunstonefckLRPress|isbn=978-0-86534-869-1|pages=387�}}</ref>  
-
=== Argentina. ===
+
=== Argentina. ===
-
<ref name="Revista hist�rica">{{cite book|title=RevistafckLRhist�rica|url=http://books.google.com/books?id=09l6AAAAMAAJ|accessdate=10fckLRDecember 2012|year=1979|publisher=The Instituto|page=72}}</ref> <ref name="Los Vascos en Am�rica: Provincias de C�rdoba, Corrientes, Tucum�n, Mendoza, San Juan, San Luis">{{cite book|title=Los Vascos enfckLRAm�rica: Provincias de C�rdoba, Corrientes, Tucum�n, Mendoza, SanfckLRJuan, San Luis|url=http://books.google.com/books?id=n1bjAAAAMAAJ|accessdate=10fckLRDecember 2012|year=1996|publisher=Fundaci�n Vasco-Argentina Juan defckLRGaray, Departamento Estudios Hist�ricos|page=179}}</ref> <ref name="Zorregu�etaZorreguieta2008">{{cite book|author1=MarianofckLRZorregu�eta|author2=Roberto A. Ibarguren Zorreguieta|author3=Marta defckLRla Cuesta Figueroa|title=Apuntes Hist�ricos de la Provincia de SaltafckLRen la �poca DelfckLRColoniaje|url=http://books.google.com/books?id=sm_QR4a0xKkC&amp;pg=PA419|accessdate=10fckLRDecember 2012|year=2008|publisher=Editorial EUCASA /fckLRB.T.U.|isbn=978-950-623-044-9|pages=419�}}</ref> <ref name="L�pez2005">{{cite book|author=Sara Mata defckLRL�pez|title=Tierra y poder en Salta: El Noroeste argentino en v�sperasfckLRde la independencia|url=http://books.google.com/books?id=kY5EAAAAYAAJ|accessdate=10fckLRDecember 2012|year=2005|publisher=CEPIHA|isbn=978-987-22296-0-3|page=80}}</ref> <ref name="Calvo1943">{{cite book|author=Carlos Calvo|title=NobiliariofckLRdel antiguo virreynato del R�o de lafckLRPlata|url=http://books.google.com/books?id=fldlAAAAMAAJ|accessdate=10fckLRDecember 2012|year=1943|publisher=Librer�a y editorial "La Facultad",fckLRBernab� y c�a.|page=376}}</ref> <ref name="Redonnet1992">{{cite book|author=Jorge A. SerranofckLRRedonnet|title=La sociedad de Buenos Aires en sus derechos afckLRmayorazgos y a otras fundaciones espa�olas: (siglofckLRXVII)|url=http://books.google.com/books?id=gUNHAAAAYAAJ|accessdate=23fckLRMarch 2013|year=1992|publisher=Academia Americana defckLRGenealog�a|page=89}}</ref>  
+
<ref name="Revista hist�rica">{{cite book|title=RevistafckLRhist�rica|url=http://books.google.com/books?id=09l6AAAAMAAJ|accessdate=10fckLRDecember 2012|year=1979|publisher=The Instituto|page=72}}</ref> <ref name="Los Vascos en Am�rica: Provincias de C�rdoba, Corrientes, Tucum�n, Mendoza, San Juan, San Luis">{{cite book|title=Los Vascos enfckLRAm�rica: Provincias de C�rdoba, Corrientes, Tucum�n, Mendoza, SanfckLRJuan, San Luis|url=http://books.google.com/books?id=n1bjAAAAMAAJ|accessdate=10fckLRDecember 2012|year=1996|publisher=Fundaci�n Vasco-Argentina Juan defckLRGaray, Departamento Estudios Hist�ricos|page=179}}</ref> <ref name="Zorregu�etaZorreguieta2008">{{cite book|author1=MarianofckLRZorregu�eta|author2=Roberto A. Ibarguren Zorreguieta|author3=Marta defckLRla Cuesta Figueroa|title=Apuntes Hist�ricos de la Provincia de SaltafckLRen la �poca DelfckLRColoniaje|url=http://books.google.com/books?id=sm_QR4a0xKkC&amp;amp;amp;pg=PA419|accessdate=10fckLRDecember 2012|year=2008|publisher=Editorial EUCASA /fckLRB.T.U.|isbn=978-950-623-044-9|pages=419�}}</ref> <ref name="L�pez2005">{{cite book|author=Sara Mata defckLRL�pez|title=Tierra y poder en Salta: El Noroeste argentino en v�sperasfckLRde la independencia|url=http://books.google.com/books?id=kY5EAAAAYAAJ|accessdate=10fckLRDecember 2012|year=2005|publisher=CEPIHA|isbn=978-987-22296-0-3|page=80}}</ref> <ref name="Calvo1943">{{cite book|author=Carlos Calvo|title=NobiliariofckLRdel antiguo virreynato del R�o de lafckLRPlata|url=http://books.google.com/books?id=fldlAAAAMAAJ|accessdate=10fckLRDecember 2012|year=1943|publisher=Librer�a y editorial "La Facultad",fckLRBernab� y c�a.|page=376}}</ref> <ref name="Redonnet1992">{{cite book|author=Jorge A. SerranofckLRRedonnet|title=La sociedad de Buenos Aires en sus derechos afckLRmayorazgos y a otras fundaciones espa�olas: (siglofckLRXVII)|url=http://books.google.com/books?id=gUNHAAAAYAAJ|accessdate=23fckLRMarch 2013|year=1992|publisher=Academia Americana defckLRGenealog�a|page=89}}</ref>  
<br>
<br>
-
=== Ecuador. ===
+
=== Ecuador. ===
-
Ramon Zambrano. <ref name="Lisb�a1992">{{cite book|author=Miguel MariafckLRLisb�a|title=Relaci�n de un viaje a Venezuela, Nueva Granada yfckLREcuador|url=http://books.google.com/books?id=KqdrAAAAMAAJ|accessdate=10fckLRDecember 2012|year=1992|publisher=BibliotecafckLRAyacucho|isbn=978-980-276-189-0|page=185}}</ref> <ref name="O'NeillDom�nguez2001">{{cite book|author1=Charles EdwardsfckLRO'Neill|author2=Joaqu�n Mar�a Dom�nguez|title=Diccionario hist�rico defckLRla Compa��a de Jes�s:fckLRbiogr�fico-tem�tico|url=http://books.google.com/books?id=36FRIxTEEnQC&amp;pg=PA2419|accessdate=10fckLRDecember 2012|year=2001|publisher=Univ PontificafckLRComillas|isbn=978-84-8468-039-0|pages=2486�}}</ref> <ref name="Groot1893">{{cite book|author=Jos� ManuelfckLRGroot|title=Historia eclesi�stica y civil de Nueva Granada: escritafckLRsobre documentosfckLRaut�nticos|url=http://books.google.com/books?id=P4c2vWjBfzcC&amp;pg=PA136|accessdate=10fckLRDecember 2012|year=1893|publisher=M. Rivas &amp; ca.|pages=136�}}</ref>  
+
Ramon Zambrano. <ref name="Lisb�a1992">{{cite book|author=Miguel MariafckLRLisb�a|title=Relaci�n de un viaje a Venezuela, Nueva Granada yfckLREcuador|url=http://books.google.com/books?id=KqdrAAAAMAAJ|accessdate=10fckLRDecember 2012|year=1992|publisher=BibliotecafckLRAyacucho|isbn=978-980-276-189-0|page=185}}</ref> <ref name="O'NeillDom�nguez2001">{{cite book|author1=Charles EdwardsfckLRO'Neill|author2=Joaqu�n Mar�a Dom�nguez|title=Diccionario hist�rico defckLRla Compa��a de Jes�s:fckLRbiogr�fico-tem�tico|url=http://books.google.com/books?id=36FRIxTEEnQC&amp;amp;amp;pg=PA2419|accessdate=10fckLRDecember 2012|year=2001|publisher=Univ PontificafckLRComillas|isbn=978-84-8468-039-0|pages=2486�}}</ref> <ref name="Groot1893">{{cite book|author=Jos� ManuelfckLRGroot|title=Historia eclesi�stica y civil de Nueva Granada: escritafckLRsobre documentosfckLRaut�nticos|url=http://books.google.com/books?id=P4c2vWjBfzcC&amp;amp;amp;pg=PA136|accessdate=10fckLRDecember 2012|year=1893|publisher=M. Rivas &amp;amp;amp; ca.|pages=136�}}</ref>  
<br>
<br>
-
=== Colombia. ===
+
=== Colombia. ===
Manuel Zambrano y Benavides. <ref name="Guzm�n2006">{{cite book|author=Miguel Wenceslao QuinterofckLRGuzm�n|title=Linajes del Cauca Grande: fuentes para lafckLRhistoria|url=http://books.google.com/books?id=cstPAQAAIAAJ|accessdate=11fckLRDecember 2012|date=1 January 2006|publisher=Universidad de los Andes,fckLRFacultad de Ciencias Sociales, Facultad de Ingenier�a,fckLRCESO|isbn=978-958-695-246-0|page=549}}</ref>  
Manuel Zambrano y Benavides. <ref name="Guzm�n2006">{{cite book|author=Miguel Wenceslao QuinterofckLRGuzm�n|title=Linajes del Cauca Grande: fuentes para lafckLRhistoria|url=http://books.google.com/books?id=cstPAQAAIAAJ|accessdate=11fckLRDecember 2012|date=1 January 2006|publisher=Universidad de los Andes,fckLRFacultad de Ciencias Sociales, Facultad de Ingenier�a,fckLRCESO|isbn=978-958-695-246-0|page=549}}</ref>  
-
Alvaro Zambrano 1770. [http://www.culturainmaterial.com/montesdemaria/index.php?option=com_content&amp;view=article&amp;id=83&amp;Itemid=85 Puerto Zambrano]. <ref name="Arroyo1992">{{cite book|author=Guillermo OedingfckLRArroyo|title=Zambrano, cuna delfckLRCeb�|url=http://books.google.com/books?id=l20YAAAAYAAJ|accessdate=28fckLRMarch 2013|date=1992*|page=22}}</ref> <ref name="4 Premio Somos Patrimonio: 391 experiencias de apropiaci�n social del patrimonio cultural y natural">{{cite book|title=4 PremiofckLRSomos Patrimonio: 391 experiencias de apropiaci�n social delfckLRpatrimonio cultural yfckLRnatural|url=http://books.google.com/books?id=UNqMTmyP-5EC&amp;pg=PT38|accessdate=21fckLRNovember 2012|year=2004|publisher=Convenio Andr�sfckLRBello|isbn=978-958-698-165-1|pages=38�}}</ref> Founded House mark [[Zambrano, Bol�var|zambrano]] in 1770, became [[Villa]] [[San Sebastian de las playas blancas]]. Colombia.  
+
Alvaro Zambrano 1770. [http://www.culturainmaterial.com/montesdemaria/index.php?option=com_content&view=article&id=83&Itemid=85 Puerto Zambrano]. <ref name="Arroyo1992">{{cite book|author=Guillermo OedingfckLRArroyo|title=Zambrano, cuna delfckLRCeb�|url=http://books.google.com/books?id=l20YAAAAYAAJ|accessdate=28fckLRMarch 2013|date=1992*|page=22}}</ref> <ref name="4 Premio Somos Patrimonio: 391 experiencias de apropiaci�n social del patrimonio cultural y natural">{{cite book|title=4 PremiofckLRSomos Patrimonio: 391 experiencias de apropiaci�n social delfckLRpatrimonio cultural yfckLRnatural|url=http://books.google.com/books?id=UNqMTmyP-5EC&amp;amp;amp;pg=PT38|accessdate=21fckLRNovember 2012|year=2004|publisher=Convenio Andr�sfckLRBello|isbn=978-958-698-165-1|pages=38�}}</ref> Founded House mark [[Zambrano, Bol�var|zambrano]] in 1770, became [[Villa]] [[San Sebastian de las playas blancas]]. Colombia.  
-
[http://www.panoramio.com/photo/50578904 Casa Museo Alfonso Zambrano]. Woodcraft master . [http://www.culturapasto.gov.co/index.php?option=com_content&amp;view=article&amp;id=26:museo-alfonso-zambrano&amp;catid=6:museos-pasto&amp;Itemid=4 Gallery].  
+
[http://www.panoramio.com/photo/50578904 Casa Museo Alfonso Zambrano]. Woodcraft master . [http://www.culturapasto.gov.co/index.php?option=com_content&view=article&id=26:museo-alfonso-zambrano&catid=6:museos-pasto&Itemid=4 Gallery].  
<br>
<br>
-
=== Spanish Netherlands. ===
+
=== Spanish Netherlands. ===
-
<ref name="Conversations-Lexikon der Gegenwart">{{citefckLRbook|title=Conversations-Lexikon derfckLRGegenwart|url=http://books.google.com/books?id=1dxOAAAAcAAJ|accessdate=20fckLRDecember 2012|year=1840|publisher=Brockhaus|page=355}}</ref> <ref name="Der Oesterreichische Beobachter">{{cite book|title=DerfckLROesterreichischefckLRBeobachter|url=http://books.google.com/books?id=PD9DAAAAcAAJ&amp;pg=PA77|accessdate=20fckLRDecember 2012|year=1826|publisher=Strau�|pages=77�}}</ref> <ref name="Ranft1762">{{cite book|author=Michael Ranft|title=NeuefckLRgenealogisch-historische Nachrichten von den vornehmstenfckLRBegebenheiten, welche sich an den europ�ischen H�fenfckLRzugetragen|url=http://books.google.com/books?id=UTtBAAAAcAAJ&amp;pg=PA292|accessdate=20fckLRDecember 2012|year=1762|publisher=Heinsius|pages=292�}}</ref> <ref name="�sterreichischer Beobachter">{{citefckLRbook|title=�sterreichischerfckLRBeobachter|url=http://books.google.com/books?id=ixM8AQAAIAAJ&amp;pg=PT278|accessdate=20fckLRDecember 2012|year=1839|publisher=A. Strauss|pages=1631�}}</ref> <ref name="IselinBuxtorf1742">{{cite book|author1=Jacob ChristoffckLRIselin|author2=Johannes Buxtorf|author3=Jakob ChristophfckLRBeck|title=Neu-vermehrtes historisch- und geographisches allgemeinesfckLRLexicon...|url=http://books.google.com/books?id=sa9DAAAAcAAJ&amp;pg=PA329|accessdate=26fckLRMarch 2013|year=1742|publisher=J. Brandm�ller|pages=329�}}</ref>  
+
<ref name="Conversations-Lexikon der Gegenwart">{{citefckLRbook|title=Conversations-Lexikon derfckLRGegenwart|url=http://books.google.com/books?id=1dxOAAAAcAAJ|accessdate=20fckLRDecember 2012|year=1840|publisher=Brockhaus|page=355}}</ref> <ref name="Der Oesterreichische Beobachter">{{cite book|title=DerfckLROesterreichischefckLRBeobachter|url=http://books.google.com/books?id=PD9DAAAAcAAJ&amp;amp;amp;pg=PA77|accessdate=20fckLRDecember 2012|year=1826|publisher=Strau�|pages=77�}}</ref> <ref name="Ranft1762">{{cite book|author=Michael Ranft|title=NeuefckLRgenealogisch-historische Nachrichten von den vornehmstenfckLRBegebenheiten, welche sich an den europ�ischen H�fenfckLRzugetragen|url=http://books.google.com/books?id=UTtBAAAAcAAJ&amp;amp;amp;pg=PA292|accessdate=20fckLRDecember 2012|year=1762|publisher=Heinsius|pages=292�}}</ref> <ref name="�sterreichischer Beobachter">{{citefckLRbook|title=�sterreichischerfckLRBeobachter|url=http://books.google.com/books?id=ixM8AQAAIAAJ&amp;amp;amp;pg=PT278|accessdate=20fckLRDecember 2012|year=1839|publisher=A. Strauss|pages=1631�}}</ref> <ref name="IselinBuxtorf1742">{{cite book|author1=Jacob ChristoffckLRIselin|author2=Johannes Buxtorf|author3=Jakob ChristophfckLRBeck|title=Neu-vermehrtes historisch- und geographisches allgemeinesfckLRLexicon...|url=http://books.google.com/books?id=sa9DAAAAcAAJ&amp;amp;amp;pg=PA329|accessdate=26fckLRMarch 2013|year=1742|publisher=J. Brandm�ller|pages=329�}}</ref>  
-
=== Canay Islands. ===
+
=== Canay Islands. ===
-
Zambrana House mark. <ref name="Haro1622">{{cite book|author=Alonso L�pez defckLRHaro|title=Nobiliario genealogico de los reyes y titulos de Espa�a:fckLRDirigido a la magestad del rey don Felipe quarto nuestrofckLRse�or|url=http://books.google.com/books?id=Vs0WAAAAQAAJ&amp;pg=PA593|accessdate=27fckLRMarch 2013|year=1622|publisher=por Luis Sanchez|pages=593�}}</ref>  
+
Zambrana House mark. <ref name="Haro1622">{{cite book|author=Alonso L�pez defckLRHaro|title=Nobiliario genealogico de los reyes y titulos de Espa�a:fckLRDirigido a la magestad del rey don Felipe quarto nuestrofckLRse�or|url=http://books.google.com/books?id=Vs0WAAAAQAAJ&amp;amp;amp;pg=PA593|accessdate=27fckLRMarch 2013|year=1622|publisher=por Luis Sanchez|pages=593�}}</ref>  
[[Pedro Zambrano Ortiz|Fray Pedro Zambrano]]  
[[Pedro Zambrano Ortiz|Fray Pedro Zambrano]]  
-
=== Other languages not classified ===
+
<br>
 +
 
 +
=== Brazil ===
 +
 
 +
Zambrano Brazil: Rodrigo Zambrano 1512. <ref>http://www.orkut.com/Main#Community?cmm=104374967</ref>
 +
 
 +
<br>
 +
 
 +
=== Other languages not classified ===
-
Mr. Zambrano 1825. Paris France. <ref name="Journal de Paris">{{cite book|title=Journal defckLRParis|url=http://books.google.com/books?id=ac66zet4H6YC&amp;pg=PA14|accessdate=1fckLRApril 2013|publisher=Journal de Paris|pages=14�}}</ref>  
+
Mr. Zambrano 1825. Paris France. <ref name="Journal de Paris">{{cite book|title=Journal defckLRParis|url=http://books.google.com/books?id=ac66zet4H6YC&amp;amp;amp;pg=PA14|accessdate=1fckLRApril 2013|publisher=Journal de Paris|pages=14�}}</ref>  
<br>
<br>
Line 1,294: Line 1,302:
Austin}}</ref>
Austin}}</ref>
-
Zambrano Brazil: Rodrigo Zambrano 1512.
 
</gallery>
</gallery>

Revision as of 22:30, 27 April 2013

Template:TOC limit Template:Infobox peerage title

Template:Infobox royalty

File:TorreMendoza.JPG
House of Mendoza Castle looks like castle in Zambrana crest.

Contents

Fortun Sanchez Grandee Zambrana.[1]

Fortun Sanchez of Mendoza,Vitoria-Gasteiz, Spain. [2] was the first Grandee Zambrana, [3] receiving his title in Burgos on 1058 and died in 1088. [4] [5] [6] The grandee title was given to him by [[Sancho IV of Navarre]], for his service to Sancho III of Navarre and to Garcia Sanchez III of Navarre, The Zambrana family crest shows two silver stars for this service to the crown. [7] Fortun serve as page and squire until he became lord Zambrana. [8] [8] [7]. [8] [8]

Zambrana, Spain came to be after the [[Solar (Spanish term)|Solares]] or house mark Zambrana became Villa Zambrana[9]

Due to the many

languages spoken in Spain, many spelling variations of the same name are shown in history. Spain, France and England have records of the Zambrano in their historical documents as follows; Zambrana,Zambrano,Cambrano,Sambrano,Sembrano,Zambraos,Zambranok are among the most noted in history.[10][11][12]

Library of congress: Endika de Mogrobejo continued the work and in Endika's volume 13 I found the article on the Zambranos. The citation is: <http://lccn.loc.gov/95184192>.

Family Crest Zambrana

Zambrana, Navarre

This was the first arms awarded to Zambrana. A citizen of Zambrana is refer to as Zambrano. Zambrana being a lord ship Surname, Zambrano a topophonic name.

The Zambrano later receive their arms,Ochoa Zambraos Family being the first. This family serve in Germany, Italy and England. And They were part of the first colonies in America.

Jaen, Baeza, Ubeda, Linares


The Zambrana Family moved Jaen territory. Following Fernand III who recorded his Charter in the arch of Alcanzar. Both Zambrana and Zambrano recorded in this territory. They donated their land to the Catholic Monasteries.

Linares Zambrano Arms shows a Marquez of Zambrana as governor of the land. Apointted by Phillip II of Spain.

This arms can be seen in this old record:

http://diegomallen.blogspot.com/2011/01/usurpacion-de-armas-de-don-pedro-de.html

Murcia


Zambrana Family Govern over the Castle under Henry III of Spain.

Netherlands, flanders

The First Zambrano to receive his arms join Charles V in Flanders Armies. They later travel to England under his son Phillip II.

England


This are the arms of the first Zambrano. The red castile and Gules Reus Shows Service to Flanders and England. The Blue stars may have originated from their union with the Ortiz adn Frias families.

Juan Zambrana Died with no male Peerage.

The Zambranok surname is mention in records but no information is available.

Castilla Leon

Burgos was the place were the first Zambrana recieve his arms. The Zambrana and Zambrano branch out and they share a common origin, they also share the same territory. Looking to see if they are conected to Ochoa Zambrano families.

Andalusia


All Zambrana and Zambrano Families moved to Arcos de la frontera. From here they moved all over America and Phillippines.

Madrid

This Zambrana Family is recorded to have united with Ponce de Leon Family. When they travel to America they change their surname to Zambrano?

Francisca Zambrana became Frnacisca Zambrano, She marry to one of Ponce de Leon Guards who died in Alta Califroania. She LIved in Colima Mexico one of the first colonies in America.

Extramadura

The Zambrana and Zambrano are well recorded in this territory, mainly Fuente del Maestre.

Catambria

Misc


Zambrana or Zambrano.[9] [5] [1] [16]

Castile Silver: A family establish by a Royal gold family of

Castile. Silver Moon, Sole duty to protect the maiden ladies and the orphans.

2 Silver Stars: Represent Service to King [[Garc�a S�nchez III of

Navarre]] and King Sancho III of Navarre

8 Golden saltire Cross: Cross of St. Andrew. Conquest of

Baez or Baeza. And the 8 count marks as a new family from a existing family or Grandee. Gold Sun, Sole duty is to protect the prince to the Death, and guard the poor.

Red field or Gules, Mars, Victory.
Blue Border or Azure, Jupiter, Protector.

[http://www.monumentalnet.org/pais_vasco/alava/anana/salinas_de_anana/palacio_de_los_herran.php?vis=4 Zambrana Crest] in Palacio de Zambrana Herran[5]

[http://books.google.com/books/reader?id=m1UBAAAAQAAJ&printsec=frontcover&output=reader Zambrana crest Heraldic records] Page 40 Illustration. Record 730. page 42.


All the Zambrana(o) are known by this sigil. Those near sea

will add water waves; those that serve the French Kings will have a red castle and flower. Many Families sprouted all over Spain, Italy and America. The most important families are register in the Orders of Spain. The Zambranos that belong to these orders are the most important in history. They are Explorers, rich miners, zealots for the Catholic religion. The Zambrano were Inherited to the Kingdom of Granada after the Reconquista by the king�s of Spain. The Zambrano were inherited for their Castile lineage and service to the crown. The Zambrana(o) have monuments in Spain and America. They govern Castles, monuments, House mark , and regal tombs. According to the digital library of Spain and the genealogy science department there are 5 original families in America.

Service to the Kings of Spain, Germany, Italy and America (Indias).

  • Fortun Sanchez of Mendoza, Page to [[Garcia Sanchez III of

Navarre]] and to Sancho III of Navarre And became Lord Zambrana under Sancho IV of Navarre. [17]

  • Martin Alonzo De Zambrana, Conquest of Baeza in 1227.

[[http://bscw.rediris.es/pub/bscw.cgi/d507866/5%20-%20Lista%20Baeza | Los arcos del alcanzar.]] [[http://bscw.rediris.es/pub/bscw.cgi/507850?client_size=1020x579 | Lista de los 300 Soldados ]] [18] [19]

Govern over the castle Mula, Murcia,Spain.

  • Francisco Zambrana y Montemayor brother to Juan Perez de Zambrana

Regidor de Ubeda. [20] [21]

member of the order of Santiago. [17] [22]

  • Zambrano, Navarro, Alva."El carnicero" libro en aleman. Buscando.

German book in google books.


in England.

  • Jaun Zambrano Grnad child to Antonio Zambrano Serve in Bruges/Brujas.
  • Don Pedro Zambrano y Gordillo receive the title Marquez Zambrano

(Marquis von zambrano) on 1761, Under Spanish Empire. The title migrated to Italy under Ferdinand VII.. [23] [24] [25] [26] [27] [28] [29] [30] [31] [25] [32] [33] [34] [35] [36] [37] [38]

6. D. Miguel de Ibarrola y González, Marqués de Zambrano.[39]

7. Mateo Toro Zambrano, Marquez Zambrano: Zambrano armas from Ucles.[40]

Zambra and Zamorano became Zambrano in America

Zambra[41][42][43]

The Zambra Family belong to the Barnuevo Family year 1435. Calatrava order templar family. Zambra family shows sinople tree, w/ golden fruit in golden field. Sobreabo tree shows Zambrana origin.

Pedro rodrigez de Zambra[44]: Original from Ubeda. His family moved to Portugal and became Zambrano. Arms are Zambrana. Martin Fernandez Zambrano.


Barnuevo shows 4 quarter shield Castile and calatrava.

Zamora Family are related to the Princes of Castile. Year 1067. Identical to Zambrana but with fleur de reus were the saltire cross would be.

Zambrano in Arab records.[12]

Lineage

Template:Ahnentafel top

Template:Ahnentafel-compact5

Template:Ahnentafel bottom


Grandee Vizcaya [45][46] [7]

[[Basque se�or�os]] Lord of Biscay[47]

As per the records of the Roda Codex

Family tree for Jimeno of Pamplona and Banu Qasi[48]

Father:[[Fort�n Garc�s of Pamplona]][49] [50] [51] [52] [53]

Mother: Aurea daugther of [[Lop ibn Musa]].[54]

Children: ��igo Fort�nez Aznar Fort�nez,Blasco (Velasco) Fort�nez,Lope Fort�nez,[[Onneca Fort�nez]]

1) D. Lope Fortunez Jaun Zuria "The white Lord" 1st Grandee of Vizcaya[55][56] [http://fr.wikipedia.org/wiki/Zuriain Zuriain][57]

Da. Dalda daugther of D. Sancho Estiguiz Grandee of [[Durango,

Biscay|Durango]]

2) D. Munio Lopez or Manso Lopez 2nd Grandee of Vizcaya, Grandee Lopez.[58]

Da. Velazquita o Blasquita Daughter of Sancho II of Pamplona[59]

3) Inigo Lopez 3rd El Ezquerra "left hand"Grandee of Vizcaya

4) Lope Diaz 4th Botiller Grandee of Vizcaya

Elvira Bermudez

5)Father: Sancho Lopez 5th Grandee of Vizcaya [60] [9] House Mendoza [9] [61]

Princes Dona Urraca Daughter of Sancho I of Pamplona
Uncle: Inigo Lopez Esquerra as his granfather. Grandee Haro

after conquest of Baeza.

Brother: Lope Sanchez Grandee Laudio/Llodio[60]

Fortun Sanchez Mendoza Squire that became Grandee Zambrana


Surnames from Navarra/Pamplona or Biscaya have Wolf Sable or Sinople Tree.[62]

Fortun Sanchez was given his grandee title after the conquest of Baeza or Paez.[63] Fortun receive the title of lord do to his royal lineage [45] [64] , Lope Fortunez Jaun Zuria �The white lord� the 1st [[Lord of Biscay]] was son to [[Fort�n Garc�s of Pamplona]] recorded in the Roda Codex.[45] The lords of vizcaya joined the Pamplona/Navarra kingdom by the marriage of Velasquita Daughter of Sancho I of Pamplona and the 2nd lord of viscaya Munio Lopez uncle to Fortun Sanchez. Fortun Sanchez is son to Count Sancho Lopez the 5th Lord of Biscay and Dona Urraca Sanchez daughter of Sancho I of Pamplona who became Queen of Leon and mother to Sancho I of Leon. His brother Lope Sanchez serve as Manager to king Sancho III of Navarra and became the 6th Lord of Biscay and was the first to receive a family crest.

Grandee Lope Fortunez has a house mark in Zuriain. And is recorded as the 1s Lord of Viscay. (Jaun, Fuero , Count or Grandee).[65]



Grandee Zambrana [9]

1) Fortun Sanchez De Zambrana.[68] [69][70]

Toda

2) Martin Alonso De Zambrana.

3) Juan De Zambrana.

4) Pedro Sanchez Iniguez De Zambrana. Serve Henry III of Castile Govern over the castle Mula, Murcia,Spain.

5) Nofre De Zambrana.

6) Pedro Zambrana. Squire to Charles V, Holy Roman Emperor, and Member of the order of Santiago.[71]

7) Don Pedro Martin De Zambrana. Grandee Torralba[72]

8) Don Pedro Iniguez De Zambrana. 17th Century.

9) Don Pedro Zambrana Fajardo. His Brother Don Manuel Zambrana Guerrero died with no children, they belong to the [[order of Santiago]].

Francisca Zambrana(o) move to america, lived in colima Mexico, Her

husband worked for Ponce de Leon Family and died in California.

10) Ana Zambrana.

11) Dona Cathalina Maria De Zambrana. Her family belongs to the order of Alcantara.

12) Dona Ginesa Junteros y Zambrana. She Belongs to the Ponce De Leon Family.


Template:Ahnentafel top

Template:Ahnentafel-compact5

Template:Ahnentafel bottom

Template:Ahnentafel top

Template:Ahnentafel-compact5

Template:Ahnentafel bottom

Zambrano DNA by location

Haplogroup E-M215 (Y-DNA)

South migration from Palestine to south Europe and North Africa.

====Em183 Berber, South West Spain.==== Portal:Berbers

  • The berber oroginated from Etiopia. The berber were conquer by the Egyptian and Arab empires. The Berber Jews group settle in Gaul. Berber and visigoths are recorded to mix during this time, one of this family are the Banu Qasi.
  • Kingdom of Granada Vassal for Spanish Catholic Kings.[74]

Haplogroup R-M207

Migrated from Palestine to Asia mostly, Europe and Africa.

R1b Basque

The basque people grew with in the same territory as the british Britania. This can be seen on their flag with is the english jack with different colors.

The basque people have been divided by the Spanish March.

Haplogroup J-M172

Migrated from Palestine to Asia Mostly and Europe.

  • Caucasus: White people of Palestine. This group moved to Europe as the Basque.

Email me to add your dna and location or you can do dna test kit here.

http://www.familytreedna.com/public/ZAMBRANO/default.aspx?section=yresults

Monuments

[http://dspace.unia.es/bitstream/10334/380/1/05JIIITII.pdf EL CONVENTO DE SAN JUAN BAUTISTA DE VILLALBA DEL ALCOR] A tomb shows Ponce De Leon tomb with Zambrano family crest. Alonso Zambrano And Rodrigo Zambrano and his family were companions in his explorations. Historical records show the Zambrano Family marry into the Ponce De Leon Family. Google map the adress, calle de Francisco Alcal� #40, Villalba del Alcor, Seville, Spain.

[http://www.castillosnet.org/programs/castillosnet.php?tip=ficcas&dat=murcia/MU-CAS-018 Castillo de Mula:] Zambrana Family serve as Governor of the castle.Castle is located in the mount North of present mula city , Murcia, Spain.

[http://es.wikipedia.org/wiki/Baeza_(Espa%C3%B1a) Arco de Alcanzar Baeza"Plaza del populo":][5] [75] Arco de Alcanzar de Baeza or Plaza del populo or Arco de los Leones. Has the Zambrano Crest as great Heros. The code of arms in the arc directly infront of the fountain of lions is the Zambrana code of arms.

[https://maps.google.com/maps/ms?msid=200173334021275347501.0004cf0969bdc5096d1c9&msa=0 Puerta de Dona Urraca]Built at the end of the 10th century, later given the name Zambranos. The arc gate was part of the Zambranos Palace. This is a Spanish Monument of great historical importance.

[https://maps.google.com/maps?q=fuente+del+maestre&hl=en&sll=37.328048,-6.498338&sspn=0.094186,0.142479&t=h&hnear=Fuente+del+Maestre,+Province+of+Badajoz,+Extremadura,+Spain&z=10 Fuente del Maestre]. Zambrano Family members lived here as great orders of spain. [76] [10] [77]

All this monuments are available to see in google earth. [https://maps.google.com/maps?saddr=mula+spain&daddr=Puerta+de+Do%C3%B1a+Urraca+%4041.504693,-5.74874+to:fuente+del+populo+baeza+to:calle+de+Francisco+Alcal%C3%A1+40,+Villalba+del+Alcor+to:fuente+del+maestre&hl=en&ie=UTF8&ll=41.153842,-3.691406&spn=4.127309,9.832764&sll=38.702659,-3.47168&sspn=4.277687,9.832764&geocode=Fe9zRAIdB1Lp_ynJJHo2RF5kDTFg6iLXbq8CBA%3BFbVPeQId_Eeo_w%3BFUK2QwIdiAvL_yE750DEMCCeBCmFTtbzl4tuDTE750DEMCCeBA%3BFVihOgIdmzed_ymN62IkFfQRDTFATD7C9OuB_Q%3BFXTmSwIdSJWd_ykNlmksMKoWDTEA95-M_WMEBA&t=h&mra=ls&z=7 Click here] for a map with driving directions to all the monuments.

[http://www.monumentalnet.org/pais_vasco/alava/anana/salinas_de_anana/palacio_de_los_herran.php Palacio Zambrana and Herran], Located in [[A�ana]], Spain

[http://www.panoramio.com/photo/48051008 Palacio Zambrana], Located in [[Linares, Ja�n]], Spain[13][[http://dialnet.unirioja.es/servlet/articulo?codigo=1123399 | Linaje de Zambrana pdf.]][14]


[http://www.banosdelaencina.es/_detalles-galeria-unica.html?uid=113096c9-40da-11e0-8191-79fb06ed8546 Casa de Caridad Zambrano] "Image 11 of 18", [http://www.panoramio.com/photo/6250048 Banos de la encina], Spain.

Kingdom of Granada (Crown of Castile). Zambrano Family. [78]


America (Colonial 1492-1800)

[[Casa de Contrataci�n]] Sevilla. Crews logs data base. [http://pares.mcu.es/MovimientosMigratorios/staticContent.form?viewName=fuentes2 Main Web page Casa de contratacion] [79]

Zambrano en Sevilla. [80]


Juan Zambrano, Guadalajara, Spain, Died in battle under Charles V. 1535. [81]

Rodrigo Zambrano [82]


Manuel Zambrano [83]


Hernando de Soto Alvaro Zambrano part of crew.[84] [22]


St. Augustine, FloridaRodrigo Zambrano y Alonso Zambrano and two sisters 1 Servant.


[http://www.panoramio.com/photo/50578904 Casa Museo Alfonso Zambrano]. Woodcraft master . [http://www.culturapasto.gov.co/index.php?option=com_content&view=article&id=26:museo-alfonso-zambrano&catid=6:museos-pasto&Itemid=4 Gallery].

Clergyman

Fray Juan Zambrano, Chiapas, Mexico. Service to the church in 1537. [85]

Ecuador: MonSenor Alverto Zambrano, Bishop from Loja, Ecuador. [86] [[http://www.diocesisdeloja.org/obispos%20historia.html]]

Mexico colonies.

[87] [88]

Durango Mexico.

Palacio Zambrano Juan Jose Zambrano from the Order of Santiago.[89][90] [91]

Jalisco Mexico

[http://www.panoramio.com/photo/40415978 Hacienda de Zambrano]. Jalisco Mexico. Near Sierra de los lobos. and Leon Guanajuato.

Chile

Government Junta of Chile (1810) President Mateo de Toro Zambrano. Casa solar Casa Colorada [[http://es.wikipedia.org/wiki/Casa_Colorada]]

New Mexico

[[Mission Nuestra Se�ora de los �ngeles de Porci�ncula de los Pecos]] Fray Pedro Zambrano Ortiz.

California.

[[Mission San Fernando Rey de Espa�a]] Manuel Nicolas Zambrano, Order of Santiago.[92] [92]

Spanish Empire Netherland, Italy and (Indias America and philippines).

Don Pedro Zambrano y Gordillo, Marquez Zambrano (Marquis von zambrano)1761. Under Spanish Flanders. The title migrated to Italy under Ferdinand VII.. [23] [24] [25] [26] [27] [28] [29] [30] [31]

Spain

[http://www.acsandino.org.ni/index.php?option=com_content&view=article&id=42&Itemid=115 ORLANDO JOS� ZAMBRANO B�EZ]., Born in 1� de Septiembre de 1894, and Died on 13 de Noviembre de 1959.


Texas.

Juan Manuel Zambrano [93]

[http://books.google.com/books?id=1X4FAAAAQAAJ&pg=PA186&dq=zambrano+laredo+tejas&hl=en&sa=X&ei=Ot-OUKeRJMG82wXGxYGYAQ&ved=0CC8Q6AEwAA#v=onepage&q=zambrano%20laredo%20tejas&f=false Canas de Zambrano in Texas colony 1789] Republic of Texas[94] [95] [96][94][97] [http://www.tamu.edu/faculty/ccbn/dewitt/zambrano.htm Zambrano Spanish Index]


Mexico Monterey.

[98]

Nuevo Leon.

[98] [99] [100] [101] [102]

Nueva granada (South America).

[103] [104] [105] [106] [107]


Italy.

[108] [109] [110] [111]

Uruguay.

Jose Zambrano y Vienna [112] [113]

Philippines.

Andres Zambrano [114] [115]

Spanish Monasteries.

[116]

Argentina.

[117] [118] [119] [120] [121] [122]


Ecuador.

Ramon Zambrano. [123] [124] [125]


Colombia.

Manuel Zambrano y Benavides. [126]

Alvaro Zambrano 1770. [http://www.culturainmaterial.com/montesdemaria/index.php?option=com_content&view=article&id=83&Itemid=85 Puerto Zambrano]. [127] [128] Founded House mark [[Zambrano, Bol�var|zambrano]] in 1770, became Villa San Sebastian de las playas blancas. Colombia.

[http://www.panoramio.com/photo/50578904 Casa Museo Alfonso Zambrano]. Woodcraft master . [http://www.culturapasto.gov.co/index.php?option=com_content&view=article&id=26:museo-alfonso-zambrano&catid=6:museos-pasto&Itemid=4 Gallery].


Spanish Netherlands.

[129] [30] [31] [32] [130]

Canay Islands.

Zambrana House mark. [131]

Fray Pedro Zambrano


Brazil

Zambrano Brazil: Rodrigo Zambrano 1512. [132]


Other languages not classified

Mr. Zambrano 1825. Paris France. [133]


WWI and WWII

Juan Zambrano: [http://www.forces-war-records.co.uk/Search?vbm=home_guard_mailer_wednesday&id=464408&cid=3250856 Dads Army England]

Present times 1900-present

Lorenzo Zambrano. Alemania [135]

Tom Zambrano. [136]

Lorenzo Zambrano. Mexico [137]

Fabio Zambrano. Colombia. [138]

Myrna Zambrano. [139]

Google map locations for Zambrana and Zambrano, City or St.

USA Streets

Zambrano ST.

https://maps.google.com/maps/place?q=Zambrano+Street,+Commerce,+CA,+USA&hl=en&ftid=0x80c2ce60b75eb617:0x46475d1d204d972d

https://maps.google.com/maps/place?q=Zambrano+Road,+San+Antonio,+TX,+USA&hl=en&ftid=0x865cf50c0510d017:0xd21a21a410c1e5f4

https://maps.google.com/maps/place?q=Zambrano+Drive,+Woodland+Park,+NJ,+USA&hl=en&ftid=0x89c2fe167237aff1:0xd865ddb3ccb4611d

https://maps.google.com/maps/place?q=Zambrano,+USA&hl=en&ftid=0x865fcba98a8854f7:0xe63b8e1613151fb

https://maps.google.com/maps/place?q=Zambrano+Road,+San+Antonio,+TX,+USA&hl=en&ftid=0x865cf50c0510d017:0xd21a21a410c1e5f4

Zambrana ST.

https://maps.google.com/maps/place?q=Zambrana+Street+Southeast,+Palm+Bay,+Florida&hl=en&ftid=0x88de72a4cc6a2b73:0x686c58f33c3df90e

https://maps.google.com/maps/place?q=Zambrana+Avenue,+North+Port,+Florida&hl=en&ftid=0x88dcace724e5a453:0x27cc5eb93a179c10

https://maps.google.com/maps/place?q=Zambrana+Street,+Sebring,+Florida&hl=en&ftid=0x88dcf8ec46e6eb49:0x3665ec084c426969

https://maps.google.com/maps/place?q=Zambrana+Street,+Coral+Gables,+Florida&hl=en&ftid=0x88d9c89ef41e1705:0x8212675a03f82686

Puerto Rico

Zambrana St. https://maps.google.com/maps/place?q=Cll+Zambrana+East,+Coamo,+Puerto+Rico&hl=en&ftid=0x8c03330cb01e4457:0x45bd91acfa4dc99c

Spain Street

https://maps.google.com/maps/place?q=Calle+Zambrana,+Linares,+Spain&hl=en&ftid=0xd6e84ccc3a243fb:0x82eafa56194e14d4

https://maps.google.com/maps/place?q=Calle+de+Zambrana,+Zambrana,+Spain&hl=en&ftid=0xd4f920a9bceb8ed:0x1a0a255deb4bd468

Cuba, Zambrana st.

https://maps.google.com/maps/place?q=Zambrana,+Havana,+El+Cerro,+Havana,+Cuba&hl=en&ftid=0x88cd7a0bd1da1be5:0xd5fc39f4db6c8918

Panama, Zambrano city

https://maps.google.com/maps/place?q=Zambrano,+Piedra+Candela,+Renacimiento+District,+Chiriqui,+Panama&hl=en&ftid=0x8fa5ceb38f70c571:0xac2a31f80f8ae2f5

Chile, Zambrano City

https://maps.google.com/maps/place?q=zambrano,+chile&hl=en&ftid=0x9663070139f06cf3:0x97f1f57d151e11f4

Mexico, Zambrano city.

https://maps.google.com/maps/place?q=zambrano,+mexico&hl=en&ftid=0x842c41dd55bf3745:0x23ca16dc6886bc31

Colombia, Zambrano city

https://maps.google.com/maps/place?q=zambrano,+colombia&hl=en&ftid=0x8e5f30363720210d:0x62b62cfed56f08db

Ecuador, Zambrano street

https://maps.google.com/maps/place?q=zambrano,+ecuador&hl=en&ftid=0x8e2a3ccd34534d85:0x52b4dd26b2398566

http://maps.google.com/maps/place?q=Zambrano,+Quito,+Pichincha,+Ecuador&hl=en&ftid=0x91d59ab9f6656147:0xa6142529368d8b9d

Nicaragua, Zambrano City

https://maps.google.com/maps/place?q=zambrano,+nicaragua&hl=en&ftid=0x8f73f718e2aaec19:0x3e93b2a57d0294d7

Nicaragua, Zambrana City

https://maps.google.com/maps/place?q=zambrana,+nicaragua&hl=en&ftid=0x8f73f0b6d9d134b3:0x12dafd64ef6ae977

Argentina, Zambrano st.

https://maps.google.com/maps/place?q=zambrano,+argentina&hl=en&ftid=0x941bc36db35534f1:0x5fdd8dd1a8325faa

Ecuador, Zambrano St.

https://maps.google.com/maps/place?q=Zambrano,+Quito,+Pichincha,+Ecuador&hl=en&ftid=0x91d59ab9f6656147:0xa6142529368d8b9d

Philippines

Zambrano BLDG https://maps.google.com/maps/place?q=Zambrano+Bldg,+San+Fernando+City,+La+Union,+Region+I,+Philippines&hl=en&ftid=0x33918e41a2c2090d:0x97e3d3ec0260a805

Resources

[http://www.bne.es/es/Micrositios/Guias/Genealogia/MapaWeb.html Geneology Hispanic]:Good source for Hispanic Names of Regal importance.

[http://www.jstor.org/discover/10.2307/40340398?uid=3739256&sid=56203014793 Historia Social:]Libro de historia zambrana. 2781 CHACON JIMENEZ, FRANCISCO HACIA UNA NUEVA DEFINICION DE LA ESTRUCTURA SOCIAL EN LA ESPA�A DEL ANTIGUO REGIMEN A TRAVES DE LA FAMILIA Y LAS RELACIONES DE PARENTESCO HISTORIA SOCIAL , 1995, (21): PP. 75-104.

[http://library.anaheim.net/Library/ Anaheim Public Library:]If you�re a Zambrano please donate to this library for providing information for the research.

[http://www.bne.es/es/Inicio/index.html Spain digital public library]:I provide links to the pdf. Use Ctrl+F to look for Zambrano reference

[http://bdh.bne.es/bnesearch/hemeroteca/Estado%20militar%20de%20Espa%C3%B1a%20(Ed.%20en%2016%C2%BA);jsessionid=84C84AE19AE15606E8B797D3C03ECC44 Estado Militar de Espana:] Zambrano Records and Orders of Spain they belong to.

[http://www.loc.gov/rr/hispanic/geneal/index_gc.html Link] to [[The Library of Congress]]

[http://en.geneanet.org/ Geneanet:] I surname database with heraldic data. And world wide surname population and density.

http://www.mcu.es/archivos/Novedades/novedades_Pasajeros.html

http://pares.mcu.es/MovimientosMigratorios/staticContent.form?viewName=fuentes2

http://www.bisabuelos.com/links.html

Heraldry websites

http://www.ngw.nl/heraldrywiki/index.php?title=Main_Page

http://www.contironco.it/index.htm

http://www.cnicg.net/legnob.asp

Consulta Araldica

Santiago Surname History

Template:Infobox peerage title

Template:Infobox royalty

The Santiago Familiy name or surname originates from the house of Quevedo in Pie de concha.[140] And Quevedo is from house Mantilla.[141][142][143]

Quevedo arms show arms from http://en.wikipedia.org/wiki/%C3%8Ele-de-France_(region)And the mantle of San Martin. Searching San Martin de quevedo. And Saint families origin.

848. Santiago. DeQuevedo house, located in the town of Pie de Concha proceeded to Santiago, whose illustrious sons are distinguished as follows: Don Pasquale and Don Domingo de Santiago, mayor of the city of Baeza in the reign of Don Alonso the Wise: the lawyer Toribio Gomez de Santiago, St. Bartholomew's College of Salamanca, the board of the Catholic Monarchs, his daughter Queen Juana and his son and successor Emperor Charles V: Don Fray Pedro de Santiago, religion overall barefoot St. Augustine, Bishop of Solsona and Lerida and Maestro Fray Juan de Santiago, known for his eloquent preaching and attractive Gold Pico Weapons of this illustrious lineageare: Silver shield and a red and white flag, held by two hands cut and bleeding 2.


� 0.6. Rodrigo Mantilla, Senior Cafa Mantilla, married Dona Maria of 7> tego Fernandez de Queuedo, died QUC 159z.procedienr.edel year folar fu dizevn name} and Mendoza, Nobiliario> * the CFAA, and folar of AI is Qucuedo Mountain, ay good kijfofdalgo delta, but not in fe�orio podero�os funds for weapons bring vn} e�cudo party eventually vneftandarte and cut it, that is l�tela half white, half colored c, and the middle cica-do is blue, right hand with three gold lilies, and the other half white cot� ?. vn black cauldron. And Caftillo: The lineage of Qucuedo is well-known in hijfofdalgo. eftos kingdoms, enjoyCafa (olariega in Pie de Concha, where 74 people have �alido � cn fr.Geronmo ejios many hijo�dalgo defta Cafa, the av in Guadalaxua, and elsewhere "')' C * itroCafltllobifit in Madrid afsifteD.FrancifcodcQueuedodclAbitodeSantiago ( juftamcrmi of RefesGodoSffol aqueltan held by IU great wit, eftudios, yefcritos, �e�or of � laTotrede uasrAbad) po� "4?2 / that here are two defta CAFAS vna familia.la faith draws deQucucdo Cafa of Santiago, and one that EFTA otr in Pie Shell enjoy ^ known both nobility and great antiquity. 'and D.AiUfi> efta.Ca�a Nu�iz of Santiago de Qucuedo defeender which will boast a and Martos, D. quefon Gua bifi.de Caftro Franci�co SantiagoGuzman, Luan father Alonfode Santiago Guzman, tenors dalsxara.ls \. I $ 5. ????4? ja ma? orazgo what DNDC Santiago, D-Iuandc mugerde Ortega and Aguilera, Queue per-Arms' fona of well known and remarkable quality. The hiftoria deGaadalaxara: The fon of do-Gone has one leros hijo�dalgo Caua Vizcaya, fu name is Pie de Concha de la Villa cieron ici na linage is Queuedo, ylaCa�adeQueuedoes in the Valley of the Vi cn Gu�aziua Pie de Concha call. Oh another Cafa Afturias Shell in Santillana-.rraen by ai * maslosQueuedos, quees�u own apellidu, vn e�cudo split into three loaves, cuclpti-ma mere right qo gold tresliles blue field inthe cauldron feguodQvnnegrojQQ silver champion, and the trio vn pcndon.la half red half field blanco.y by Rodrigo Msnrilla pfata.El and children D.MariadeQucuedo tuuuron fumuger Lop ^ M? Aniu, Dicgo Mantilia, D.Maria, D.Iacs) D.AoayD.VriuiafD.AldoDca and D.l�abei, what ma��doazelia, other were ca | adas, DM aria> qucera most, dexo two sons, Will * UI hij�jla husband D.Iscs tuuo Lu�n Mantilla de Soto the three men, and vna facm-, bi j 4,4.1 the adult of twelve years pafs� to Indies and China DEIDE Lima was Cutad � ^ fummvolugar.D.Ana another, and also children DELA D.Vt�uladexaron D. Aldon�� that. a. on FCIS sons, daughters} 1 and de�tos ptimos, and uncles, coc those of other lincas, fc car could ?? ooc�nros fighting men to VNtime. [144]

Santiago family crest

Red and white banner, bleeding praying hands, on silver field.

De Santiago Linage

Alonso Fernadez de Santiago Son to Sancho Fernandez de Santiago. and his wife Maria Sanz Mantilla.[78] Founded House Santiago.

References

Template:Reflist

  1. 1.0 1.1
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
  2. http://www.cuadrilladeanana.es/zambrana/zambrana.php
  3. 5.0 5.1 5.2 5.3
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
  4. 7.0 7.1 7.2
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
  5. 8.0 8.1 8.2 8.3 {{cite book|title=Diario curioso, erudito, economico y comercial|url=http://books.google.com/books?id=MZUTM-Uh1qUC&pg=PA245|accessdate=19 November 2012|year=1787|publisher=Imp. de Manuel Gonzalez|pages=245�}}
  6. 9.0 9.1 9.2 9.3 9.4
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
  7. 10.0 10.1 10.2
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
  8. 12.0 12.1
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
  9. 13.0 13.1 Template:Citebook
  10. 14.0 14.1 Template:Citebook
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
  11. 17.0 17.1
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
  12. 22.0 22.1
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
  13. 23.0 23.1
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
  14. 24.0 24.1
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
  15. 25.0 25.1 25.2 {{cite book|title=Oesterreichischer Beobachter|url=http://books.google.com/books?id=ULNIAAAAcAAJ&pg=PA230|accessdate=18 March 2013|year=1847|publisher=Strau�|pages=230�}}
  16. 26.0 26.1
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
  17. 27.0 27.1
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
  18. 28.0 28.1
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
  19. 29.0 29.1
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
  20. 30.0 30.1 30.2
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
  21. 31.0 31.1 31.2
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
  22. 32.0 32.1 {{cite book|title=�sterreichischer Beobachter|url=http://books.google.com/books?id=wAM8AQAAIAAJ&pg=PA701|accessdate=23 March 2013|year=1833|publisher=A. Strauss|pages=701�}}
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
  23. {{cite book|title=Neckar-Zeitung|url=http://books.google.com/books?id=ZPFDAAAAcAAJ&pg=RA2-PA787|accessdate=27 March 2013|year=1826|pages=787�}}
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
  24. http://losejercitosdelrey.es/fernando7/1830_marques_de_zambrano/1830_marques_de_zambrano.html | Spanish, la biblioteca del Palacio Real, (sala VIII), bajo el título de “Colección de uniformes del Egército Español"
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
  25. http://books.google.com/books?id=D8sqAAAAMAAJ&pg=PR187&dq=Pedro+rodrigez+de+Zambra&hl=en&sa=X&ei=bkh8UcDzGKHliAKn64HYBg&ved=0CDEQ6AEwAA
  26. 45.0 45.1 45.2 {{cite book|author=Francisco Rodriguez Garcia|title=Cronica Del Se�orio de Vizcaya|url=http://books.google.com/books?id=HDOU-YWlmIoC&pg=PA46|accessdate=20 November 2012|date=22 November 2002|publisher=Editorial MAXTOR|isbn=978-84-9761-029-2|pages=46�}}
  27. http://books.google.com/books?id=qFhpohL-NckC&pg=PA596&dq=toda+ortiz+fortun&hl=en&sa=X&ei=vXvjT5LTCIiA2gWCy6nJCw&ved=0CD4Q6AEwAg#v=onepage&q=for-tun%20sanchez%20mendoza&f=false
  28. http://personal.telefonica.terra.es/web/vizcayamedieval/armas.htm
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
  29. http://www.euskomedia.org/aunamendi/52069
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
  30. http://es.wikipedia.org/wiki/Fort%C3%BAn_Garc%C3%A9s
  31. http://books.google.com/books?id=MlA8AQAAIAAJ&pg=PA319&lpg=PA319&dq=lope+ortiz+y+maria+de+escocia&source=bl&ots=eR0PMx87_i&sig=myVWdSfmetOYRTtEIADGrY2k2hg&hl=en&sa=X&ei=bYBzUMClIMO3igKSioHoCA&ved=0CDAQ6AEwAA
  32. http://www.navarchivo.com/index.php/es/localidades/sanguesa/zuriain-esteribar?print=1
  33. http://books.google.com/books?id=Dr8QAQAAMAAJ&q=zuriain&dq=zuriain&hl=en&sa=X&ei=i8iRULbXI6Wh2QWA0YCYDQ&ved=0CD4Q6AEwBg
  34. {{cite book|author=Pedro Morote P�rez|title=Antiguedad, y blasones de la ciudad de Lorca, y Historia de Santa Maria la Real de las Huertas...|url=http://books.google.com/books?id=0CW9Y1btLoMC&pg=PA214|accessdate=20 November 2012|year=1741|publisher=por Francisco Joseph Lopez Mesnier, en la calle de Zambrana|pages=214�}}
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
  35. 60.0 60.1
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
  36. http://books.google.com/books?id=XYh-6AZyE0YC&pg=PA503&dq=fortun+sanchez+baeza&hl=en&sa=X&ei=CueKUPCwNqWc2AXFi4HwCQ&ved=0CDIQ6AEwAQ#v=onepage&q=fortun%20sanchez%20baeza&f=false
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
  37. {{cite book|title=Enciclopedia general ilustrada del Pa�s Vasco: Diccionario enciclop�dico vasco.
  38. http://www.alltravels.com/spain/navarre/urdanoz/photos/current-photo-76264664
  39. {{cite book|author=Juan Antonio de Zam�cola|title=Historia de las naciones bascas de una y otra parte del Pirineo septentrional y costas del mar Cant�brico|url=http://books.google.com/books?id=_HwTAAAAQAAJ&pg=PA60|accessdate=21 November 2012|year=1818|pages=60�}}
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
  40. {{cite book|author=Centro de Estudios Hist�ricos Internacionales (Barcelona, Spain)|title=Indice hist�rico espa�ol: bibliograf�a hist�rica de Espa�a e Hispanoam�rica|url=http://books.google.com/books?id=v8Tam6akCesC&pg=PA98|accessdate=21 November 2012|year=1953|publisher=Edicions Universitat Barcelona|pages=98�|id=GGKEY:N705USK76BP}}
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
  41. Template:Citebook
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
  42. http://books.google.com/books?id=kThAAAAAYAAJ&printsec=frontcover&dq=baeza&source=bl&ots=rmaq3cwDPl&sig=yjjzuynjscVOx1ZYTizMMH_rKls&hl=en&sa=X&ei=lh93UJawOKqViQLu9oHYDg&ved=0CEYQ6AEwBA#v=onepage&q=zambrana&f=false
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
  43. 78.0 78.1
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
  44. Template:CitefckLRbook
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
  45. http://cdnc.ucr.edu/cdnc/cgi-bin/cdnc?a=d&amp;amp;cl=search&amp;amp;d=SFC18980123.2.95&amp;amp;srpos=1&amp;amp;e=-------en--20--1--txt-IN-juan+jose+zambrano----
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
  46. 92.0 92.1
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
  47. 94.0 94.1
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
  48. 98.0 98.1
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = 'http://books.google.com/books?id=' + urllib.quote_plus(book_id) if page_string: new_url += '&pg=' + urllib.quote_plus(page_string) client = gdata.books.service.BookService() gdata.alt.appengine.run_on_appengine(client) thisbook = client.get_by_google_id(book_id) # '8cp-Z_G42g4C' thisdict = thisbook.to_dict() #thisdict = {'embeddability': 'embeddable', 'info': 'http://books.google.com/books?id=9PE2T2a5fDYC&ie=ISO-8859-1&source=gbs_gdata', 'description': 'Ramon Sarr\xc3\xb3 explores an iconoclastic religious movement initiated by a Muslim preacher during the French colonial period. Employing an ethnographic approach that respects the testimony of those who suffered violence as opposed to those who wanted to "get rid of custom," this work discusses the extent to which iconoclasm produces a rupture of religious knowledge and identity and analyzes its relevance in the making of modern nations and citizens. The Politics of Religious Change on the Upper Guinea Coastexamines the historical complexity of the interface between Islam, traditional religions, and Christianity in West Africa, and how this interface connects to dramatic political change. The book unveils a rare history and brokers a dialogue between a long tradition of anthropology and contemporary anthropological debates. A wide range of readers, particularly those with an interest in the anthropology of religion, iconoclasm, the history and anthropology of West Africa, or the politics of heritage, will gravitate toward this work.', 'format': 'book', 'publishers': ['Edinburgh University Press'], 'identifiers': [('google_id', '9PE2T2a5fDYC'), ('ISBN', '0748635157'), ('ISBN', '9780748635153')], 'thumbnail': 'http://bks9.books.google.com/books?id=9PE2T2a5fDYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U0LyllDnVUHiadMIrdIuvVAiURtuQ&source=gbs_gdata', 'subjects': ['Iconoclasm', 'Guinea', 'Iconoclasm/ Guinea', 'Religion and politics', 'History / Europe / General', 'Social Science / Human Geography', 'Social Science / Ethnic Studies / General', 'Social Science / Customs & Traditions', 'Religion / Ethnic & Tribal', 'Religion / General', 'History / Africa / General', 'Religion / Comparative Religion', 'History / General', 'History / Africa / General', 'Religion / Ethnic & Tribal', 'Religion / Islam / General', 'Religion / Religion, Politics & State', 'Social Science / Human Geography', 'Social Science / Islamic Studies', 'Travel / Africa / General'], 'authors': ['Ramon Sarr\xc3\xb3', 'John Smith', 'Jane Smith', 'Olaus Petrus', 'Mick Paff'], 'date': '2009-05-03', 'title': 'The Politics of Religious Change on the Upper Guinea Coast: Iconoclasm Done and Undone', 'viewability': 'view_partial', 'annotation': 'http://www.google.com/books/feeds/users/me/volumes'} #print 'Got dict: ' + str(thisdict)+ '
            ' #print thisdict['title'], "
            " title = thisdict['title'] if thisdict.has_key('title') else
            date = thisdict['date'] if thisdict.has_key('date') else publisher = (', '.join(thisdict['publishers'])) if thisdict.has_key('publishers') else authors = thisdict['authors'] if thisdict.has_key('authors') else coauthors = ', '.join(authors[3:]) isbn = issn = iccn = oclc = other_id_list = [] otherfields = [] if thisdict.has_key('identifiers'): for idpair in thisdict['identifiers']: if idpair[0].lower() == 'google_id': pass elif idpair[0].lower() == 'isbn': if len(idpair[1]) >= len(isbn): isbn = idpair[1] # Only keep the longest ISBN elif idpair[0].lower() == 'issn': issn = idpair[1] other_id_list.append('Template:ISSN') elif idpair[0].lower() == 'lccn': lccn = idpair[1] other_id_list.append('Template:LCCN') elif idpair[0].lower() == 'oclc': oclc = idpair[1] otherfields.append('oclc=' + oclc) elif idpair[0].lower() == 'doi': otherfields.append('doi=' + idpair[1]) else: other_id_list.append(idpair[0] + ':' + idpair[1]) other_id = ', '.join(other_id_list) if len(other_id): otherfields.append('id=' + other_id) bookdata = {'title': title, 'isbn': isbn, 'publisher': publisher, 'pages': page, 'url': new_url, 'authors': authors, 'date': date} jsonstr = json.dumps(bookdata, sort_keys=True, indent=4, ensure_ascii=False) jsonp = callback + '(' + jsonstr + ');' print 'Content-Type: text/javascript' print print jsonp memcache.add(memcache_key, jsonp, 3600)if __name__ == "__main__": main()
          1. __author__ = 'Apoc2400'import wsgiref.handlersimport atom.urlimport gdata.serviceimport gdata.alt.appengineimport gdata.booksimport gdata.books.servicefrom google.appengine.api import memcacheimport sysimport osimport cgiimport cgitb; cgitb.enable()import reimport urllibfrom django.utils import simplejson as jsondef error(message): print 'Content-Type: text/plain' print print 'Error: ', messagedef main(): book_url = form = cgi.FieldStorage() if (not form.has_key("book_url")): error('No URL.') return book_url = form["book_url"].value if (not form.has_key("callback")): error('No callback.') return callback = form["callback"].value memcache_key = '5:' + os.environ['CURRENT_VERSION_ID'] + '/' + callback + ':' + book_url memcache_jsonp = memcache.get(memcache_key) if memcache_jsonp is not None: #print >> sys.stderr, "From memcache: " + memcache_key print 'Content-Type: text/javascript' print print memcache_jsonp return else: #print >> sys.stderr, "From fetch: " + memcache_key pass dateformat = if (form.has_key("dateformat")): dateformat = form["dateformat"].value checked_dmy = checked_mdy = checked_ymd = if dateformat == 'dmy': checked_dmy = ' checked="1"' elif dateformat == 'mdy': checked_mdy = ' checked="1"' elif dateformat == 'ymd': checked_ymd = ' checked="1"' else: checked_dmy = ' checked="1"' dateformat = 'dmy' if not re.search('books.google.', book_url, re.I) and not re.search('\?id=', book_url, re.I): error('Not a Google Books URL.') return urlsep = re.search('\?([^#]*)', book_url) if not urlsep: error('Bad URL.') return book_url_qs = urlsep.group(1) book_url_qs_fields = cgi.parse_qs(book_url_qs) if not book_url_qs_fields.has_key("id"): error('Bad URL. It has to be for a specific book, not a search result page') return book_id = book_url_qs_fields["id"][0] page = page_string = if book_url_qs_fields.has_key('pg'): page_string = book_url_qs_fields['pg'][0] match = re.search('\D*(\d+)', page_string) if match: page = match.group(1) + u"\u2013".encode("utf-8") new_url = '