尖叫背包
ScreamingBackpack的Python项目详细描述
#尖叫背包
##概述
用于处理远程和本地数据资源同步的实用程序。开发用于checkm,但希望通用到可以在其他地方使用。
##安装
应该简单到
pip install ScreamingBackpack
##示例用法
该实用程序通过在数据目录中放置一个小文件(manifest文件)来工作,该文件描述文件名、它们的位置以及(如果可能的话)它们的散列(sha256)。 此文件在diff和update函数期间下载,用于确定应执行哪些其他文件操作(下载/删除)。
清单文件的格式非常简单。第一行是描述清单类型和一些其他信息的标题;
##<TYPE>## Data manifest created by ScreamingBackpack version <VERSION>
where: <TYPE> is user specified and <VERSION> is the version of SBP that created the file
标题下面的每一行描述一个正在管理的文件或文件夹。文件行如下:
3 d37b38c8411e250f55393442db47eed954354898fa958c93047d7a66956880cb 5000
I.e. A three column file in the format “local_path sha256_hash size_in_bytes”
文件夹行如下:
9 - 0
I.e. a file line with no size or hash.
二进制尖叫背包可以在三种模式下运行:
create - create a new manifest file diff - work out the difference between two manifests and print out the results update - update the local data repo tp reflect any changes made at the remote source
bin文件非常简单地包装了这些函数,这些函数可以通过如下方式导入
from screamingBackpack.manifestManager import ManifestManager
MM = ManifestManager(manType=”<TYPE>”)
- MM.createManifest(pathToManifest, # path to the root folder of the data to be managed
- manifestName=None) # specify a custom name for the manifest file (default = .dmanifest)
- MM.diffManifests(localManifestLocation, # path to local data repo
- sourceManifestLocation, # path to source or fully qualified remote url localManifestName=None, sourceManifestName=None, printDiffs=True) # Print to stdout and exit
- MM.updateManifest(localManifestLocation,
- sourceManifestLocation, localManifestName=None, sourceManifestName=None, prompt=True) # prompt user before making changes
##帮助
如果您在使用screamingbackpack时遇到任何问题,请在github上打开一个[issue](https://github.com/minillinim/ScreamingBackpack/issues)并告诉我们。
##许可证和参考
项目主页,关于源代码树的信息,文档,问题和如何贡献,请参见http://github.com/minillinim/ScreamingBackpack
此软件当前未发布
##版权所有
版权所有(c)2014 Michael Imelfort。有关详细信息,请参见license.txt。