Export module

This module is used to put data to Aleph. It is based on custom made webform, which is currently used to report new books by publishers.

Most important function from this module is exportEPublication(), which will do everything, that is needed to do, to export EPublication structure to the Aleph.

Varování

This whole module is highly dependent on processes, which are defined as import processes at the Czech National Library.

Varování

If you want to use export ability in your library, you should rewrite this and take care, that you are sending data somewhere, where someone will process them. Otherwise, you can fill your library’s database with crap.

Poznámka

Source code of the webform is not available at this moment (it was created by third party), but it is possible, that it will be in future. This will highly depend on number of people, which will use this project.

exception aleph.export.ExportException(message)[zdroj]
exception aleph.export.InvalidISBNException(message)[zdroj]
exception aleph.export.ExportRejectedException(message)[zdroj]
class aleph.export.PostData(epub)[zdroj]

This class is used to transform data from EPublication to dictionary, which is sent as POST request to Aleph third-party webform.

Poznámka

Class is used instead of simple function, because there is 29 POST parameters with internal dependencies, which need to be processed and validated before they can be passed to webform.

Parametry:epub (EPublication) – structure, which will be converted (see EPublication for details).
Attr:

_POST (dict): dictionary with parsed data mapping (dict): dictionary with some of mapping, which are applied to

_POST dict in post processing

Varování

Don’t manipulate _POST property directly, if you didn’t really know the internal structure and how the mapping is applied.

get_POST_data()[zdroj]
Vrací:POST data, which can be sent to webform using urllib or similar library
Typ návratové hodnoty:
 dict
aleph.export.exportEPublication(epub)[zdroj]

Send epub EPublication object to Aleph, where it will be processed by librarians.

Parametry:epub (EPublication) – structure for export