Commit f7a2666f authored by sim's avatar sim

Add RIS parser

parent ba4e11d8
from .ris import RISParser
from RISparser.parser import Ris
from RISparser.config import TAG_KEY_MAPPING
# See https://github.com/MrTango/RISparser/blob/master/RISparser/config.py
GARGANTEXT_KEY_MAPPING = dict(TAG_KEY_MAPPING, **{
'PY': 'publication',
'N1': 'references',
'LA': 'lang',
'JO': 'source',
'ST': 'subtitle',
'Y2': 'secondary_publication',
})
class RISParser(Ris):
PATTERN = '^[A-Z][A-Z0-9] -'
def __init__(self, lines):
super().__init__(lines, GARGANTEXT_KEY_MAPPING)
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