class NotebookCommand(Command): (source)
Known subclasses: zim.main.ExportCommand
, zim.main.GuiCommand
, zim.main.IndexCommand
, zim.main.SearchCommand
, zim.main.ServerCommand
, zim.main.ServerGuiCommand
Method | build_notebook |
No summary |
Method | get_default_or_only_notebook |
Helper to get a default notebook |
Method | get_notebook_argument |
No summary |
Inherited from Command
:
Method | __init__ |
Constructor @param command: the command switch (first commandline argument) @param pwd: optional working directory path |
Method | get_arguments |
Get the arguments, to be used by the implementation of run() @raises UsageError: when arguments are not correct @returns: tuple of arguments, padded with None to correct length |
Method | get_options |
Retrieve a dict with a sub-set of the command options @param names: that options in the subset |
Method | ignore_options |
Undocumented |
Method | parse_options |
No summary |
Method | run |
Run the command @raises UsageError: when arguments are not correct @implementation: must be implemented by subclasses |
Class Variable | arguments |
Undocumented |
Class Variable | default_options |
Undocumented |
Class Variable | options |
Undocumented |
Instance Variable | args |
Undocumented |
Instance Variable | command |
Undocumented |
Instance Variable | opts |
Undocumented |
Instance Variable | pwd |
Undocumented |
zim.main.GuiCommand
Notebook
object for this command Tries to automount the file location if needed.Parameters | |
ensure_uptodate | if True index is updated when needed. Only set to False when index update is handled explicitly (e.g. in the main gui). |
Returns | |
a Notebook object and a Path object or None | |
Raises | |
NotebookLookupError | if the notebook could not be resolved or is not given |
FileNotFoundError | if the notebook location does not exist and could not be mounted. |
Returns | |
a 2-tuple of an NotebookInfo object and an optional Path or (None, None) if the notebook argument is optional and not given | |
Raises | |
NotebookLookupError | if the notebook is mandatory and not given, or if it is given but could not be resolved |