mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 18:54:09 -04:00
Clarify comment in plugin examples
This commit is contained in:
parent
3bc6e7e9a6
commit
cc219f774f
@ -112,7 +112,7 @@ ui.py
|
||||
Now let's look at ui.py which defines the actual GUI plugin. The source code is heavily commented and should be self explanatory:
|
||||
|
||||
.. literalinclude:: plugin_examples/interface_demo/ui.py
|
||||
:lines: 10-
|
||||
:lines: 16-
|
||||
|
||||
main.py
|
||||
^^^^^^^^^
|
||||
@ -120,7 +120,7 @@ main.py
|
||||
The actual logic to implement the Interface Plugin Demo dialog.
|
||||
|
||||
.. literalinclude:: plugin_examples/interface_demo/main.py
|
||||
:lines: 10-
|
||||
:lines: 16-
|
||||
|
||||
Getting resources from the plugin zip file
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -19,7 +19,7 @@ class HelloWorld(FileTypePlugin):
|
||||
version = (1, 0, 0) # The version number of this plugin
|
||||
file_types = set(['epub', 'mobi']) # The file types that this plugin will be applied to
|
||||
on_postprocess = True # Run this plugin after conversion is complete
|
||||
minimum_calibre_version = (0, 7, 51)
|
||||
minimum_calibre_version = (0, 7, 52)
|
||||
|
||||
def run(self, path_to_ebook):
|
||||
from calibre.ebooks.metadata.meta import get_metadata, set_metadata
|
||||
|
@ -25,7 +25,7 @@ class InterfacePluginDemo(InterfaceActionBase):
|
||||
supported_platforms = ['windows', 'osx', 'linux']
|
||||
author = 'Kovid Goyal'
|
||||
version = (1, 0, 0)
|
||||
minimum_calibre_version = (0, 7, 51)
|
||||
minimum_calibre_version = (0, 7, 52)
|
||||
|
||||
#: This field defines the GUI plugin class that contains all the code
|
||||
#: that actually does something. Its format is module_path:class_name
|
||||
|
@ -7,14 +7,14 @@ __license__ = 'GPL v3'
|
||||
__copyright__ = '2011, Kovid Goyal <kovid@kovidgoyal.net>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
|
||||
from PyQt4.Qt import QDialog, QVBoxLayout, QPushButton, QMessageBox
|
||||
|
||||
if False:
|
||||
# This is here to keep my python error checker from complaining about
|
||||
# the builtin functions that will be defined by the plugin loading system
|
||||
# You do not need this code in your plugins
|
||||
get_icons = get_resources = None
|
||||
|
||||
from PyQt4.Qt import QDialog, QVBoxLayout, QPushButton, QMessageBox
|
||||
|
||||
class DemoDialog(QDialog):
|
||||
|
||||
def __init__(self, gui, icon):
|
||||
|
@ -7,15 +7,16 @@ __license__ = 'GPL v3'
|
||||
__copyright__ = '2011, Kovid Goyal <kovid@kovidgoyal.net>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
if False:
|
||||
# This is here to keep my python error checker from complaining about
|
||||
# the builtin functions that will be defined by the plugin loading system
|
||||
# You do not need this code in your plugins
|
||||
get_icons = get_resources = None
|
||||
|
||||
# The class that all interface action plugins must inherit from
|
||||
from calibre.gui2.actions import InterfaceAction
|
||||
from calibre_plugins.interface_demo.main import DemoDialog
|
||||
|
||||
if False:
|
||||
# This is here to keep my python error checker from complaining about
|
||||
# the builtin functions that will be defined by the plugin loading system
|
||||
get_icons = get_resources = None
|
||||
|
||||
class InterfacePlugin(InterfaceAction):
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user