Skip to content

Add script to create testdata ZIP for multi-file slide; sort version 2 testdata slides after version 1 - #159

Merged
bgilbert merged 2 commits into
openslide:mainfrom
bgilbert:zip
Aug 12, 2026
Merged

Add script to create testdata ZIP for multi-file slide; sort version 2 testdata slides after version 1#159
bgilbert merged 2 commits into
openslide:mainfrom
bgilbert:zip

Conversation

@bgilbert

Copy link
Copy Markdown
Member

There are multiple footguns when creating ZIPs by hand: files could be set read-only, owner/group IDs could be included, compression could be disabled, or a top-level directory could be included (as is conventional for other kinds of dist archives). Add a script that creates the ZIP file correctly and also prints the resulting SHA-256 for convenience.

When creating the openslide-testdata HTML indexes, foo.zip sorts after foo-v2.zip, but foo sorts before foo-v2. Sort indexes on filename stems instead of entire filenames.

There are multiple footguns when doing it by hand: files could be set
read-only, owner/group IDs could be included, compression could be
disabled, or a top-level directory could be included (as is conventional
for other kinds of dist archives).  Add a script that creates the ZIP file
correctly and also prints the resulting SHA-256 for convenience.

Signed-off-by: Benjamin Gilbert <bgilbert@cs.cmu.edu>
`foo.zip` sorts after `foo-v2.zip`, but `foo` sorts before `foo-v2`.  Sort
HTML indexes on filename stems instead of entire filenames.

Drop redundant sorting of directory names in top-level index.

Signed-off-by: Benjamin Gilbert <bgilbert@cs.cmu.edu>
@openslide-bot

Copy link
Copy Markdown
Member

DCO signed off ✔️

All commits have been signed off. You have certified to the terms of the Developer Certificate of Origin, version 1.1. In particular, you certify that this contribution has not been developed using information obtained under a non-disclosure agreement or other license terms that forbid you from contributing it under the GNU Lesser General Public License, version 2.1.

@bgilbert
bgilbert merged commit d41c35d into openslide:main Aug 12, 2026
2 checks passed
@bgilbert
bgilbert deleted the zip branch August 12, 2026 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants