Welcome | Get started | Dive | Contribute | Topics | Reference | Changes | More

lino_xl.lib.tim2lino

Add functionality for importing lecacy data from a TIM database.

See tim2lino : importing legacy data from TIM.

Classes

Plugin(site, app_label, app_name, ...)

See lino.core.plugin.Plugin.

class lino_xl.lib.tim2lino.Plugin(site, app_label, app_name, app_module, needed_by, configs: dict)

Bases: Plugin

See lino.core.plugin.Plugin.

languages = None

The language distribution used in the database to import. Mandatory parameter. No default value.

use_dbfread = False

Whether to use Ole Martin Bjorndalen’s dbfread package to read the file.

When this is True, you must run “pip install dbfread”.

use_dbf_py = False

Whether to use Ethan Furman’s dbf package to read the file.

If both this and use_dbfread are False, then lino.utils.dbfreader is used.

Set it to True when reading data from a TIM with FOXPRO DBE, leave it at False when reading DBFNTX files.

When this is True, you must run “pip install enum34 dbf” (note enum34, not enum) and then you must manually patch site-packages/dbf/ver_2.py to support file names ending with ‘.FOX’ by replacing two lines of code:

# if ext.lower() != '.dbf':
if ext.lower() not in ('.dbf', '.fox'):
dbf_table_ext = '.DBF'

The file extension of TIM tables. Meaningful values are ‘.DBF’ or .FOX.

timloader_module = 'lino_xl.lib.tim2lino.timloader1'

The module that contains the TimLoader class to be used by the tim2lino fixture.

timloader_kwargs = {}

The options to pass as keyword arguments when instantiating the TimLoader class.