Please allow to import books from the command line
Is your feature request related to a problem? Please describe.
It would be nice if one could fill the library in a programmatic way.
Describe the solution you'd like
Would be great if
foliate --import <path-to-book1> <path-to-book2>
would trigger the import of a book and then exit.
Describe alternatives you've considered
Filling the necessary data structures with an external tool but that would be fragile to foliate changes.
Additional context
When demoing Linux Mobile phones running Phosh with our non-profit at conferences we pre-install the phones with some applications and data so people interested can test a usable device. Foliate is one of the apps we show and it would be nice if we could programmatically fill foliate's library with the ebooks we already download onto the device.
I think the open functionality is actually enough, hence closing.
Having explored the fragility of the open file approach I reconsidered (sorry for the back and forth): --import as initially suggested would indeed be nice for automation if foliate would quite automatically after finishing the import. With open we can't be certain when the imports finished and thus need to use an arbitrary timeout.
Duplicate of #730