The SSH host key has changed on 8 April, 2022 to this one: SHA256:573uTBSeh74kvOo0HJXi5ijdzRm8me27suzNEDlGyrQ

PEP8 happiness

master
Gergely Polonkai 7 years ago
parent 18b31f0294
commit 14dfcc6a71
  1. 12
      linklist.py

@ -2,7 +2,7 @@ from zim.plugins import PluginClass
from zim.command import Command
from zim.notebook import resolve_notebook, build_notebook
usagehelp ='''\
usagehelp = '''\
usage: zim --plugin linklist [OPTIONS] <notebook>
--help, -h Print this help
@ -10,6 +10,7 @@ usage: zim --plugin linklist [OPTIONS] <notebook>
--missing-only List only pages that don't exist
'''
class LinkListPlugin(PluginClass):
plugin_info = {
'name': 'Link List',
@ -17,6 +18,7 @@ class LinkListPlugin(PluginClass):
'author': 'Gergely Polonkai',
}
class LinkListCommand(Command):
options = (
('help', 'h', 'Print this help text and exit'),
@ -38,10 +40,11 @@ class LinkListCommand(Command):
return
nbi = None
if len(self.args) > 0:
nbi = resolve_notebook(self.args[0])
if nbi == None:
if nbi is None:
print("Notebook must be specified!")
return
@ -64,5 +67,8 @@ class LinkListCommand(Command):
for page in self._all_links():
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)

Loading…
Cancel
Save