generate-zip-manifest.py 333 B

1234567891011121314
  1. #!/usr/bin/env python
  2. import zipfile
  3. import sys
  4. def main(zip_path, manifest_out):
  5. with open(manifest_out, 'w') as manifest, \
  6. zipfile.ZipFile(zip_path, 'r', allowZip64=True) as z:
  7. for name in sorted(z.namelist()):
  8. manifest.write(name + '\n')
  9. return 0
  10. if __name__ == '__main__':
  11. sys.exit(main(*sys.argv[1:]))