List/extract files from archives with universal syntax
module | ||
app | ||
appname.txt | ||
config.txt | ||
install | ||
LICENSE | ||
README.txt | ||
uninstall |
A script that can list/extract files from archives, by automatically choosing the correct tool and translating the tool's input/output into the same format, when it comes to listing files. This isn't really meant to be used by people. It's supposed to act as an API for other programs that interact with archives. --- Syntax: spitzip <action> <flags> <archive> Available actions: * help - Prints this help * list - Outputs each file of archive as a json table * extract - Copy a file/folder from the archive into another folder. Flags (universal): * -tool= - Which tool to use for the archive. By default, the program guesses the best tool for the job. Available: 7z, tar Flags (extract): * -if= - Set path to copy from the archive (DO NOT use wildcards!). If set to an empty string (-if= or -if=""), it will extract the whole archive. * -of= - Set the output folder for the files. The folder has to exist. Files are replaced without asking. --- Prerequisites: * Python 3 (Version 3.4 or up) * 7-zip (on Linux, p7zip) * tar * Optional: file (for detecting mimetype) Installation: * sudo ./install * Note: Installation is not required. You can run the program portably by using ./app Uninstallation: * sudo /opt/spitzip/uninstall You can change the name of the program using appname.txt, and change other settings like installation directory and bin directory from config.txt.