The Lurker's Guide to Babylon 5
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

320 lines
11 KiB

17 years ago
17 years ago
17 years ago
17 years ago
10 years ago
17 years ago
10 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
  1. The Lurker's Guide to the Lurker's Guide
  2. ========================================
  3. There are three main components to the Guide. I'll refer to them by their
  4. local URLs on www.midwinter.com.
  5. * [/lurk](lurk) - the main top-level directory.
  6. * [/lurk/ftp](lurk/ftp) - the former contents of the B5 directory on
  7. midwinter.com's anonymous FTP service; this is linked to from several
  8. places in the Guide.
  9. * Some miscellaneous utilities
  10. /lurk
  11. -----
  12. The first section, which is the bulk of the site, is a directory tree
  13. of static HTML files with a few server-parsed HTML files (for
  14. server-side includes) thrown in, plus one short PHP script.
  15. Inside that directory are a bunch of subdirectories, mostly
  16. corresponding to the major sections of the site. I'll get to them
  17. individually in a moment, but first a word on how some of the files
  18. get generated.
  19. ### gen.py - building the episode pages
  20. The biggest thing to know about is a Python script called "gen.py",
  21. a version of which lives in each of the directories that contains
  22. per-episode HTML files. The script is responsible for assembling a
  23. static HTML file out of a header section (generated for each episode;
  24. it includes the episode's title among other things), a body file, and
  25. a footer section.
  26. The body files contain the meat of the pages. They have the same
  27. filenames as the HTML files, minus the .html extension. In most cases
  28. that's just the 3-digit episode number, e.g. /lurk/guide/056.html
  29. contains the body file "056" from the guide subdirectory. When I want
  30. to add a new comment to the page for episode 33, for example, I cd into
  31. the guide directory, edit the file "033", then run "gen.py 033". The
  32. result is a new version of 033.html, with the old version moved aside
  33. to #033.html as a precaution.
  34. One other thing some of the gen.py versions do is add timestamps to items.
  35. The idea is that when I modify a page, I want to highlight the change so
  36. people who've already read the previous version can quickly scroll to the
  37. new stuff. To that end, gen.py looks for a special token "@@@" (which
  38. must by followed by whitespace or end-of-line) in the body file. When
  39. it finds the token, it replaces it with "@@@nnn" where nnn is the current
  40. timestamp in UNIX time\_t format. This change is made to the body file
  41. itself. Then, when gen.py generates the HTML file from a body file, it
  42. inserts the date in bold wherever it sees a recent timestamp. Once a day
  43. a script regenerates all the HTML files so that the date markers go away
  44. after a while (keeping them in makes the pages look ugly and makes it
  45. hard to quickly locate new items).
  46. When you see a file "skel", it's a prototype body file. I copy that to
  47. the appropriate filename when a new episode/novel/etc. comes out.
  48. In many of the subdirectories you'll see a "genall.csh" script. This
  49. is just a shortcut that runs "gen.py" for each episode. I only use
  50. this when I make a change to the structure of the page headers/footers
  51. and want to apply it everywhere.
  52. Also, in the top-level directory there's a "gen" script. This runs
  53. gen.py in each of the subdirectories. I use that when, for example, I
  54. add a picture for an episode and want it to be displayed on all the
  55. pages for that episode.
  56. What's under /lurk
  57. ------------------
  58. ### background
  59. "The story so far" for each episode of seasons 1-4.
  60. Season 5 still needs to be written. The user-accessible files here are
  61. all .shtml files. You'll notice there aren't any body files here.
  62. Instead, background/gen.py uses a few other source files. There are
  63. several different introductory summaries, which are in the sum-\*
  64. files. For example, sum-66 summarizes the story up to and including
  65. episode 66, and is included as the first part of the backgrounds for
  66. episodes 67 and later. After the appropriate sum-\* file is included,
  67. gen.py looks in story.html. That file contains per-episode paragraphs
  68. that are included in the "More recently..." section of the background
  69. pages, under the introductions. Only the paragraphs for episodes
  70. between the summary and the current episode are included, e.g. for
  71. episode 75, gen.py includes sum-66 and the paragraphs for episodes
  72. 67-74.
  73. ### chars
  74. Bios of some of the characters. These are linked to from the
  75. "Universe" section. Simple flat HTML files.
  76. ### comic
  77. Guide pages for the comic series. <a href="#gen.py">Body files and gen.py</a>.
  78. ### countries
  79. The only HTML file directly under here is index.html, which is a list of
  80. all the countries for which I have schedule information. Each country
  81. has a subdirectory under here (the directory name is generally the
  82. country's 2-letter country code). One pseudo-country of note is "master",
  83. which contains the master episode list with the episodes in the correct
  84. order (the original US airing order was slightly wrong storywise).
  85. Inside each country's directory is an eplist.html file with the schedule
  86. for that country, plus symbolic links to the various episode-guide
  87. subdirectories. By using relative paths in my URLs, I let the browser
  88. remember which country's schedule the user was looking at without resorting
  89. to cookies (which didn't yet exist as a concept when this site first
  90. started!) For example, /lurk/countries/se/eplist.html has a link to
  91. "guide/056.html", which is really the same file as /lurk/guide/056.html
  92. since /lurk/countries/se/guide is a symlink to /lurk/guide. But since the
  93. browser doesn't know that, 056.html's link back to the episode page is
  94. "../eplist.html" which goes back to the Swedish schedule.
  95. index.html is a link to eplist.html in the country directories.
  96. There is a "mkcountry.sh" script to set up a new country directory. There
  97. are also skeleton episode lists for all 5 seasons (skel, skel2, skel3, etc.)
  98. When I edit a country's schedule I use the "print-weeks.py" script, which
  99. is described later, so I don't have to hand-type dates.
  100. ### credits
  101. Episode credits.
  102. ### episodes.php
  103. A short PHP script that does a simple lookup of the user's domain name to
  104. figure out which country's episode list to show. Perhaps less relevant now
  105. that the show is pretty much off the air, but when different seasons were
  106. showing in different countries simultaneously this was handy for users.
  107. ### eplist.html
  108. A symlink to the US episode list, so that any links to "../eplist.html" in
  109. the the non-country-based guide directories will go somewhere useful. (See the
  110. discussion of the "countries" directory above.)
  111. ### footer
  112. The standard page footer used throughout the site. Not used programmatically,
  113. but I load this into my text editor when I create a new page.
  114. ### gen
  115. Script that runs gen.py for an episode in each of the episode-related
  116. subdirectories.
  117. ### gif
  118. Pretty self-explanatory. All the non-navigation-related images live here.
  119. (Some of them are JPEGs despite the directory name.)
  120. ### guide
  121. The episode guide pages.
  122. ### help.html
  123. The site FAQ. It's referred to by the name "help" instead to avoid confusion
  124. with the Usenet B5 FAQ.
  125. ### index.html
  126. Symlink to lurker.html.
  127. ### internal
  128. Data files used by gen.py and CGIs:
  129. * comicnames - Titles of comics, one title per line.
  130. * dom-error.html - Error message returned when the episode-list selection script
  131. can't find an episode list to show.
  132. * epnames - Titles of episodes, one title per line, starting with episode 0.
  133. Note that there are a lot of dummy lines because of gaps in episode numbering.
  134. * lu-\* - Headers and footers used by gen.py.
  135. * novelnames - Titles of novels, one title per line, used by novels/gen.py.
  136. * otros.py - Library with common functions used by various gen.py versions.
  137. * picnames - Names of images to display in episode guide page headers. Each of
  138. these names is relative to /lurk/gif/XXX where XXX is the episode number. Note
  139. that there are a lot of dummy lines because of gaps in episode numbering.
  140. ### lastmod.html
  141. List of episode guide and synopsis pages, ordered by modification time.
  142. Generated by the "lastupdate.py" utility.
  143. ### lurker-nobg.html
  144. Home page without the black background, since some people find custom
  145. backgrounds annoying. This is automatically generated from lurker.html
  146. via a cron job that runs "make" in the top-level directory.
  147. ### lurker.html
  148. The home page.
  149. ### Makefile
  150. Once an hour this Makefile is used to rebuild lurker-nobg.html, and once
  151. a day it's used to make sure I haven't forgotten to run gen.py on something.
  152. It also updates the b5tvlist.txt file in the FTP archive.
  153. ### making
  154. The "Making of B5" section of the site. Flat HTML files.
  155. ### maps
  156. Imagemaps for navbar.
  157. ### misc
  158. Miscellaneous documents that don't fit elsewhere, e.g. a blurb about
  159. why Claudia Christian left the show.
  160. ### nav
  161. Navigational images. A secondary function is that its index.html is the
  162. "preload your image cache here" page, which speeds up the site for folks
  163. by letting them suffer all the pain of nav image downloading in one shot.
  164. ### novels
  165. Novel guide pages. This section is incomplete -- there aren't pages yet
  166. for the latest round of novels.
  167. ### p5
  168. Results of the Poll 5 viewer survey for each episode.
  169. ### Production
  170. Button and nav images in their original lossless-compressed forms.
  171. ### reference
  172. The "Reference" section of the site. Mostly flat HTML files, but a couple
  173. of the pages have server-side includes that bring in text files from the
  174. FTP area.
  175. ### renew.html
  176. Not referenced any more, but perhaps of historical amusement.
  177. ### resources
  178. The "Other Resources" section of the site. Flat HTML files.
  179. ### src
  180. Contains some random support code. More on this later.
  181. ### synops
  182. Episode synopses.
  183. ### toc.html
  184. Site map.
  185. ### universe
  186. The "Universe and Characters" section of the site. Flat HTML files. Season
  187. 5 still needs to be written up.
  188. ### volunteers.html
  189. An exercise in naivete; I ended up doing all this myself!
  190. ### vqt.html
  191. JMS message about B5 being ranked #1 by Viewers for Quality Television.
  192. ### welcome.html
  193. Introduction to the site after the switch to the current look and feel.
  194. ### whatsnew.html
  195. The What's New page. When this gets to be big, I put all the old
  196. items in archive what's-new pages and link to them at the bottom of this
  197. page.
  198. /lurk/ftp
  199. ---------
  200. midwinter.com used to host an FTP archive with text files and images; these
  201. are now all accessible via the Lurker's Guide and are stored in the "ftp"
  202. subdirectory.
  203. See the FTP index file (available in both
  204. <a href="ftp/Index">text</a>
  205. and
  206. <a href="ftp/index.html">HTML</a>)
  207. for descriptions of the various files in the FTP archive. The Lurker's
  208. Guide points to various files here -- including some server-side include
  209. references.
  210. Miscellaneous utilities
  211. -----------------------
  212. There are a few utilities whose source you'll find in /lurk/src unless
  213. otherwise noted. Some have been discussed above, but here's a list:
  214. ### gen-guide.sh
  215. This is run once a day from a cron job. It regenerates all the guide pages.
  216. If a regenerated page doesn't differ from the old version, the old version
  217. is moved back into place to preserve its modification date. The purpose
  218. here is to expire the timestamps on new items in the guide pages (see the
  219. discussion of the gen.py script above).
  220. ### lastupdate.py
  221. Run once an hour from cron; this updates /lurk/lastmod.html and is pretty
  222. self-explanatory.