~# cookbooks
A Python application for parsing and serving EPUB cookbook files with a web interface.
- Install dependencies:
pip install -r requirements.txtTests metadata parsing, OPF file detection, and web page accessibility:
# Run all tests
python -m unittest test_cookbook_metadata.py -v
# Run specific test
python -m unittest test_cookbook_metadata.TestCookBookMetadata.test_all_cookbooks_have_opf -v
# Run with less verbose output
python -m unittest test_cookbook_metadata.pytest_all_cookbooks_have_opf- Verify each cookbook has exactly one OPF filetest_all_cookbooks_have_title- Verify each cookbook has a titletest_all_cookbooks_have_author- Verify each cookbook has an authortest_all_cookbooks_have_cover_photos- Verify each cookbook has a cover imagetest_web_app_index_page- Verify the web app index page loadstest_all_cookbook_pages_no_404- Verify all pages are accessible without 404 errorstest_first_page_of_each_cookbook- Verify the first page of each cookbook is accessible
Start the development server:
python web_app.pyThe app will be available at http://127.0.0.1:5000/
cookbook_metadata.py- Core metadata parser for EPUB filesweb_app.py- Flask web application for serving cookbookstest_cookbook_metadata.py- Unit testsconfig/params.json- Configuration file with cookbook folder pathapp.py- Terminal-based book information display