caligula
caligula copied to clipboard
Handle extracting from .zip files
Is your feature request related to a problem? Please describe.
Lots of disk images are distributed via zip files. We should be able to handle those automatically.
This wasn't implemented earlier because zip files are an archive format and I was unsure how I would handle the multi-file case.
Describe the solution you'd like
If a zip file is provided, find the most suitable file to image inside, and ask the user to burn that one.
For example, let's say we have these items in a zip file:
- something-arm64-whatever.iso (8GiB)
- LICENSE (2KiB)
- README (1KiB)
we would obviously want to pick something-arm64-whatever.iso.
Probably the algorithm would go something like this:
- Find the first file with extension .iso or .img. If there are multiple files, bail and ask the user to pick a specific file in the zip file, with an autocompletey searchy prompt.
- Find the largest file.
In both cases, we would obviously ask the user to confirm that this is indeed the file that they want.
Describe alternatives you've considered
N/A
Additional context
N/A