Package Pyblio :: Package Format
[hide private]
[frames] | no frames]

Package Format

source code

Citation formatting layer.

Rationale: the difficult part in formatting the records is not how the records are actually laid out on a page, the keys,... but rather the actual layout of the authors, the publication information,... especially given that all the records are not complete.

So, this module is only intended to handle this specific aspect, not to compose a whole page.

The code here allows the writing of citation styles with a convenient syntax:
>>> authors  = lastFirst(all('author'))
>>> location = join(', ')['vol. ' + one ('volume'),
...                       'num. ' + one ('number'), ]
>>> citation = join(', ')[ authors , I[one('title') | 'untitled'] ]
Citing a reference is a multi-stage operation: The ideas for the syntax have been heavily borrowed from nevow's stan.

Submodules [hide private]