rpiwebapp-public/test.py

36 lines
2.1 KiB
Python
Raw Permalink Normal View History

2019-07-06 23:00:00 -07:00
import threading
import time
import os
import sqlite3
import inspect
2019-07-06 23:00:00 -07:00
from comicapi import comicarchive
from comicapi.issuestring import IssueString
from urllib import parse
from io import BytesIO
from PIL import Image
import datetime, pytz
from werkzeug.security import generate_password_hash
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import create_engine
from sqlalchemy import Column, Integer, String, BLOB, Boolean
from sqlalchemy.orm import sessionmaker
2019-07-06 23:00:00 -07:00
from scripts import database
2019-07-06 23:00:00 -07:00
db = sqlite3.connect(database.DATABASE)
db.row_factory = sqlite3.Row
engine = create_engine("sqlite:///"+database.DATABASE+"?check_same_thread=False")
Session =sessionmaker(bind=engine)
session = Session()
Base = declarative_base()
DC_Comics = ["DC", "Young Animal", "WildStorm", "Earth-M", "Vertigo", "Sandman Universe", "DC Black Label", "Wonder Comics", "DC Ink", "DC Zoom", "Mad", "All Star", "Amalgam Comics", "DC Focus", "Elseworlds", "First Wave", "Helix", "Impact Comics", "Johnny DC", "Minx", "Paradox Press", "Piranha Press", "Tangent Comics", "WildStorm Productions", "America's Best Comics", "Cliffhanger", "CMX Manga", "Homage Comics", "WildStorm Signature", "Zuda Comics"]
2019-07-30 15:19:03 -07:00
Marvel = ["Aircel Comics", "alibu Comics", "Atlas Comics", "Atlas", "CrossGen comics", "CrossGen", "Curtis Magazines", "Disney Books Group", "Disney Kingdoms", "Epic Comics", "Eternity Comics", "Humorama", "Icon Comics", "Infinite Comics", "Malibu Comics", "Marvel 2099", "Marvel Absurd", "Marvel Adventures", "Marvel Age", "Marvel Books", "Marvel Comics 2", "Marvel Comics", "Marvel Edge", "Marvel Frontier", "Marvel Illustrated", "Marvel Knights", "Marvel Magazine Group", "Marvel Mangaverse", "Marvel Monsters Group", "Marvel Music", "Marvel Next", "Marvel Noir", "Marvel Press", "Marvel UK", "Marvel Unlimited", "Max", "MAX", "MC2", "New Universe", "Paramount Comics", "Power Comics", "Razorline", "Star Comics", "Timely Comics", "Timely", "Tsunami", "Ultimate Comics", "Ultimate Marvel", "Non-Pareil Publishing Corp.", "St. Johns Publishing Co.", "Vital Publications, Inc."]
2019-07-06 23:00:00 -07:00
def get_db():
return db