Switch to testing db, working deletion 🎉

This commit is contained in:
3wc
2023-10-27 02:01:21 +01:00
parent b5e486020e
commit a0cdf945bf
2 changed files with 77 additions and 38 deletions

View File

@ -9,8 +9,9 @@ import click
import requests
import sqlite3
HAMSTER_DIR = Path.home() / '.local/share/hamster'
HAMSTER_FILE = HAMSTER_DIR / 'hamster.db'
# HAMSTER_DIR = Path.home() / '.local/share/hamster'
# HAMSTER_FILE = HAMSTER_DIR / 'hamster.db'
HAMSTER_FILE = 'hamster-testing.db'
conn = sqlite3.connect(HAMSTER_FILE)
c = conn.cursor()
@ -703,7 +704,7 @@ def _import(username, mapping_path=None, output=None, category_search=None, afte
@cli.command()
def app():
from .app import HamsterToolsApp
app = HamsterToolsApp(db_cursor=c)
app = HamsterToolsApp(db_cursor=c, db_connection=conn)
app.run()