summaryrefslogtreecommitdiff
path: root/Mailman/Archiver/HyperArch.py
Commit message (Collapse)AuthorAgeFilesLines
...
* changed old document template's #var archivedate to be %(archivedate)s.cotton1998-11-091-1/+1
| | | | scott
* TOC_entry_template: generate the entire "Text" table cell (see below).bwarsaw1998-11-061-13/+48
| | | | | | | | | | | | | | | | | | html_TOC(): We're even more sophisticated when generating the Text cell. We first look for the .txt.gz file and then the .txt file, plunking in the link and some extra explanatory text depending on what we find. If we find nothing, we suppress the entire cell. Also, we calculate the size (approximately) and give an indication in the cell text. ALSO: it is realized that nothing special has to be handled to promote .txt to .txt.gz when gzip `suddenly appears'. The current algorithm already handles this. Note there's not much we can do if it suddenly disappears (since we can't un-gzip it if the module's not available!). import sys at top of file instead of multiple places where used. also convert all sys.stderr.write()'s to self.message() so they'll honor the VERBOSE flag.
* removed the os.umask in HyperArchive.__init__, as this is now taken carecotton1998-11-051-6/+0
| | | | | | of with the integration of all open's and mkdir's with the corresponding functions in Utils. scott
* gzip'ing of the raw text file is only enabled when gzip, and thusbwarsaw1998-11-051-15/+25
| | | | | | | | | | | | | | | | | | | zlib, can be imported. However zlib is not a standard Python module so it may not exist. In that case, use the raw text file. Specific changes: Try to import gzip globally. If this fails, set gzip=None for test down below. TOC_entry_template, use %(gzip)s to conditionalize htmlToc(): set the key 'gzip' to '.gz' or '' depending on the value of gzip update_dirty_archives(): factor out file names so 1) they don't have to be recalculated more than once, and 2) so the lines are < 80 chars wide! Also execute gzip algorithm only if gzip is true, and thus the gzip module successfully imported.
* TOC_entry_template: The raw text file is stored on disk as a txt.gz file.bwarsaw1998-11-051-1/+1
|
* Changes to avoid having to chmod files, which may fail.bwarsaw1998-11-041-3/+9
| | | | | | | | | | | Import open_ex() from Mailman.Utils and assign it to open in the module's globals, so this gets picked up before builtin open. Saves rewriting lots of occurances of open(), but could be confusing when reading a method. Hmmm... Changes to the default values for DIRMODE and FILEMODE. HyperArchive.add_article(): use mkdir() from Mailman.Utils
* TQS (triple quoted strings) formatting mods for more Emacs friendlybwarsaw1998-11-031-19/+21
| | | | | | | | code. Coding style hint: When TQS'ing HTML, please use single quotes instead of double quotes. It is much more common to find double quotes in HTML, which screws up font-lock when DQTQS'es are used :-)
* changed the syntax ofcotton1998-10-261-2/+1
| | | | | | | | | import Mailman.<module> <module> = Mailman.<module> to from Mailman import <module> I didn't realize you could do this, thanx for letting me know, Barry scott
* code cleanup: put all the web archive related stuff into it's own subcotton1998-10-221-0/+967
package. Details: changed Makefile to add the sub package as a directory to make recursively in changed configure to make the replacements to Mailman/Archiver/Makefile.in changed Mailman/Makefile.in to add Archiver as a sub package moved Mailman/Archiver.py to Mailman/Archiver/Archiver.py and Mailman/Hyper* to Mailman/Archiver Mailman/pipermail.py to Mailman/Archiver/ created Mailman/Archiver/__init__.py to do a "from Archiver import *" in order to make it's interface identical to previously. import change: changed imports to import Mailman.<module> from import <module> in order to accomodate the package import semantics, also localized <module> by calling <module> = Mailman.<module>. see diffs for details if this sounds confusing, it's not. this change was applied to all of the moved files except pipermail, which didn't need it. did a basic new installation test to make sure all the Makefile/configure changes took place atleast basically correctly. scott