inspirehep.modules.tools package¶
Submodules¶
inspirehep.modules.tools.authorlist module¶
Functions to parse an authorlist.
Split text in (useful) blocks, sepatated by empty lines. 1 block: no affiliations 2 blocks: authors and affiliations more blocks: authors grouped by affiliation (not implemented yet)
Returns: with two keys: authors
of the form(author_fullname, [author_affiliations])
andwarnings
which is a list of strings.Return type: dict
Guess format for affiliations. Return corresponding search pattern.
Guess whether affiliation are by number, letter or symbols (e.g. dagger). Numbers and letters should not be mixed.
Determine how affiliations are formatted. Return hash of id:affiliation
Allowed formats: don’t mix letters and numbers, lower-case letters only
1 CERN, Switzerland 2 DESY, Germany
1 CERN, Switzerland 2DESY, Germany
a CERN, Switzerland bb DESY, Germany
CERN, Switzerland # DESY, Germany
Parse author names and convert to Lastname, Firstnames. Can be separated by ‘,’, newline or affiliation tag. Returns: List of tuples: (author_fullname, [author_affiliations]) List of strings: warnings
Separate potential aff-ids . E.g.: ‘12%$’ -> [‘‘, ‘12’ ‘%’, ‘$’]
inspirehep.modules.tools.bundles module¶
Tools bundles.
inspirehep.modules.tools.ext module¶
Tools extension.
inspirehep.modules.tools.utils module¶
Utility functions for various tools.
Return an author-structure parsed from text and optional additional information.
inspirehep.modules.tools.views module¶
Tools views.
-
class
inspirehep.modules.tools.views.
InputTextForm
(*args, **kwargs)[source]¶ Bases:
inspirehep.modules.forms.form.INSPIREForm
Input form class.
Render the authorlist page for formatting author strings.
Module contents¶
Tools module.