Package Pyblio :: Module Registry
[hide private]
[frames] | no frames]

Module Registry

source code

Support for RIP files.

RIP files are files containing registering information for schemas, and extension classes customized for these schemas (like importers, exporters, citation formatters,...)

First, you need to parse a few RIP repositories with parse, then you can browse the results with schemas, getSchema and get.

Classes [hide private]
  RIP
A RIP object represents a dynamic class that can be loaded on demand, and that has been registered via the Registry system.
  AdapterRIP
A special RIP that keeps the description of an Adapter.
  _RIPCategory
Functions [hide private]
 
get(schema, category)
Return the extensions in a given category, for a given schema.
source code
 
getSchema(schema)
Return the Pyblio.Schema.Schema corresponding to an identifier returned by schemas.
source code
 
schemas()
Return the list of known schemas.
source code
 
reset()
Forget all the schemas and extensions previously parsed with parse.
source code
 
load_settings(directory)
Parse the specified directory, and load all the .rip files it contains.
source code
 
load_default_settings()
Load the RIP files contained in the default system-wide and user-specific directories.
source code
Variables [hide private]
  _schema = {}
  _base = '/home/fred/devel/pyblio/1.3/core/Pyblio'
  _user = '/home/fred/.pyblio'
  RIP_dirs = {'system': '/home/fred/devel/pyblio/1.3/core/Pyblio...
  _adapt_re = re.compile(r'([\w\d\.]+)\s*->\s*([\w\d\./]+)')
Function Details [hide private]

load_default_settings()

source code 

Load the RIP files contained in the default system-wide and user-specific directories.

The system directory is in '<installation prefix>/Pyblio/RIP', and the user directory is '~/.pyblio'.

Variables Details [hide private]

RIP_dirs

Value:
{'system': '/home/fred/devel/pyblio/1.3/core/Pyblio/RIP',
 'user': '/home/fred/.pyblio'}