Babel extractors#

Babel extractors can be specified in configuration files.

For OCDS, you can specify:

[ocds_codelist: schema/*/codelists/*.csv]
headers = Title,Description,Extension
ignore = currency.csv

in babel_ocds_codelist.cfg, and:

[ocds_schema: schema/*/*-schema.json]

in babel_ocds_schema.cfg.

For BODS, you can specify:

[ocds_codelist: schema/codelists/*.csv]
headers = title,description,technical note

in babel_bods_codelist.cfg, and:

[ocds_schema: schema/*.json]

in babel_bods_schema.cfg.

ocds_babel.extract.extract_codelist(fileobj, keywords, comment_tags, options)[source]#

Yields each header, and the specified field values of a codelist CSV file.

ocds_babel.extract.extract_schema(fileobj, keywords, comment_tags, options)[source]#

Yields the “title” and “description” values of a JSON Schema file.

ocds_babel.extract.extract_extension_metadata(fileobj, keywords, comment_tags, options)[source]#

Yields the “name” and “description” values of an extension.json file.