From 61488e2449b903d2e63eaa8effd57b00946f726c Mon Sep 17 00:00:00 2001 From: Nicholas Kalar Date: Sat, 2 Aug 2025 22:06:26 -0400 Subject: [PATCH] Minor updates --- src/extract.py | 1 - src/sql_statements.py | 23 ++++++++++------------- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/src/extract.py b/src/extract.py index 00eb896..d12c565 100644 --- a/src/extract.py +++ b/src/extract.py @@ -6,7 +6,6 @@ import json from dotenv import load_dotenv from datetime import date, datetime - load_dotenv google_api_key = os.getenv('GOOGLE_API_KEY') diff --git a/src/sql_statements.py b/src/sql_statements.py index 97b6147..050719c 100644 --- a/src/sql_statements.py +++ b/src/sql_statements.py @@ -1,6 +1,3 @@ - - - collections_table_creation = ''' CREATE TABLE IF NOT EXISTS Collection_Item( "id" BIGSERIAL PRIMARY KEY, @@ -28,13 +25,13 @@ collections_table_creation = ''' def collection_insert_statement(book): - return 'INSERT INTO Collection_Item ' \ - '(title, author, publisher, publishing_date, isbn, sort_title, format, '\ - 'language, categories, page_count, is_checked_in, is_archived, is_lost) '\ - f'VALUES (\'{book['title']}\', \'{book['author']}\', '\ - f'\'{book['publisher']}\', \'{book['publishing_date']}\', '\ - f'\'{book['isbn']}\', \'{book['sort_title']}\',' \ - f'\'{book['format']}\', \'{book['language']}\', '\ - f'\'{book['categories']}\', \'{book['page_count']}\', '\ - f'\'{book['is_checked_in']}\', \'{book['is_archived']}\', '\ - f'\'{book['is_lost']}\');' \ No newline at end of file + return ('INSERT INTO Collection_Item ' + '(title, author, publisher, publishing_date, isbn, sort_title, format, ' + 'language, categories, page_count, is_checked_in, is_archived, is_lost) ' + f'VALUES (\'{book['title']}\', \'{book['author']}\', ' + f'\'{book['publisher']}\', \'{book['publishing_date']}\', ' + f'\'{book['isbn']}\', \'{book['sort_title']}\',' + f'\'{book['format']}\', \'{book['language']}\', ' + f'\'{book['categories']}\', \'{book['page_count']}\', ' + f'\'{book['is_checked_in']}\', \'{book['is_archived']}\', ' + f'\'{book['is_lost']}\');') \ No newline at end of file