slides-1.0.1.orig/ 0042755 0001750 0001750 00000000000 07735574052 012431 5 ustar doko doko slides-1.0.1.orig/slides.py 0100644 0001750 0001750 00000015021 07654533251 014254 0 ustar doko doko # Slides, a HTML slide generator # Copyright (C) 2002 Moshe Zadka, Itamar Shtull-Trauring # # This library is free software; you can redistribute it and/or # modify it under the terms of version 2.1 of the GNU Lesser General Public # License as published by the Free Software Foundation. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA """Slides, a HTML slide generator.""" __version__ = "1.0.1" import os, string, cgi, types class Lecture: """A series of slides. Arguments: name -- the name of the presentation, and then pass *slides -- Slide instances. When you're done call renderHTML(). """ css = None def __init__(self, name, *slides): self.name = name self.slides = slides def renderHTML(self, directory, basename, css=None): """Render all slides and their index. Arguments: directory -- directory in which to save slides. basename -- will be called with % index, so e.g. "slide-%d.html". [css] -- path to CSS file to use in output. """ self.css = css self.renderSlide(self.slides[0], 1, directory, basename, prev=0) for i in range(1, len(self.slides)-1): self.renderSlide(self.slides[i], i+1, directory, basename) i = len(self.slides)-1 self.renderSlide(self.slides[i], i+1, directory, basename, next=0) self.renderIndex(directory, basename) def getHeader(self): """Return the header for HTML pages.""" result = '\n
\n