Пример #1
0
                    args.log.info('%s %s ~~ description: %s ---> %s' % (l.id, type_, vs.description, comment))
                    vs.description = comment
                    stats.update(['justifications-%s' % type_])

            for r in vs.references:
                DBSession.delete(r)

            for r, pages in refs:
                # FIXME: we must make sure not to link sources which will subsequently be
                # replaced!
                vs.references.append(ValueSetReference(
                    source=Source.get(str(r)),
                    description=pages))

        args.log.info('%s %s' % (i, type_))


def main(args):
    stats = Counter()
    with transaction.manager:
        languages = {}
        justifications(args, languages, stats)
        countries(args, languages, stats)
        macroareas(args, languages, stats)
        coordinates(args, languages, stats)
    print(stats)


if __name__ == '__main__':
    main(get_args())
Пример #2
0
# -*- coding: utf-8 -*-
import transaction

from glottolog3.scripts.util import update_reflang, get_args

if __name__ == '__main__':  # pragma: no cover
    with transaction.manager:
        update_reflang(get_args())
Пример #3
0
# -*- coding: utf-8 -*-
import transaction

from glottolog3.scripts.util import update_reflang, get_args


if __name__ == '__main__':  # pragma: no cover
    with transaction.manager:
        update_reflang(get_args())