My books library is bilingual, ie English and Chinese, but the search function doesn't support the Chinese search (and probably other non-alphameric languages).
I provide a Chinese epub book ๆชๆฅ็ฎๅฒ (A Brief History of Tomorrow) here in case you need it for testing.
Now when typing "ib", the workflow shows the books in a weird order. IDK what it is, but guess it's a default order based on the oldest installed time.
IMO it would be helpful if it shows the list of recent books or at least provides this option.
I opened three issues and it's a lot lol. It depends on how much time you have :)
Take it easy. If you're too busy now, I would be happy to provide a pull request once I have time.
Apple Books always stores some books back to the iCloud if we don't use them for a long time.
Is it possible to download and open the book automatically when itโs on the cloud (just like what happens when we click the book in the books app)? Now the workflow works nothing on the non-local books.
You should have icon.png and info.plit in src and invoke your script from the Script Filter with python alfred_books.py "{query}" only, so no need to cd ./src.
Therefore, your .alfredworkflow file should be bundled with the whole content of src and nothing else.