Commit 61ff6f09 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Abbreviation of revue follow the ISO 4 standard (with dot).

parent 78a80252
......@@ -13,4 +13,4 @@ db.publishers._before_delete.append(dbui.INHIBIT_DELETE_UNDEF)
db.publishers._before_update.append(dbui.INHIBIT_UPDATE_UNDEF)
db.publishers.publisher.filter_in = dbui.CLEAN_SPACES
db.publishers.abbreviation.filter_in = filters.CLEAN_REVIEW
\ No newline at end of file
db.publishers.abbreviation.filter_in = dbui.CLEAN_SPACES
\ No newline at end of file
......@@ -42,28 +42,6 @@ def CLEAN_COLLABORATION(value):
return ', '.join(li)
def CLEAN_REVIEW(value):
"""Correct stupid mistakes on the paper_editor field.
* Remove dot and comma.
* No heading and trailing spaces.
Args:
value (unicode): review abbreviation
Returns:
unicode:
"""
# Fix to remove dot and comma
value = value.replace(".", "").replace(",", "")
# Fix to have only one space between word
value = ' '.join(value.split())
return value
def CLEAN_THESIS_DEFENSE(value):
"""Correct stupid mistakes on the thesis defence field.
......
......@@ -16,9 +16,8 @@ from invenio_tools import (load_record,
REG_AUTHOR,
REG_OAI,
REG_YEAR)
from filters import CLEAN_REVIEW
from gluon import current
from plugin_dbui import get_id
from plugin_dbui import CLEAN_SPACES, get_id
DECODE_ARXIV = re.compile(r"arXiv:(\d{2})(\d{2})\.")
......@@ -493,7 +492,7 @@ class CheckAndFix(object):
INVENIO: Phys. Lett. B + volume 673
INSPIREHEP: Phys.Lett + volume B673
Standardise the answer as ``Phys Lett B``.
Standardise the answer as ``Phys. Lett. B``.
Note:
It is recommended to call this method when erratum are removed.
......@@ -525,7 +524,7 @@ class CheckAndFix(object):
volume = m.group(2)
# remove stupid mistake
editor = CLEAN_REVIEW(editor)
editor = CLEAN_SPACES(editor)
record[u"773"]["p"] = editor
record[u"773"]["v"] = volume
......@@ -549,7 +548,7 @@ class CheckAndFix(object):
editor = "%s %s" % (editor, m.group(1))
volume = m.group(2)
editor = CLEAN_REVIEW(editor)
editor = CLEAN_SPACES(editor)
record[u"773"][i]["p"] = editor
record[u"773"][i]["v"] = volume
......
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