__init__.py 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. """main.py: A calibre plugin containing an OPDS client"""
  2. __author__ = "Steinar Bang"
  3. __copyright__ = "Steinar Bang, 2015-2022"
  4. __credits__ = ["Steinar Bang"]
  5. __license__ = "GPL v3"
  6. from calibre.customize import InterfaceActionBase
  7. class OpdsClient(InterfaceActionBase):
  8. '''
  9. An OPDS client that can read the OPDS of a different calibre,
  10. and display the differences between this calibre and the other
  11. and download the missing books from the other calibre
  12. '''
  13. name = 'OPDS Client'
  14. description = 'Import from the OPDS catalog exported by a different calibre'
  15. supported_platforms = ['windows', 'osx', 'linux']
  16. author = "Steinar Bang"
  17. version = (1, 0, 0)
  18. minimum_calibre_version = (5, 0, 1)
  19. actual_plugin = 'calibre_plugins.opds_client.ui:OpdsInterfacePlugin'
  20. def is_customizable(self):
  21. return True
  22. def config_widget(self):
  23. from calibre_plugins.opds_client.config import ConfigWidget
  24. return ConfigWidget()
  25. def save_settings(self, config_widget):
  26. config_widget.save_settings()
  27. ac = self.actual_plugin_
  28. if ac is not None:
  29. ac.apply_settings()