# Path: glottolog3/cli_util.py
# def get_releases(args):
#     cfg = configparser.ConfigParser(interpolation=configparser.ExtendedInterpolation())
#     with args.pkg_dir.joinpath('releases.ini').open(encoding='utf-8') as f:
#         cfg.read_file(f)
#     return [Release.from_config(cfg, sec) for sec in cfg.sections()]


from datetime import datetime
from sqlalchemy import create_engine
from clldutils.apilib import assert_release
from glottolog3.cli_util import get_releases
"""
Change modification date of newly added languoids
"""




def register(parser):  # pragma: no cover
    parser.add_argument('--previous', help='previous version to compare against', default=None)


def run(args):  # pragma: no cover
    version = assert_release(args.repos.repos)
    if args.previous:
        last = args.previous
    else:

# Path: glottolog3/cli_util.py
# def get_releases(args):
#     cfg = configparser.ConfigParser(interpolation=configparser.ExtendedInterpolation())
#     with args.pkg_dir.joinpath('releases.ini').open(encoding='utf-8') as f:
#         cfg.read_file(f)
#     return [Release.from_config(cfg, sec) for sec in cfg.sections()]


# Path: glottolog3/commands/mark_new_languages.py
from datetime import datetime
from sqlalchemy import create_engine
from clldutils.apilib import assert_release
from glottolog3.cli_util import get_releases

"""
Change modification date of newly added languoids
"""




def register(parser):  # pragma: no cover
    parser.add_argument('--previous', help='previous version to compare against', default=None)


def run(args):  # pragma: no cover
    version = assert_release(args.repos.repos)
    if args.previous:
        last = args.previous
    else:

        rels = get_releases(args)