The “plug” package for handling plugins in Gramps.
This module provides the base class for plugins.
Bases: object
This class serves as a base class for all plugins that can be registered with the plugin manager
Get the description of this plugin.
Returns: | a string that describes the plugin |
---|
The core of the Gramps plugin system. This module provides capability to load plugins from specified directories and provide information about the loaded plugins.
Plugins are divided into several categories. These are: reports, tools, importers, exporters, quick reports, and document generators.
Bases: object
unique singleton storage class for a PluginManager.
For some plugins, managed Plugin are used. These are only reobtained from the registry if this method is called
Get the list of docgen plugin names.
Returns: | a list of DocGenPlugin names |
---|
Get the list of docgen plugins.
Returns: | DocGenPlugin (a list of DocGenPlugin instances) |
---|
Get the list of export plugins.
Returns: | ExportPlugin (a list of ExportPlugin instances) |
---|
Get the list of import plugins.
Returns: | ImportPlugin (a list of ImportPlugin instances) |
---|
Returns a plugin object from PluginRegister by id.
Gets all of the data from general plugins of type category. plugin.data may be a single item, an iterable, or a callable.
>>> PLUGMAN.get_plugin_data('CSS')
<a list of raw data items>
Return list of registered reports :param gui: bool indicating if GUI reports or CLI reports must be returned
Return list of registered sidebars.
Return list of registered tools :aram gui: bool indicating if GUI reports or CLI reports must be returned
Rather than just __import__(id), this will add the pdata.fpath to sys.path first (if needed), import, and then reset path.
Load a PluginData object. This means import of the python module. Plugin directories are added to sys path, so files are found
Gathers all of the data from general plugins of type category, and pass it to a single process function from one of those plugins.
>>> PLUGMAN.process_plugin_data('CSS')
<a list of processed data items>
Searches the specified directory, and registers python plugin that are being defined in gpr.py files.
If a relationship calculator for env var LANG is present, it is immediately loaded so it is available for all.
Register an external option.
Register a mapping from option to guioption for an option that is not native to Gramps but provided by the plugin writer. This should typically be called during initialisation of a ReportOptions class.
Parameters: |
|
---|
This module provides the Plugin class for export plugins.
Bases: gramps.gen.plug._plugin.Plugin
This class represents a plugin for exporting data from Gramps
Bases: object
Base class for non-graphical gramplet code.
Developers should put their code that occurs when the active person is changed.
Append the text to the textview. Additionally, move the cursor to the position given. Positions are:
Position Description ‘start’ start of textview ‘end’ end of textview ‘begin’ begin of line, before setting the text.
Connect the given method to the active-changed signal for the navigation type requested.
Return the object of the active handle for the given navigation type. Assumes nav_type is one of the codes of Db.get_by_name.
A list of widgets to keep hidden. Needed because Gramps uses show_all() in some places.
External constructor for developers to put their initialization code. Designed to be overridden.
Creates a clickable link in the textview area.
Load information from the data portion of the saved Gramplet to the textview.
The main place for the gramplet’s code. This is a generator. Generator which will be run in the background, through update().
The view in gramplet should not wrap. DEPRICATED: use set_wrap() instead.
Gramplets should override this to take care of loading previously their special data.
Render the given text, given that set_use_markup() is on.
Change the handle of the active object for the given navigation type.
Clear and set the text to the given text. Additionally, move the cursor to the position given. Positions are:
Position Description ‘start’ start of textview ‘end’ end of textview ‘begin’ begin of line, before setting the text.
This module provides the Plugin class for import plugins.
Bases: gramps.gen.plug._plugin.Plugin
This class represents a plugin for importing data into Gramps
Report option handling, including saving and parsing.
Bases: gramps.gen.plug._options.OptionHandler
Implements handling of the docgen options for the plugins.
Bases: gramps.gen.plug._options.OptionListCollection
Implements a collection of option lists.
Loads the OptionList from the associated file, if it exists.
Bases: gramps.gen.plug._options.OptionParser
SAX parsing class for the DocOptionListCollection XML file.
Bases: gramps.gen.plug._options.MenuOptions
Defines options and provides handling interface.
Bases: gramps.gen.plug._options.MenuOptions, gramps.gen.plug.report._options.ReportOptions
The MenuReportOptions class implements the ReportOptions functionality in a generic way so that the user does not need to be concerned with the actual representation of the options.
The user should inherit the MenuReportOptions class and override the add_menu_options function. The user can add options to the menu and the MenuReportOptions class will worry about setting up the UI.
Bases: gramps.gen.plug._options.OptionHandler
Implements handling of the options for the plugins.
Bases: gramps.gen.plug._options.OptionList
Implements a set of options to parse and store for a given report.
Return the template name of the OptionList.
Returns: | template name |
---|---|
Return type: | str |
Return the custom paper size for the OptionList.
Returns: | returns the custom paper size in cm |
---|---|
Return type: | [float, float] |
Return the format name of the OptionList.
Returns: | returns the format name |
---|---|
Return type: | str |
Return a margin for the OptionList.
Parameters: | pos (int) – Position of margin [left, right, top, bottom] |
---|---|
Returns: | float cm of margin |
Return type: | float |
Return the margins for the OptionList.
Returns margins: | |
---|---|
returns the margins, floats in cm | |
Rtype margins: | [float, float, float, float] |
Return the orientation for the OptionList.
Returns: | returns the selected orientation. Valid values are PAPER_LANDSCAPE or PAPER_PORTRAIT |
---|---|
Return type: | int |
Return the output of the OptionList.
Returns: | returns the output name |
---|---|
Return type: | str |
Return the paper metric of the OptionList.
Returns: | returns whether to use metric |
---|---|
Return type: | boolean |
Return the paper name of the OptionList.
Returns: | returns the paper name |
---|---|
Return type: | str |
Return the style name of the OptionList.
Returns: | string representing the style name |
---|---|
Return type: | str |
Set the template name for the OptionList.
Parameters: | template_name (str) – name of the template to set. |
---|
Set the custom paper size for the OptionList.
Parameters: | paper_size ([float, float]) – paper size to set in cm. |
---|
Set the format name for the OptionList.
Parameters: | format_name (str) – name of the format to set. |
---|
Set a margin for the OptionList.
Parameters: |
|
---|
Set the margins for the OptionList.
Parameters: | margins ([float, float, float, float]) – margins to set. Possible values are floats in cm |
---|
Set the orientation for the OptionList.
Parameters: | orientation (int) – orientation to set. Possible values are PAPER_LANDSCAPE or PAPER_PORTRAIT |
---|
Set the output for the OptionList.
Parameters: | output (str) – name of the output to set. |
---|
Set the paper metric for the OptionList.
Parameters: | paper_metric – whether to use metric. |
---|
Bases: gramps.gen.plug._options.OptionListCollection
Implements a collection of option lists.
Return the last custom paper size used for any report in this collection.
Returns: | list of last custom paper size used in cm (width, height) |
---|---|
Return type: | [float, float] |
Return the last margins used for any report in this collection.
Parameters: | pos (int) – position in margins list |
---|---|
Returns: | last margin used in pos |
Return type: | float |
Return the last margins used for any report in this collection.
Returns: | list of last margins used in cm (left, right, top, bottom) |
---|---|
Return type: | [float, float, float, float] |
Return the last orientation used for any report in this collection.
Returns: | last orientation used |
---|---|
Return type: | int |
Return the last paper metric used for any report in this collection.
Returns: | returns whether or not to use metric |
---|---|
Return type: | boolean |
Return the last paper name used for any report in this collection.
Returns: | returns the name of the paper |
---|---|
Return type: | str |
Loads the OptionList from the associated file, if it exists.
Set the last css used for any report in this collection.
Parameters: | css_filename – name of the style to set. |
---|
Set the last custom paper size used for any report in this collection.
Parameters: | custom_paper_size ([float, float]) – size to set in cm (width, height) |
---|
Set the last format used for any report in this collection.
Parameters: | format_name – name of the format to set. |
---|
Set the last margin used for any report in this collection.
Parameters: |
|
---|
Set the last margins used for any report in this collection.
Parameters: | margins ([float, float, float, float]) – margins to set in cm (left, right, top, bottom) |
---|
Set the last orientation used for any report in this collection.
Parameters: | orientation (int) – orientation to set. |
---|
Set the last paper metric used for any report in this collection.
Parameters: | paper_metric – whether to use metric. |
---|
Bases: gramps.gen.plug._options.OptionParser
SAX parsing class for the OptionListCollection XML file.
Bases: gramps.gen.plug._options.Options
Defines options and provides handling interface.
This is a base Options class for the reports. All reports, options classes should derive from it.
Return document instance.
Warning
This method MUST NOT be overridden by subclasses.
Return document output destination.
Warning
This method MUST NOT be overridden by subclasses.
Defines default style for this report.
This method MUST be overridden by reports that use the user-adjustable paragraph styles.
Note
Unique names MUST be used for all style names, otherwise the styles will collide when making a book with duplicate style names. A rule of safety is to prepend style name with the acronym based on report name.
The following acronyms are already taken:
Code | Report |
---|---|
AC | Ancestor Chart |
AC2 | Ancestor Chart 2 (Wall Chart) |
AHN | Ahnentafel Report |
AR | Comprehensive Ancestors report |
CBT | Custom Book Text |
DG | Descendant Graph |
DR | Descendant Report |
DAR | Detailed Ancestral Report |
DDR | Detailed Descendant Report |
FGR | Family Group Report |
FC | Fan Chart |
FTA | FTM Style Ancestral report |
FTD | FTM Style Descendant report |
IDS | Individual Complete Report |
IDX | Alphabetical Index |
IVS | Individual Summary Report |
PLC | Place Report |
SBT | Simple Book Title |
TLG | Timeline Graph |
TOC | Table Of Contents |
Contain and organize bibliographic information.
Bases: object
Store and organize multiple citations into a bibliography.
Add a reference to a source to this bibliography. If the source already exists, don’t add it again. If a similar reference exists, don’t add another one.
Parameters: | citation (Citation) – Citation object |
---|---|
Returns: | A tuple containing the index of the source among all the sources and the key of the reference among all the references. If there is no reference information, the second element will be None. |
Return type: | (int,char) or (int,None) |
Note
Within this file, the name ‘citation’ is used both for gen.lib.Citation, and for _bibliography.Citation. It is not clear how best to rename the concepts in this file to avoid the clash, so the names have been retained. In this function, lib_citation is used for gen.lib.Citation instances, and citation for _bibliography.Citation instances. Elsewhere in this file, source_ref is used for gen.lib.Citation instances.
Bases: object
Store information about a citation and all of its references.
Add a reference to this citation. If a similar reference exists, don’t add another one.
Parameters: | source_ref (Citation) – Source Reference |
---|---|
Returns: | The key of the added reference among all the references. |
Return type: | char |
List all the references to this citation.
Returns: | a list of references |
---|---|
Return type: | list of Citation objects |
Report Generation Framework
Provide utilities for printing endnotes in text reports.
Add paragraph styles to a style sheet to be used for displaying endnotes.
Parameters: | style_sheet (StyleSheet) – Style sheet |
---|
Cite any sources for the object and add them to the bibliography.
Parameters: |
|
---|
Write all the entries in the bibliography as endnotes.
If elocale is passed in (a GrampsLocale), then (insofar as possible) the translated values will be returned instead.
Parameters: |
|
---|
Bases: xml.sax.handler.ContentHandler
Parses the XML file and builds the list of page sizes
Bases: object
The Report base class. This is a base class for generating customized reports. It cannot be used as is, but it can be easily sub-classed to create a functional report generator.
A collection of utilities to aid in the generation of reports.
Convert centimeters to points. Fonts are typically specified in points, but the BaseDoc classes use centimeters.
Parameters: | cm (float or int) – centimeters |
---|---|
Returns: | equivalent units in points |
Return type: | float |
Return a string that combines the elements of an address
Parameters: | addr – the Gramps address instance |
---|
Return a list of filters that are relevant for the given person
Parameters: |
|
---|
Return a IndexMark that can be used to index a person in a report
Parameters: |
|
---|
Insert pictures of a person into the document.
Convert points to centimeters. Fonts are typically specified in points, but the BaseDoc classes use centimeters.
Parameters: | pt (float or int) – points |
---|---|
Returns: | equivalent units in centimeters |
Return type: | float |
Convert color value from 0-255 integer range into 0-1 float range.
Parameters: | color (int) – list or tuple of integer values for red, green, and blue |
---|---|
Returns: | (r, g, b) tuple of floating point color values |
Return type: | 3-tuple |
Integer to Roman numeral converter for 0 < num < 4000
This module provides the Plugin class for document generator plugins.
Bases: gramps.gen.plug._plugin.Plugin
This class represents a plugin for generating documents from Gramps
Get the BaseDoc class for this plugin.
Returns: | the BaseDoc class passed into __init__() |
---|
Get the BaseDoc name for this plugin.
Returns: | the BaseDoc name passed into __init__() |
---|
Get the DocOptions subclass for this plugin, if any
Returns: | the DocOptions subclass passed into __init__() |
---|
Check if the plugin supports the DrawDoc interface.
Returns: | bool: True if DrawDoc is supported; False if DrawDoc is not supported. |
---|
Get the paper flag for this plugin.
Returns: | bool - True = use paper; False = do not use paper |
---|
Provide base interface to text based documents. Specific document interfaces should be derived from the core classes.
Bases: object
Base class for document generators. Different output formats, such as OpenOffice, AbiWord, and LaTeX are derived from this base class, providing a common interface to all document generators.
Return the StyleSheet of the document.
Opens the file so that it can be generated.
Parameters: | filename – path name of the file to create |
---|
Set the StyleSheet of the document.
Parameters: | style_sheet (StyleSheet) – The new style sheet for the document |
---|
Bases: object
Abstract Interface for graphical document generators. Output formats for graphical reports must implement this interface to be used by the report system.
Parameters: | mark – IndexMark to use for indexing (if supported) |
---|
Parameters: | mark – IndexMark to use for indexing (if supported) |
---|
Parameters: | mark – IndexMark to use for indexing (if supported) |
---|
Return the height of the text area in centimeters. The value is the page height less the margins.
Return the width of the text area in centimeters. The value is the page width less the margins.
Parameters: | mark – IndexMark to use for indexing (if supported) |
---|
Provide a rough estimate of the width of a text string.
Like string_width, but this makes sure the length of the string is <= width. Optionally, add ellipses (...).
returns with width of a string in the specified font
Bases: object
Defines a font style. Controls the font face, size, color, and attributes. In order to remain generic, the only font faces available are FONT_SERIF and FONT_SANS_SERIF. Document formatters should convert these to the appropriate fonts for the target format.
The FontStyle represents the desired characteristics. There are no guarentees that the document format generator will be able implement all or any of the characteristics.
Set font characteristics.
Parameters: |
|
---|
Bases: object
Abstract Interface for Graphviz document generators. Output formats for Graphviz reports must implement this interface to be used by the report system.
Add a comment to the source file.
Parameters: | comment (string) – A text string to add as a comment. Example: “Next comes the individuals.” |
---|---|
Returns: | nothing |
Add a link between two nodes.
Parameters: |
|
---|---|
Returns: | nothing |
Add a node to this graph. Nodes can be different shapes like boxes and circles.
Parameters: |
|
---|---|
Returns: | nothing |
Bases: gramps.gen.plug.docgen.basedoc.BaseDoc, gramps.gen.plug.docgen.graphdoc.GVDoc
Base document generator for all Graphviz document generators. Classes that inherit from this class will only need to implement the close function. The close function will generate the actual file of the appropriate type.
Add a link between two nodes.
Implements GVDocBase.add_link().
Add a node to this graph. Nodes can be different shapes like boxes and circles.
Implements GVDocBase.add_node().
Bases: gramps.gen.plug.docgen.graphdoc.GVDocBase
GVDoc implementation that generates a .gv text file.
Bases: gramps.gen.plug.docgen.graphdoc.GVDocBase
GVDoc implementation that generates a .gif file using Graphviz.
Bases: gramps.gen.plug.docgen.graphdoc.GVDocBase
GVDoc implementation that generates a .jpg file using Graphviz.
Defines all of the controls necessary to configure the graph reports.
Add all graph related options to the menu.
Parameters: | menu (Menu) – The menu the options should be added to. |
---|---|
Returns: | nothing |
Bases: gramps.gen.plug.docgen.graphdoc.GVDocBase
GVDoc implementation that generates a .pdf file using Ghostscript.
Bases: gramps.gen.plug.docgen.graphdoc.GVDocBase
GVDoc implementation that generates a .pdf file using Graphviz.
Bases: gramps.gen.plug.docgen.graphdoc.GVDocBase
GVDoc implementation that generates a .png file using Graphviz.
Bases: gramps.gen.plug.docgen.graphdoc.GVDocBase
GVDoc implementation that generates a .ps file using Graphviz.
Bases: gramps.gen.plug.docgen.graphdoc.GVDocBase
GVDoc implementation that generates a .svg file using Graphviz.
Bases: gramps.gen.plug.docgen.graphdoc.GVDocBase
GVDoc implementation that generates a .svg file using Graphviz.
Bases: object
Defines the properties of graphics objects, such as line width, color, fill, ect.
Bases: object
Defines the dimensions of a sheet of paper. All dimensions are in centimeters.
Bases: object
Define the various options for a sheet of paper.
Return the bottom margin.
Returns: | Bottom margin in centimeters |
---|---|
Return type: | float |
Return the left margin.
Returns: | Left margin in centimeters |
---|---|
Return type: | float |
Return the orientation of the page.
Returns: | PAPER_PORTRIAT or PAPER_LANDSCAPE |
---|---|
Return type: | int |
Return the right margin.
Returns: | Right margin in centimeters |
---|---|
Return type: | float |
Return the size of the paper.
Returns: | object indicating the paper size |
---|---|
Return type: | PaperSize |
Return the top margin.
Returns: | Top margin in centimeters |
---|---|
Return type: | float |
Bases: object
Defines the characteristics of a paragraph. The characteristics are: font (a FontStyle instance), right margin, left margin, first indent, top margin, bottom margin, alignment, level, top border, bottom border, right border, left border, padding, and background color.
Return a text string representing the alignment, either ‘left’, ‘right’, ‘center’, or ‘justify’
Return a tuple indicating the RGB components of the background color
Allows the values of the object to be set.
Parameters: |
|
---|
Set the paragraph alignment.
Parameters: | align – PARA_ALIGN_LEFT, PARA_ALIGN_RIGHT, PARA_ALIGN_CENTER, or PARA_ALIGN_JUSTIFY |
---|
Set the background color of the paragraph.
Parameters: | color – tuple representing the RGB components of a color (0,0,0) to (255,255,255) |
---|
Set the presence or absence of bottom border.
Parameters: | val – True indicates a border should be used, False indicates no border. |
---|
Set the font style of the paragraph.
Parameters: | font – FontStyle object containing the font definition to use. |
---|
Set the header level for the paragraph. This is useful for numbered paragraphs. A value of 1 indicates a header level format of X, a value of two implies X.X, etc. A value of zero means no header level.
Set the presence or absence of left border.
Parameters: | val – True indicates a border should be used, False indicates no border. |
---|
Set the paragraph padding in centimeters
Parameters: | val – floating point value indicating the padding in centimeters |
---|
Set the presence or absence of rigth border.
Parameters: | val – True indicates a border should be used, False indicates no border. |
---|
Bases: xml.sax.handler.ContentHandler
SAX parsing class for the StyleSheetList XML file.
Bases: object
A collection of named paragraph styles.
Add a cell style to the style sheet.
Parameters: |
|
---|
Add a draw style to the style sheet.
Parameters: |
|
---|
Add a paragraph style to the style sheet.
Parameters: |
|
---|
Add a table style to the style sheet.
Parameters: |
|
---|
Return the TableCellStyle associated with the name
Parameters: | name – name of the TableCellStyle that is wanted |
---|
Return the GraphicsStyle associated with the name
Parameters: | name – name of the GraphicsStyle that is wanted |
---|
Return the ParagraphStyle associated with the name
Parameters: | name – name of the ParagraphStyle that is wanted |
---|
Return the TableStyle associated with the name
Parameters: | name – name of the TableStyle that is wanted |
---|
Bases: object
Interface into the user’s defined style sheets. Each StyleSheetList has a predefined default style specified by the report. Additional styles are loaded from a specified XML file if it exists.
Remove a style from the list. Since each style must have a unique name, the name is used to delete the stylesheet.
name - Name of the style to delete
converts a hex value in the form of #XXXXXX into a tuple of integers representing the RGB values
Bases: object
Defines the style of a particular table cell. Characteristics are: right border, left border, top border, bottom border, and padding.
Defines if a border is used
Parameters: | val – if True, a border is used, if False, it is not |
---|
Defines if a bottom border in used
Parameters: | val – if 1, a bottom border is used, if 0, it is not |
---|
Defines if a left border in used
Parameters: | val – if True, a left border is used, if False, it is not |
---|
Bases: object
Specifies the style or format of a table. The TableStyle contains the characteristics of table width (in percentage of the full width), the number of columns, and the width of each column as a percentage of the width of the table.
Return the column width of the specified column as a percentage of the entire table width.
Parameters: | index – column to return (index starts at 0) |
---|
Set the width of a specified column to the specified width.
Parameters: |
|
---|
Set the width of all the columns at once, taking the percentages from the passed list.
Bases: object
Defines a mark to be associated with text for indexing.
Bases: object
Abstract Interface for text document generators. Output formats for text reports must implement this interface to be used by the report system.
Add a photo of the specified width (in centimeters).
Parameters: |
|
---|
Insert an Alphabetical Index at this point in the document. This passes without error so that docgen types are not required to have this.
Insert a Table of Contents at this point in the document. This passes without error so that docgen types are not required to have this.
Starts a new table cell, using the paragraph style specified.
Parameters: |
|
---|
Start a link section. This defaults to underlining.
Parameters: | link – should be an item that makes sense in this docgen type, if it implements linking. |
---|
Starts a new paragraph, using the specified style name.
Parameters: |
|
---|
Starts a new table.
Parameters: |
|
---|
Start a section of underlining. This passes without error so that docgen types are not required to have this.
Stop the link section. Defaults to stopping the underlining for docgen types that don’t support links.
Stops a section of underlining. This passes without error so that docgen ntypes are not required to have this.
Writes the text in the current paragraph. Should only be used after a start_paragraph and before an end_paragraph. Not all backends support s_tags, then the same happens as with write_text. Backends supporting write_markup will overwrite this method
Parameters: |
|
---|
Writes the note’s text and take care of paragraphs, depending on the format.
Parameters: |
|
---|
Convenience function to write a styledtext to the cairo doc.
Parameters: |
|
---|
overwrite this method if the backend supports styled notes
Writes the text in the current paragraph. Should only be used after a start_paragraph and before an end_paragraph.
Parameters: |
|
---|
File and File format management for the different reports
Bases: gramps.gen.plug.docbackend.docbackend.DocBackend
Implementation for cairo docs
File and File format management for the different reports
Bases: object
Base class for text document backends. The DocBackend manages a file to which it writes. It further knowns enough of the file format to be able to translate between the BaseDoc API and the file format. Specifically for text reports a translation of styled notes to the file format usage is done.
Input is plain text, output is text with markup added according to the s_tags which are assumed to be styledtexttags. When split is given the text will be split over the value given, and tags applied in such a way that it the text can be safely splitted in pieces along split.
Parameters: |
|
---|
As adding markup means original text must be escaped, ESCAPE_FUNC is used. This can be used to convert the text of a styledtext to the format needed for a document backend. Do not call this method in a report, use the write_markup() method.
Note
the algorithm is complex as it assumes mixing of tags is not allowed: eg <b>text<i> here</b> not</i> is assumed invalid as markup. If the s_tags require such a setup, what is returned is <b>text</b><i><b> here</b> not</i> overwrite this method if this complexity is not needed.
The escape func on text for this file format.
Parameters: | preformatted (bool) – some formats can have different escape function for normal text and preformatted text |
---|
The filename the backend works on
Parameters: |
|
---|
A styled tag is type with a value. Every styled tag must be converted to the tags used in the corresponding markup for the backend, eg <b>text</b> for bold in html. These markups are stored in STYLETAG_MARKUP. They are tuples for begin and end tag. If a markup is not present yet, it is created, using the _create_xmltag() method you can overwrite.
Default format for links. Override for better support.
value is: “TYPE DATA” where TYPE is ‘url’ or ‘ref’.
Set the filename on which the backend writes, changing the value passed on initialization. Can only be done if the previous filename is not open.
This module provides the base class for plugin registration. It provides an object containing data about the plugin (version, filename, ...) and a register for the data of all plugins .
Bases: object
This is the base class for all plugin data objects. The workflow is:
Attributes present for all plugins
Attributes for RELCALC plugins:
Attributes for REPORT plugins:
Attributes for REPORT and TOOL and QUICKREPORT and VIEW plugins
Attributes for REPORT and TOOL and DOCGEN plugins
Attributes for TOOL plugins
Attributes for DOCGEN plugins
Attribute for DOCGEN, EXPORT plugins
Attributes for QUICKREPORT plugins
Attributes for MAPSERVICE plugins
Attributes for EXPORT plugins
Attributes for IMPORT plugins
Attributes for GRAMPLET plugins
Attributes for VIEW plugins
Attributes for SIDEBAR plugins
Attributes for VIEW and SIDEBAR plugins
Bases: object
PluginRegister is a Singleton which holds plugin data
Return a list of REPORT PluginData that are can be used as bookitem
Return a list of PluginData that are of type DOCGEN
Return a list of PluginData that are of type EXPORT
Return a list of PluginData that have load_on_reg == True
Return a list of PluginData that are of type GENERAL
Return the PluginData for the plugin with id
Return a list of PluginData that are of type GRAMPLET
Return a list of PluginData that are of type IMPORT
Return a list of PluginData that are of type MAPSERVICE
Return a list of PluginData that are of type QUICKREPORT
Return a list of PluginData that are of type RELCALC
Return a list of gui or cli PluginData that are of type REPORT
Parameters: | gui – bool, if True then gui plugin, otherwise cli plugin |
---|
The dir name will be scanned for plugin registration code, which will be loaded in PluginData objects if they satisfy some checks.
Returns: | A list with PluginData objects |
---|
Return a list of PluginData that are of type SIDEBAR
Return a list of PluginData that are of type TOOL
Return a list of PluginData that are of type ptype
Return a list of PluginData that are of type VIEW
Function to create a new plugindata object, add it to list of registered plugins
Returns: | a newly created PluginData which is already part of the register |
---|
Convenience function to register a new plugin using a dictionary as input. The register functions will call newplugin() function, and use the dictionary kwargs to assign data to the PluginData newplugin() created, as in: plugindata.key = data
Parameters: |
|
---|---|
Returns: | a newly created PluginData which is already part of the register and which has kwargs assigned as attributes |
General utility functions useful for the generic plugin system
Context manager to open a file or stdin for reading.
Context manager to open a file or stdout for writing.
Bases: object
Class to duplicate the methods of tarfile.TarFile, for Python 2.5.
Load an addon from a particular path (from URL or file system).