diff --git a/scripts/README.org b/scripts/README.org index 65a89fa..f2c15a8 100644 --- a/scripts/README.org +++ b/scripts/README.org @@ -5,7 +5,7 @@ Scripts are a collection of helpful utility scripts, or simple gut-check tests f * test_recipe_scraper.py Asserts various urls by making actual calls out to the internet, while our test suite mocks return values. -#+begin_src sh +#+begin_src shell python ../manage.py shell < ../scripts/test_recipe_scraper.py #+end_src @@ -15,3 +15,13 @@ python ../manage.py shell < ../scripts/test_recipe_scraper.py | Checking: | https://cookingwithmike.com/quinoa-meatloaf/ | | | | Checking: | https://www.kingarthurbaking.com/recipes/overnight-sourdough-waffles-recipe | | | | Checking: | https://dirt.fyi/article/2026/02/25-years-of-ipod-brain?src=longreads | | | + +* test_koreader_import.py +Run through an actual koreader sqlite file and make sure imports work as expected + +#+begin_src shell +rm db.sqlite3 +cp ../db.sqlite3 . +python ../manage.py shell < ../scripts/test_koreader_import.py +#+end_src + diff --git a/scripts/koreader-test.sqlite3 b/scripts/koreader-test.sqlite3 new file mode 100644 index 0000000..b621d31 Binary files /dev/null and b/scripts/koreader-test.sqlite3 differ diff --git a/scripts/test_koreader_import.py b/scripts/test_koreader_import.py new file mode 100644 index 0000000..7ed0e58 --- /dev/null +++ b/scripts/test_koreader_import.py @@ -0,0 +1,6 @@ +#!/usr/bin/env python3 + +from books.koreader import process_koreader_sqlite_file + + +process_koreader_sqlite_file("./koreader-test.sqlite3", 1)