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

Package Pyblio.Format

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
  • Base: (Base classes of the formatting code)
  • Date: Date formatting functions.
  • DSL: Basic syntactic elements used to format a citation.
  • Generator: A base generator, specialized for every output style.
  • HTML: Transformation of the formatted record into an HTML representation.
  • Misc: Miscellanous formatting helpers.
  • OpenOffice
  • Pages
  • Person
  • S2: (Data structures for stage 2 of the formatter)
  • S3: (Stage 3 objects, ie abstract representation of the actual layout)
  • Text: Transformation of the formatted record into a textual representation.

Generated by Epydoc 2.1 on Sun Sep 24 23:52:43 2006 http://epydoc.sf.net