-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
425 additions
and
219 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[flake8] | ||
max-line-length = 88 | ||
extend-ignore = D100, D104 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,5 @@ __pycache__ | |
|
||
.DS_Store | ||
**.sqlite* | ||
*.org | ||
*.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
build: | ||
zip Kobo2Calibre.zip \ | ||
converter.py \ | ||
db.py \ | ||
plugin.py \ | ||
__init__.py \ | ||
kobo2calibre.py \ | ||
plugin-import-name-kobo2calibre.txt \ | ||
images/icon.png | ||
|
||
run: | ||
calibre-customize -b $(shell pwd); calibre | ||
|
||
test: | ||
flake8 . | ||
rm -rf .mypy_cache && mypy . --explicit-package-bases --namespace-packages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,29 @@ | ||
from typing import Optional | ||
|
||
from calibre.customize import InterfaceActionBase | ||
from PyQt6.QtWidgets import QWidget | ||
|
||
|
||
class Kobo2Calibre(InterfaceActionBase): | ||
"""Base class for Calibre plugin.""" | ||
|
||
name = "Kobo2Calibre" | ||
description = "Embed highlights from Kobo device into matching books in Calibre" | ||
supported_platforms = ["windows", "osx", "linux"] | ||
author = "Alexander Khizov" | ||
version = (0, 0, 1) | ||
version = (0, 1, 0) | ||
minimum_calibre_version = (6, 10, 0) | ||
|
||
actual_plugin = "calibre_plugins.kobo2calibre.ui:Kobo2CalibrePlugin" | ||
actual_plugin = "calibre_plugins.kobo2calibre.plugin:Kobo2CalibrePlugin" | ||
|
||
def is_customizable(self) -> bool: | ||
"""Return True if the plugin has a configuration dialog.""" | ||
return False | ||
|
||
def config_widget(self): # type: ignore | ||
def config_widget(self) -> Optional[QWidget]: | ||
"""Return the configuration widget.""" | ||
return None | ||
|
||
def save_settings(self, config_widget) -> None: # type: ignore | ||
def save_settings(self, _: QWidget) -> None: | ||
"""Save the settings from the config widget.""" | ||
pass | ||
|
||
def load_icon(self): # type: ignore | ||
return None |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.