This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#from lxml import etree | |
from flask import Flask, request, Response, render_template, abort | |
from oaipmh import server, metadata | |
from oai_auth import auth_info, ip_check_init, ip_to_inst, set_auth, get_ip | |
import logging | |
import ss_server | |
def getServer(): | |
myserver = ss_server.BatchingSharedShelfServerBase() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from oaipmh import common, error | |
from oaipmh.datestamp import datestamp_to_datetime | |
from datetime import datetime | |
from flask import abort | |
from dateutil import parser | |
import requests | |
import json | |
import pytz | |
import logging | |
import memcache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In [2]: from imata.libs.elastic_search import SearchEngine | |
In [3]: SearchEngine.reindex() | |
2011-08-03 10:22:24,744 INFO [urllib3.connectionpool][MainThread] Starting new HTTP connection (1): localhost | |
Rebuilding ES index, please wait. | |
/Users/jon/Env/lib/python2.7/site-packages/sqlalchemy/engine/default.py:518: SAWarning: Unicode type received non-unicode bind param value. | |
param[key.encode(encoding)] = processors[key](compiled_params[key]) | |
Indexing 6, 8 assets. | |
Indexing 7, 9 assets. | |
ERROR: An unexpected error occurred while tokenizing input |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
---------------------------------------- | |
Exception happened during processing of request from ('127.0.0.1', 58146) | |
---------------------------------------- | |
2011-04-12 11:09:57,048 INFO [imata.views.asset][worker 0] ([[u'SSID', u'Filename', u'Artstor Classification[1816]', u'Work Type[1821]', u'Creator[1822]', u'Culture[1814]', u'Title[1815]', u'Title 2[1823]', u'Title 3[1824]', u'Title 4[1825]', u'Style/Period[1826]', u'Date[1827]', u'Date extent[1832]', u'Date type[1829]', u'Earliest Date[1819]', u'Latest Date[1820]', u'Materials[1830]', u'Techniques[1831]', u'Measurements[1828]', u'Location[1817]', u'Location type[1846]', u'Subject[1842]', u'Relationships[1844]', u'Image View Type[1840]', u'Image View Description[1835]', u'Image agent[1833]', u'Image Date[1845]', u'Image subject[1836]', u'Order number[1837]', u'ID Number[1834]', u'Old ID number[1839]', u'Legacy data notes[1841]', u'Requestor id[1838]', u'Source[1843]', u'Rights[1818]', u'Subject 2[1847]', u'PlayDate[2087]'], ['38023', u'foo.jpg', '', '', u |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def is_valid(self, value): | |
# try: | |
if parser.parse(value).year < 1900: | |
fail("Year is below min value of 1900 for field '%s'" % self.label) | |
return True | |
# except: | |
# fail("Invalid date for field '%s'" % self.label) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ErrorListView = new Ext.list.ListView({ | |
store: ExcelErrorStore, | |
autoScroll: true, | |
columns: [{ | |
header: 'SSID', | |
width: .2, | |
dataIndex: 'ssid' | |
},{ | |
header: 'Error Type', | |
width: .3, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ExcelErrorDialog = Ext.extend(Ext.Window, { | |
constructor: function(config) { | |
this.importerrorForm = new Ext.FormPanel({ | |
frame: true, | |
bodyStyle: 'padding: 10px 10px 0 10px;', | |
labelWidth: 50, | |
defaults: { anchor: '95%', allowBlank: false, msgTarget: 'side'}, | |
// items: [{ | |
// xtype: 'displayfield', | |
// itemID: 'numerrors', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ExcelSuccessDialog = Ext.extend(Ext.Window, { | |
constructor: function(config) { | |
this.importsuccessForm = new Ext.FormPanel({ | |
frame: true, | |
bodyStyle: 'padding: 10px 10px 0 10px;', | |
labelWidth: 50, | |
defaults: { anchor: '95%', allowBlank: false, msgTarget: 'side'}, | |
items: [{ | |
xtype: 'displayfield', | |
itemID: 'numnew', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function uploadSuccess(file, data, resp) { | |
Imata.log("Upload done: "+ file); | |
Imata.log("data: "+ data); | |
Imata.log("response: "+ resp); | |
var record = assetTempStore.getById(file.id); | |
Imata.log("test: " + record.get('status')); | |
Imata.log("file: " + file.id) | |
record.set('status', 'Failed'); | |
record.commit(); |
NewerOlder