From 66922d5d4355b1e466fccb37a9ea5398a3062c90 Mon Sep 17 00:00:00 2001 From: Fierelier Date: Thu, 4 Jan 2024 06:53:53 +0100 Subject: [PATCH] Enhance help --- README.txt | 12 ++++++++---- module/main.py | 14 +++++++++----- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/README.txt b/README.txt index d25118e..68610e8 100644 --- a/README.txt +++ b/README.txt @@ -9,14 +9,18 @@ Syntax: spitzip 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. -if= sets -the path to copy from the archive (DO NOT use wildcards!), -of= sets the output -folder. The output folder has to exist. Files are replaced without asking. + * extract - Copy a file/folder from the archive into another folder. -Universal flags: +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: diff --git a/module/main.py b/module/main.py index f05666d..e987202 100644 --- a/module/main.py +++ b/module/main.py @@ -46,13 +46,17 @@ Syntax: "''' +sys.argv[0]+ '''" 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. -if= sets -the path to copy from the archive (DO NOT use wildcards!), -of= sets the output -folder. The output folder has to exist. Files are replaced without asking. + * extract - Copy a file/folder from the archive into another folder. -Universal flags: +Flags (universal): * -tool= - Which tool to use for the archive. By default, the program guesses -the best tool for the job. Available: 7z, tar\ +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.\ ''') sys.exit(exitCode)