User:Roglo/Programming Docs

Jump to navigation Jump to search

Summary bibliography

Files involved:

  • - class Bibliography and function ConvertDate(date)
  • - class Series
  • - 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)
loadNCSeriesData() - 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 SQLgetNCSeriesData() (file

[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 John_Vornholt: 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'.]

printNCSeries() - 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 George_R._R._Martin, 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)
Print() - 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.
AddSeries() - add another series (or ignore, if we already have it). After AddSeries(), the structure is not necessarily a tree.
Fixup() - organise the structure into tree.

common functions

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