view MoinMoin/scripts/ @ 491:be33ecd58d4e

add run() methods to scripts, include version info into MoinMoin/ for epydoc imported from: moin--main--1.5--patch-495
author Thomas Waldmann <>
date Wed, 22 Mar 2006 09:55:32 +0000
parents 236f561fa21f
line wrap: on
line source
#!/usr/bin/env python
# -*- coding: iso-8859-1 -*-
    MoinMoin - clear the cache

    @copyright: 2005 by Thomas Waldmann (MoinMoin:ThomasWaldmann)
    @license: GNU GPL, see COPYING for details.

    globally delete cache files in data/pages/PageName/cache/ directories
    First change the base path and fname to match your needs.
    Then do ./

    You will usually do this after changing MoinMoin code, by either upgrading
    version, installing or removing macros. This often makes the text_html
    files invalid, so you have to remove them (the wiki will recreate them
    text_html is the name of the cache file used for compiled pages formatted
    by the wiki text to html formatter,

base = "." # directory containing the data directory
fnames = ['text_html', 'pagelinks', ] # cache filenames to delete

def run():
    import os
    pagesdir = os.path.join(base, 'data', 'pages')
    for f in os.listdir(pagesdir):
        for fname in fnames:
            cachefile = os.path.join(pagesdir, f, 'cache', fname)
if __name__ == '__main__':