Commit 642278e7 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Bugs fixed.

parent d6d131c9
......@@ -75,9 +75,10 @@ def fix_amu(record):
"""
li = record.these_universities()
for i in range(len(li)):
if re.match(REG_CPPM, li[i]):
if re.search(REG_CPPM, li[i]):
if int(record.year()) < 2012:
year = re.search(r"(\d\d\d\d)", record.these_defense()).group(1)
if int(year) < 2012:
li[i] = u"Université de la Méditerrannée Aix-Marseille II"
else:
li[i] = u"Aix Marseille Université"
......@@ -135,6 +136,9 @@ def format_author_fr(name):
r = '%s. %s' % (m.group(2)[0], m.group(1))
else:
r = name
# avoid author name in upper case (R. LE FOO --> R. Le Foo)
r = r.title()
return r
......@@ -929,8 +933,11 @@ class Thesis(PublicationsTool):
id_level = get_create_id(db, 'levels', level=record.these_level())
title = record.title()
universities = fix_amu(record)
year = record.year()
# extract the year from the defense date
# this approach seems the most reliable
year = re.search(r"(\d\d\d\d)", defense_date).group(1)
# check against already published thesis
id = get_id(db, 'diplomas', author=first_author,
defense=defense_date,
......
--------------------------------- CHANGELOG ----------------------------------
HEAD
- Bugs fixed
0.4.0 (July 2012)
- Review the logic of the harvester and the error messaging.
Harvester can be parameterised for a team, a project or both.
......
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