2026-06-12 11:58:47 +00:00
|
|
|
# main.py
|
2026-06-13 02:03:58 +00:00
|
|
|
import asyncio
|
2026-06-13 07:02:06 +00:00
|
|
|
from database.connection import init_db
|
|
|
|
|
from core.bulk_importer import BulkImporter
|
2026-06-12 11:58:47 +00:00
|
|
|
|
2026-06-13 07:02:06 +00:00
|
|
|
async def main():
|
|
|
|
|
# Verify tables exist or run schemas
|
|
|
|
|
init_db()
|
2026-06-12 11:58:47 +00:00
|
|
|
|
2026-06-13 07:02:06 +00:00
|
|
|
# Initialize the importer pipeline
|
|
|
|
|
importer = BulkImporter()
|
2026-06-12 11:58:47 +00:00
|
|
|
|
2026-06-13 07:02:06 +00:00
|
|
|
# Execute structural parse and database write operations
|
|
|
|
|
pdf_file = "aula_int_plus_1_glos_en_alfa.pdf"
|
|
|
|
|
textbook = "Aula Internacional Plus 1"
|
|
|
|
|
|
|
|
|
|
importer.import_pdf_glossary(pdf_file, textbook)
|
2026-06-12 11:58:47 +00:00
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
2026-06-13 07:02:06 +00:00
|
|
|
asyncio.run(main())
|