-
Notifications
You must be signed in to change notification settings - Fork 7
Spike Extracting Mode
Spike provides file extract functionality, files can be loaded and extracted in mutiple ways.
Config options create-zip and folder-per-archive are in common.extract-settings.
Following examples are using imaginary commands, where spike_alias is alias name for Spike runner and arc_extract is imaginary exeplar module for extracting .arc files that refers to arc_extract.1.spk module shown in diagrams.
Following diagram shows example, where we're providing folder with 2 archives.
Example command spike_alias arc_extract ~/archives.
Another example command that does the same thing as the one above spike_alias arc_extract ~/archives/archive0.arc ~/archives/archive1.arc
As a result, Spike will generate folder structure in ~/archives/ folder and extracts all files from .arc archives into it.
Creating ZIP archives can be set as create-zip option.
This option is turned on (true) by default.
Following diagram shows example, where we're providing folder the same way as the example above, but instead of making folder structure and extracting files to it, Spike makes zip archives right next to arc files.
Following diagrams shows examples, where we're providing ZIP file with 2 archives in it.
Example command spike_alias arc_extract ~/archives.zip
As a result, Spike will generate folder structure in ~/ folder and extracts all files from .arc archives within zip into it.
This option can be set as folder-per-archive.
With this option, Spike will make folders named after each .arc archive and extracts contents into them.
So files from archive0.arc will be extracted into ~/archive0/ folder, archive1.arc into ~/archive1/ and so on.
Creating ZIP archives can be set as create-zip option.
This option is turned on (true) by default.
Following diagrams shows examples, where we're providing ZIP file with 2 archives in it.
Example command spike_alias arc_extract ~/archives.zip
As a result, Spike will create single zip file ~/archives_out.zip and extracts all files from .arc archives into it.
This option can be set as folder-per-archive.
With this option, Spike will make folders inside output zip named after each .arc archive and extracts contents into them.
So files from archive0.arc will be extracted into archive0/ folder, archive1.arc into archive1/ and so on. All within single zip archive.