package documentation
(source)

This is the development documentation of zim.

NOTE: There is also some generic development documentation in the "CONTRIBUTING.md" file in the source distribution. Please also have a look at that if you want to help with zim development.

In this API documentation many of the methods with names starting with do_ and on_ are not documented. The reason is that these are signal handlers that are not part of the external API. They act upon a signal but should never be called directly by other objects.

Overview

The script zim.py is a thin wrapper around the main() function defined in zim.main. This main function constructs a Command object that implements a specific commandline command. The Command object then either connects to a running instance of zim, or executes the application.

To execute the application, the command typically constructs a Notebook and depending on the command the graphical interface is constructed, a webserver is started or some other action is executed on the notebook.

The Notebook object is found in zim.notebook and implements the API for accessing and storing pages, attachments and other data in the notebook folder.

The notebook works together with an Index object which keeps a SQLite database of all the pages to speed up notebook access and allows to e.g. show a list of pages in the side pane of the user interface.

Another aspect of the notebook is the parsing of the wiki text in the pages such that it can be shown in the interface or exported to another format. See zim.formats for implementations of different parsers.

All classes related to configuration are located in zim.config. The ConfigManager handles looking up config files and provides them for all components.

Plugins are defined as sub-modules of zim.plugins. The PluginManager manages the plugins that are loaded and objects that can be extended by plugins.

The graphical user interface is implemented in the zim.gui module and it's sub-modules. The webinterface is implemented in zim.www.

Functionality for exporting content is implemented in zim.exporter. And search functionality can be found in zim.search.

Many classes in zim have signals which allow other objects to connect to a listen for specific events. This allows for an event driven chain of control, which is mainly used in the graphical interface, but is also used elsewhere. If you are not familiar with event driven programs please refer to a Gtk manual.

Infrastructure classes

All functions and objects to interact with the file system can be found in zim.fs.

For executing external applications see zim.applications or zim.gui.applications.

Some generic base classes and functions can be found in zim.utils

Unknown Field: newfield
signalSignal, Signals
emitsEmits, Emits
implementationImplementation
Package config No package docstring; 0/1 variable, 4/4 functions, 2/3 modules documented
Package export This module contains the framework for exporting data from zim.
Package formats Package with source formats for pages.
Package gui No package docstring; 0/1 variable, 1/2 function, 6/18 modules, 1/1 package documented
Package inc This package contains third party libraries to be packaged with zim. See the respective files for the copyright and license notices.
Package main No summary
Package newfs Module which contains all classes to deal with the filesystem
Package notebook This module contains the main Notebook class and related classes.
Package plugins API documentation of the zim plugin framework.
Package templates No package docstring; 0/1 variable, 3/4 functions, 1/1 class, 5/5 modules documented
Module actions Action interface classes.
Module applications This module contains helper classes for running external applications.
Module datetimetz Thin wrapper for 'datetime' module from the standard library. Provides timezone info for the local time. Based on example code from standard library datetime documentation.
Module errors This module contains the base class for all errors in zim
Module fs Module with basic filesystem objects.
Module history This module implements the history for navigating pages in the notebook.
Module import_files No module docstring; 0/1 variable, 2/2 functions documented
Module insertedobjects No module docstring; 1/1 class documented
Module parser Generic parser for wiki formats
Module parsing This module contains utilities for parsing strings and text
Module search This module contains the logic for searching in a notebook.
Module signals No module docstring; 0/1 variable, 0/5 constant, 1/2 function, 5/9 classes documented
Module tokenparser Undocumented
Module utils Module with assorted useful classes and functions used in the zim code
Module www This module contains a web interface for zim. This is an alternative to the GUI application.

From __init__.py:

Constant ZIM_EXECUTABLE Undocumented
Variable __author__ Undocumented
Variable __copyright__ Undocumented
Variable __license__ Undocumented
Variable __url__ Undocumented
Variable __version__ Undocumented
Variable debug_log_file Undocumented
Variable logger Undocumented
Variable trans Undocumented
Variable _enc Undocumented
Variable _lang Undocumented
Variable _localedir Undocumented
Variable _pref_enc Undocumented
__version__: str = (source)

Undocumented

__url__: str = (source)

Undocumented

__author__: str = (source)

Undocumented

__copyright__: str = (source)

Undocumented

__license__: str = (source)

Undocumented

logger = (source)

Undocumented

debug_log_file = (source)

Undocumented

ZIM_EXECUTABLE = (source)

Undocumented

Value
os.path.abspath(sys.argv[0])
_pref_enc = (source)

Undocumented

_lang = (source)

Undocumented

_enc = (source)

Undocumented

_localedir = (source)

Undocumented

trans = (source)

Undocumented