foliate icon indicating copy to clipboard operation
foliate copied to clipboard

Please allow to import books from the command line

Open agx opened this issue 6 months ago • 3 comments

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.

agx avatar Oct 17 '25 20:10 agx

I think the open functionality is actually enough, hence closing.

agx avatar Oct 18 '25 12:10 agx

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.

agx avatar Oct 18 '25 20:10 agx

Duplicate of #730

johnfactotum avatar Nov 04 '25 17:11 johnfactotum