Commit 732bf34b authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Protect conference_dates during harvesting.

parent 850080bd
......@@ -458,6 +458,7 @@
'Reject': 'Rejeter',
'Reject article is not published': "Rejeté l'article n'est pas publié",
'Reject collaboration is not well formed': 'Rejeté la collaboration est mal formatté',
'Reject conference dates is not well formed': 'Rejecté les dates de la conférence dates sont mal formatté',
'Reject editor is not well formed': "Rejeté l'éditeur est mal formatté",
'Reject incomplete paper reference': 'Rejeté la référence du papier est incomplète',
'Reject invalid country': 'Rejeté pays inconnu',
......
......@@ -75,6 +75,7 @@ MSG_TO_MANY_DATE = current.T("Reject to many submit date", lazy=False)
MSG_TO_MANY_FAUTHOR = current.T("Reject to many first author", lazy=False)
MSG_TO_MANY_YEAR = current.T("Reject to many year", lazy=False)
MSG_WELL_FORMED_COLLABORATION = current.T("Reject collaboration is not well formed", lazy=False)
MSG_WELL_FORMED_CONF_DATES = current.T("Reject conference dates is not well formed", lazy=False)
MSG_WELL_FORMED_DATE = current.T("Reject submission date is not well formed", lazy=False)
MSG_WELL_FORMED_EDITOR = current.T("Reject editor is not well formed", lazy=False)
MSG_WELL_FORMED_OAI = current.T("Reject OAI is not well formed", lazy=False)
......@@ -91,6 +92,7 @@ OAI_URL = "http://%s/record/%s"
REG_BODY = re.compile("<body>(.*)</body>")
REG_COLLABORATION = re.compile(regex.REG_COLLABORATION)
REG_CONF = re.compile("^C\d+-\d+-\d+(\.\d+)?$")
REG_CONF_DATES = re.compile(regex.REG_CONF_DATES)
REG_IDS_OK = re.compile("^\[[\d, ]*\]$")
REG_INT = re.compile("^\d+$")
REG_OAI = re.compile('oai:([a-z\.]+):([\d]+)')
......@@ -412,6 +414,11 @@ class CheckAndFix(object):
if not id:
raise CheckException(MSG_NO_COUNTRY)
# check conference date
m = REG_CONF_DATES.match(record.conference_dates())
if not m:
raise CheckException(MSG_WELL_FORMED_CONF_DATES)
def format_authors(self, record, func):
"""Format the author names using the function func.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment