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.

55 lines
969 B

17 years ago
17 years ago
  1. #!/usr/local/bin/python
  2. import sys,string
  3. sys.path.append('../internal')
  4. import otros
  5. pix = open('../internal/epnames', 'r')
  6. epnames = pix.readlines()
  7. pix.close()
  8. seasons = [(1, 'Season One'), (23, 'Season Two'), (45, 'Season Three'),
  9. (67, 'Season Four'), (89, 'Season Five')]
  10. season = 0
  11. output = open('index.html', 'w')
  12. output.write("""<html>
  13. <head>
  14. <title>Babylon 5 Episode Credits</title>
  15. <link rev=made href="mailto:genoa@mit.edu">
  16. </head>
  17. <body>
  18. <h1>Babylon 5 Episode Credits</h1>
  19. <ul>
  20. """)
  21. for i in range(0, 200):
  22. filename = "%03d" % i
  23. print filename
  24. try:
  25. handle = open(filename, 'r')
  26. handle.close()
  27. except:
  28. break
  29. if i == seasons[season][0]:
  30. output.write('</ul>\n\n<h2>' + seasons[season][1] +
  31. '</h2>\n<ul>\n')
  32. season = season + 1
  33. output.write(' <li> <a href="%03d.html">%s</a>\n' % (i,
  34. epnames[i][:-1]))
  35. output.write("""
  36. </ul>
  37. <p>
  38. <a href="/lurk/episodes.php">To the episode list</a>
  39. </body>
  40. </html>
  41. """)
  42. output.close()