Open colagrosso opened 7 months ago
I forgot to mention above, but I ran the script in #335 over a hundred or so ebooks, and it picked up the title, URL, and tags just fine. You can skip rebuilding the books and just update the database via:
for BOOK in $(find /standardebooks.org/ebooks -maxdepth 1 -type d)
do
tsp nice /standardebooks.org/web/scripts/deploy-ebook-to-www -v --no-build --no-images --no-epubcheck --no-recompose --no-feeds --no-bulk-downloads --update-ebook-database $BOOK
done
For this project, I don't think we need one very large branch. Since we can do this piecemeal and release these updates as we make them, while still leaving the existing filesystem-based system in place to fill in the blanks, we can do each piece of work as its own PR.
I think we will probably drop Ebook::__construct()
entirely in favor of several ::From*
methods, like Ebook::FromFilesystem($path)
, Ebook::Get($ebookId)
, etc. much like Artwork
.
This is a large project that may require multiple issues, but we'll start here.
To help with the discussion, I have a draft PR at #335 where I hacked up a schema, script, methods, etc. for
Ebooks
andEbookTags
. No hard feelings if we have to scrap that PR and start a different way.Question:
covers
? I think that would save you review time because you could review the changes periodically, and there would be no chance of breaking something inmaster
.Some notes about draft PR #335:
Ebook
constructor. Eventually we will have to break up that constructor into separate methods. Some of the logic is needed for populating the DB tables, and some is needed for setting request-time properties.Library::FilterEbooks()
,/ebooks/index.php
, or/ebooks/ebook.php
yet. I thought I would populate more fields in the DB tables first.The more I look, the more work I see to do, but we'll chip away at it. One nice thing is that the ebook webpages are all read-only (unlike the artwork site).