#!/usr/bin/env python3

import logging
import sqlite3

import coloredlogs


_logger = logging.getLogger()


commands = [
    r"""delete from seqalias where namespace in ('gi', 'genbank')""",

    # Commit and vaccum to reclaim space
    """commit""",
    """vacuum""",
    ]



if __name__ == "__main__":
    coloredlogs.install(level="INFO")
    
    db = sqlite3.connect("/usr/local/share/seqrepo/master/aliases.sqlite3")

    for command in commands:
        _logger.info(command)
        db.execute(command)
        
