bikeshed/update/manifest.py
def createManifest(path, dryRun=False):
    '''Generates a manifest file for all the data files.'''
    manifests = []
    try:
        for absPath, relPath in getDatafilePaths(path):
            if relPath in knownFiles:
                pass
            elif relPath.partition("/")[0] in knownFolders:
                pass
            else:
                continue
            with io.open(absPath, 'r', encoding="utf-8") as fh:
                manifests.append((relPath, hashFile(fh)))
    except Exception as err:
        raise
    if not dryRun:
        try:
            with io.open(os.path.join(path, "manifest.txt"), 'w', encoding="utf-8") as fh:
                fh.write(unicode(datetime.utcnow()) + "\n")
                for p,h in sorted(manifests, key=keyManifest):
                    fh.write("{0} {1}\n".format(h, p))
        except Exception as err:
            raise
Generates a manifest file for all the data files.
Generates a manifest file for all the data files.
Generates a manifest file for all the data files .
def createManifest(path, dryRun=False):
    manifests = []
    try:
        for absPath, relPath in getDatafilePaths(path):
            if relPath in knownFiles:
                pass
            elif relPath.partition("/")[0] in knownFolders:
                pass
            else:
                continue
            with io.open(absPath, 'r', encoding="utf-8") as fh:
                manifests.append((relPath, hashFile(fh)))
    except Exception as err:
        raise
    if not dryRun:
        try:
            with io.open(os.path.join(path, "manifest.txt"), 'w', encoding="utf-8") as fh:
                fh.write(unicode(datetime.utcnow()) + "\n")
                for p,h in sorted(manifests, key=keyManifest):
                    fh.write("{0} {1}\n".format(h, p))
        except Exception as err:
            raise
def createManifest ( path , dryRun = False ) : manifests = [ ] try : for absPath , relPath in getDatafilePaths ( path ) : if relPath in knownFiles : pass elif relPath . partition ( "/" ) [ 0 ] in knownFolders : pass else : continue with io . open ( absPath , 'r' , encoding = "utf-8" ) as fh : manifests . append ( ( relPath , hashFile ( fh ) ) ) except Exception as err : raise if not dryRun : try : with io . open ( os . path . join ( path , "manifest.txt" ) , 'w' , encoding = "utf-8" ) as fh : fh . write ( unicode ( datetime . utcnow ( ) ) + "\n" ) for p , h in sorted ( manifests , key = keyManifest ) : fh . write ( "{0} {1}\n" . format ( h , p ) ) except Exception as err : raise
Generates a manifest file for all the data files.
Generates a manifest file for all the data files .
'''Generates a manifest file for all the data files.'''
path
dryRun