# Path: articlemeta/utils.py
# def convert_ahref_to_extlink(xml_etree):
# def convert_html_tags_to_jats(xml_etree):
# def convert_all_html_tags_to_jats(xml_etree):
#     def __call__(cls, *args, **kwargs):
#     def __init__(self, fp, parser_dep=ConfigParser):
#     def from_env(cls):
#     def from_file(cls, filepath):
#     def __getattr__(self, attr):
#     def items(self):
# class SingletonMixin(object):
# class Configuration(SingletonMixin):


import logging
import codecs
import re
import argparse
import csv
from pymongo import MongoClient
from articlemeta import utils
from xylose.scielodocument import Article
# coding: utf-8
"""
This processing import affiliation metadata for the Article Meta database.

input: CSV file formated as below

    Collection|PID|Publication Year|Journal Title|number label|Affiliation ID [aff1, aff2]|Affiliaton as it was markedup|Affiliation Country as it was markedup|Normalized Affiliation|Normalized Affiliation Country|iso-3661 country|Normalized Affiliation State|iso-3661 state

input example:

    scl|S0001-37652013000100001|2013|An. Acad. Bras. Ciênc.|v85n1|aff1|Museu Nacional/UFRJ|Brasil|Universidade Federal do Rio de Janeiro|Brazil|iso-3661|São Paulo|SP

CSV Total parameters size: 13
"""



logger = logging.getLogger(__name__)


# Path: articlemeta/utils.py
# def convert_ahref_to_extlink(xml_etree):
# def convert_html_tags_to_jats(xml_etree):
# def convert_all_html_tags_to_jats(xml_etree):
#     def __call__(cls, *args, **kwargs):
#     def __init__(self, fp, parser_dep=ConfigParser):
#     def from_env(cls):
#     def from_file(cls, filepath):
#     def __getattr__(self, attr):
#     def items(self):
# class SingletonMixin(object):
# class Configuration(SingletonMixin):


# Path: processing/importaffiliation.py
import logging
import codecs
import re
import argparse
import csv
from pymongo import MongoClient
from articlemeta import utils
from xylose.scielodocument import Article

# coding: utf-8
"""
This processing import affiliation metadata for the Article Meta database.

input: CSV file formated as below

    Collection|PID|Publication Year|Journal Title|number label|Affiliation ID [aff1, aff2]|Affiliaton as it was markedup|Affiliation Country as it was markedup|Normalized Affiliation|Normalized Affiliation Country|iso-3661 country|Normalized Affiliation State|iso-3661 state

input example:

    scl|S0001-37652013000100001|2013|An. Acad. Bras. Ciênc.|v85n1|aff1|Museu Nacional/UFRJ|Brasil|Universidade Federal do Rio de Janeiro|Brazil|iso-3661|São Paulo|SP

CSV Total parameters size: 13
"""



logger = logging.getLogger(__name__)


config = utils.Configuration.from_env()