User:Roglo/Programming Docs

Summary bibliography
Files involved:
 * biblio.py - class Bibliography and function ConvertDate(date)
 * series.py - class Series
 * common.py - fuctions such as displayTitle
 * ea.cgi - displays the Summary bibliography, which includes series.

class Bibliography:
 * used to display Summary bibliography (ea.cgi), Chronological bibliography (ch.cgi), Alphabetical bibliography (ae.cgi), Award bibliography (eaw.cgi)


 * - loads records for all relevant fiction series (i.e. such series that NOVEL, COLLECTION, OMNIBUS, and (with the fix) SHORTFICTION titles by this author exist). For every relevant series, its parent, grandparent etc. up to the top-level series are added. The initial set of relevant series is defined in a query in function  (file SQLparsing.py).

[A side effect of this way of building the list of series is that while series returned from SQLgetNCSeriesData are sorted alphabetically, the final order of top-level series is not, as you can see on Summary bibliography of : one of his books is in 'A Time to...' subseries, and so its parent's parent 'Star Trek Universe' series is displayed before 'Babylon 5 Universe'.]


 * - display all works in the loaded series, skipping ANTHOLOGY ttype and removing displayed works from the works list. [Example of this ANTHOLOGY problem is Summary bibliography of, where both anthologies and novels are in the same 'Wild Cards' series, so anthologies would be 'sucked in' to the fiction series and we want to display them separately.]

class Series:
 * tree-like structure used to store series info (used as Bibliography.tree)


 * - display all works from given list 'works' except those having given ttype 'nottype'. Uses HTML lists to represent the tree-like structure of the series.
 * - add another series (or ignore, if we already have it). After AddSeries, the structure is not necessarily a tree.
 * - organise the structure into tree.

common functions

- Arguments include : when == SERIES_TYPE_NC, '[SF]', '[C]', or '[A]' is displayed for SHORTFICTION, COLLECTION and ANTHOLOGY ttype of the title.