gallerifrey.py
def cleanOldFiles():
    """Cleans up unused thumbnails
and image pages.
It also nukes all the HTML pages, but those get
re-made every time anyway."""
    imgs = set(getImageFiles())
    thumbs = set(getImageFiles(where=THUMBDIR))
    leftoverThumbs = thumbs - imgs
    htmlfiles = getHTMLFiles()
    print "Deleting old HTML and {0} old thumbnails...".format(len(leftoverThumbs))    
    for i in leftoverThumbs: os.remove(os.path.join(THUMBDIR, i))
    for i in htmlfiles: os.remove(os.path.join(HTMLDIR, i))
Cleans up unused thumbnails
and image pages.
It also nukes all the HTML pages, but those get
re-made every time anyway.
Cleans up unused thumbnails
and image pages.
It also nukes all the HTML pages, but those get
re-made every time anyway.
Cleans up unused thumbnails and image pages . It also nukes all the HTML pages but those get re - made every time anyway .
def cleanOldFiles():
    imgs = set(getImageFiles())
    thumbs = set(getImageFiles(where=THUMBDIR))
    leftoverThumbs = thumbs - imgs
    htmlfiles = getHTMLFiles()
    print "Deleting old HTML and {0} old thumbnails...".format(len(leftoverThumbs))    
    for i in leftoverThumbs: os.remove(os.path.join(THUMBDIR, i))
    for i in htmlfiles: os.remove(os.path.join(HTMLDIR, i))
def cleanOldFiles ( ) : imgs = set ( getImageFiles ( ) ) thumbs = set ( getImageFiles ( where = THUMBDIR ) ) leftoverThumbs = thumbs - imgs htmlfiles = getHTMLFiles ( ) print "Deleting old HTML and {0} old thumbnails..." . format ( len ( leftoverThumbs ) ) for i in leftoverThumbs : os . remove ( os . path . join ( THUMBDIR , i ) ) for i in htmlfiles : os . remove ( os . path . join ( HTMLDIR , i ) )
Cleans up unused thumbnails
and image pages.
Cleans up unused thumbnails and image pages .
"""Cleans up unused thumbnails
and image pages.
It also nukes all the HTML pages, but those get
re-made every time anyway."""