f.write(data)
                count += 1
                print 'Re-generated file %s...' % fileloc
            except Exception, e:
                print e
                continue

    print 'Regenerated %d files from cache.' % count


if __name__ == "__main__":
    import sys

    if len(sys.argv) < 2:
        sys.exit("Usage: %s <HarvestMan cache file>" % sys.argv[0])

    # Pick up modules from parent
    # directory.
    sys.path.append("..")
    from utils import HarvestManCacheManager
    from common import Initialize

    Initialize()
    try:
        cm = HarvestManCacheManager(sys.argv[1])
        build_site(cm.read_project_cache())
    except OSError, e:
        print e
    except Exception, e:
        print e
Пример #2
0
        if d.has_key('headers'):
            entry = d['headers']
            if entry:
                shelf[url] = d['headers']

    shelf.close()
    print 'Wrote URL headers to %s.' % dbmfile

if __name__=="__main__":
    import sys

    if len(sys.argv)<2:
        sys.exit("Usage: %s <HarvestMan cache file>" % sys.argv[0])
        
    # Pick up modules from parent
    # directory.
    sys.path.append("..")
    from utils import HarvestManCacheManager
    from common import Initialize

    Initialize()
    try:
        cm=HarvestManCacheManager(sys.argv[1])
        dump_headers(cm.read_project_cache(), sys.argv[1])
    except OSError, e:
        print e
    except Exception, e:
        print e
        

Пример #3
0
        if d.has_key('headers'):
            entry = d['headers']
            if entry:
                shelf[url] = d['headers']

    shelf.close()
    print 'Wrote URL headers to %s.' % dbmfile

if __name__=="__main__":
    import sys

    if len(sys.argv)<2:
        sys.exit("Usage: %s <HarvestMan cache file>" % sys.argv[0])
        
    # Pick up modules from parent
    # directory.
    sys.path.append("..")
    from utils import HarvestManCacheManager
    from common import Initialize

    Initialize()
    try:
        cm=HarvestManCacheManager(sys.argv[1])
        dump_headers(cm.read_project_cache(), sys.argv[1])
    except OSError, e:
        print e
    except Exception, e:
        print e
        

Пример #4
0
    print 'Regenerated %d files from cache.' % count
                
if __name__=="__main__":
    import sys

    if len(sys.argv)<2:
        sys.exit("Usage: %s <HarvestMan cache file>" % sys.argv[0])
        
    # Pick up modules from parent
    # directory.
    sys.path.append("..")
    from utils import HarvestManCacheManager
    from common import Initialize

    Initialize()
    try:
        cm=HarvestManCacheManager(sys.argv[1])
        build_site(cm.read_project_cache())
    except OSError, e:
        print e
    except Exception, e:
        print e