# HG changeset patch # User dwinter # Date 1352708968 -3600 # Node ID a2bcca6539fd0d68deff41b11ef0e708cd64158e # Parent a1577a498c8543a449f32cd2ad2a5ed4e20a3e13 static pages diff -r a1577a498c85 -r a2bcca6539fd managePurls/manageIndexMetaPURLs.py --- a/managePurls/manageIndexMetaPURLs.py Tue Nov 06 08:50:24 2012 +0100 +++ b/managePurls/manageIndexMetaPURLs.py Mon Nov 12 09:29:28 2012 +0100 @@ -38,7 +38,7 @@ def __init__(self): - self.purlDB = web.database(dbn="postgres", db="purlDB",user="purlUSER",password="p*lWa55eR", host="localhost") + self.purlDB = web.database(dbn="postgres", db="purlDB",user="purlUSER",password="p*lWa55eR", host="tuxserve03") diff -r a1577a498c85 -r a2bcca6539fd purlservice.wsgi diff -r a1577a498c85 -r a2bcca6539fd restService/redirector.py --- a/restService/redirector.py Tue Nov 06 08:50:24 2012 +0100 +++ b/restService/redirector.py Mon Nov 12 09:29:28 2012 +0100 @@ -15,8 +15,8 @@ purlHandler=None def __init__(self): #read config file for the viewers - confFile= file("/usr/local/metadataServices/purlService/restService/viewer.config") - + #confFile= file("/usr/local/metadataServices/purlService/restService/viewer.config") + confFile= file("/Users/dwinter/Documents/Projekte/MetaDataManagement/purlService/restService/viewer.config") self.purlHandler = manageIndexMetaPURLs.IndexMetaPURLManager() for line in confFile.readlines(): @@ -53,10 +53,8 @@ formats = self.viewers[flavour] - viewerWithIndexMetaFormatString = formats[0].rstrip().lstrip().replace("\n",'') viewerWithImagePathFormatString = formats[1].lstrip().lstrip().replace("\n",'') - # checke ob es einen Image path gibt diff -r a1577a498c85 -r a2bcca6539fd restService/restService.py --- a/restService/restService.py Tue Nov 06 08:50:24 2012 +0100 +++ b/restService/restService.py Mon Nov 12 09:29:28 2012 +0100 @@ -5,7 +5,7 @@ ''' import web import managePurls.manageIndexMetaPURLs as manageIndexMetaPURLs -from redirector import redirector +from redirector import redirector import logging from searcher import searcher @@ -14,6 +14,7 @@ '/docuview/(.+)','redirector', '/search','searcher', '/indexMeta/(.+)','indexMeta', + '/','serviceDescription' ) app = web.application(urls, globals()) @@ -21,6 +22,16 @@ TEXTER_URL="http://digilib.mpiwg-berlin.mpg.de/digitallibrary/servlet/Texter?fn=%s" + + +class serviceDescription: + + def __init__(self): + self.render = web.template.render('templates/') + def GET(self): + + return self.render.serviceDescription() + class indexMeta: def __init__(self): @@ -42,10 +53,7 @@ raise web.redirect(TEXTER_URL%path) - - - def __init__(self): - self.md=manageIndexMetaPURLs.IndexMetaPURLManager() + class purl: @@ -70,9 +78,7 @@ return path - def __init__(self): - self.md=manageIndexMetaPURLs.IndexMetaPURLManager() - + if __name__ == "__main__": app.run() diff -r a1577a498c85 -r a2bcca6539fd restService/templates/serviceDescription.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/restService/templates/serviceDescription.html Mon Nov 12 09:29:28 2012 +0100 @@ -0,0 +1,38 @@ +

PURL service

+ +

/purl/PURL

+

Takes a PURL als Parameter and returns the real path as TXT. + +

/search

+

needs a parameter ?q=PATH

+ +

Searched the PURL or all PURLs, wich belong to the PATH the internal search format is "LIKE"

+ +

/docuview/PURL

+ +

Is explained +at https://it-dev.mpiwg-berlin.mpg.de/tracs/metadataprovider/wiki/purls. +

+ +

Config

+The viewer configuration in stored in viewer.config. + +

e.g.

+
+echo,http://echo.mpiwg-berlin.mpg.de/ECHOdocuViewfull?url=%s,http://echo.mpiwg-berlin.mpg.de/ECHOdocuViewfull?mode=imagepath&url=%s&viewMode=images
+libcoll,http://libcoll.mpiwg-berlin.mpg.de/libviewa?url=%s,http://libcoll.mpiwg-berlin.mpg.de/libviewa?url=%s&viewMode=images
+digilib,,http://digilib.mpiwg-berlin.mpg.de/digitallibrary/jquery/digilib.html?fn=%s
+
+ +

The format is: + +

+FLAVOUR,FULTEXTVIEWER,IMAGEVIEWER
+
+ +

+ +

/indexMeta/PURL

+

+Redirects to the index.meta file of the source, if existing. +

\ No newline at end of file