PEP8 happiness
This commit is contained in:
parent
18b31f0294
commit
14dfcc6a71
10
linklist.py
10
linklist.py
@ -10,6 +10,7 @@ usage: zim --plugin linklist [OPTIONS] <notebook>
|
|||||||
--missing-only List only pages that don't exist
|
--missing-only List only pages that don't exist
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
||||||
class LinkListPlugin(PluginClass):
|
class LinkListPlugin(PluginClass):
|
||||||
plugin_info = {
|
plugin_info = {
|
||||||
'name': 'Link List',
|
'name': 'Link List',
|
||||||
@ -17,6 +18,7 @@ class LinkListPlugin(PluginClass):
|
|||||||
'author': 'Gergely Polonkai',
|
'author': 'Gergely Polonkai',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class LinkListCommand(Command):
|
class LinkListCommand(Command):
|
||||||
options = (
|
options = (
|
||||||
('help', 'h', 'Print this help text and exit'),
|
('help', 'h', 'Print this help text and exit'),
|
||||||
@ -38,10 +40,11 @@ class LinkListCommand(Command):
|
|||||||
return
|
return
|
||||||
|
|
||||||
nbi = None
|
nbi = None
|
||||||
|
|
||||||
if len(self.args) > 0:
|
if len(self.args) > 0:
|
||||||
nbi = resolve_notebook(self.args[0])
|
nbi = resolve_notebook(self.args[0])
|
||||||
|
|
||||||
if nbi == None:
|
if nbi is None:
|
||||||
print("Notebook must be specified!")
|
print("Notebook must be specified!")
|
||||||
|
|
||||||
return
|
return
|
||||||
@ -64,5 +67,8 @@ class LinkListCommand(Command):
|
|||||||
|
|
||||||
for page in self._all_links():
|
for page in self._all_links():
|
||||||
exists = page.exists()
|
exists = page.exists()
|
||||||
if listing == None or (listing == 'M' and exists == 0) or (listing == 'E' and exists == 1):
|
|
||||||
|
if listing is None or \
|
||||||
|
(listing == 'M' and exists == 0) or \
|
||||||
|
(listing == 'E' and exists == 1):
|
||||||
print "%c %s" % ('E' if exists == 1 else 'M', page.name)
|
print "%c %s" % ('E' if exists == 1 else 'M', page.name)
|
||||||
|
Loading…
Reference in New Issue
Block a user