"""
Kluczowe jest zeby po każdej linijce pokazywał która to jest, oraz po pliku
"""

import netrc

import mysql.connector

NETRC_FILE = "/home/mtuszowski/.netrc"

netrc_mod = netrc.netrc(NETRC_FILE)
REMOTE_HOST_NAME = "sql_localhost"
authTokens = netrc_mod.authenticators(REMOTE_HOST_NAME)

mydb = mysql.connector.connect(
    host="localhost", user="root", password="root", database="scihubdois"
)
mycursor = mydb.cursor()

mycursor.execute("SELECT * FROM scimag")
for x in mycursor:
    print(x)


file_list = ""
for file in file_list:

    with open(
        "/mnt/n/scimag_2020-05-30.sql/{}".format(file), encoding="utf-8"
    ) as infile:
        pass
result = mycursor.execute("SHOW databases")
# trunk-ignore(mypy/union-attr)
