diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 4f224ab..8300f59 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,10 +1,12 @@ + + - - - - + + + 1723277726305 + + + + + + \ No newline at end of file diff --git a/src/standalone.java b/src/standalone.java index ab8cf08..628d107 100644 --- a/src/standalone.java +++ b/src/standalone.java @@ -1,10 +1,50 @@ public class standalone { + public static final int[] version = new int[]{0, 0, 0}; // This is used when Vitality4J is run from the terminal. // Don't make calls to anything in the standalone class when using Vitality4j as a library. // // This is useful incase the user wants a standalone psarc.exe replacement // and/or for debugging purposes without another Java project as the interface. public static void main (String[] args) { - System.out.println("Command line unimplemented."); // todo + if (args.length == 0) { + System.out.println( + "usage: vita4j [options] \n" + + "\n" + + "Options:\n" + + " -i Displays info about a PSARC archive.\n" + + " -I Displays info about a file inside a PSARC archive.\n" + + " -t Lists the Table of Contents from a PSARC archive.\n" + + " -c Creates a new PSARC archive with the specified parameters.\n" + + " -e Extracts a PSARC archive to the current working directory.\n" + + " -E Extracts one file from a PSARC archive to the current working directory.\n" + + " -x Extracts multiple files from a PSARC archive to the current working\n" + + " directory, from a TXT list of file paths. One file per line in the list.\n" + + " -y Overwrites conflicting files without asking.\n" + + " -q Quiet, avoid printing to stdout.\n" + + " -v Verbose. Prints additional information to stdout.\n" + + " -h Prints this help screen that you're reading right now.\n" + + " -a Displays version and licensing information about Vitality4j.\n" + + "\n" + + "Creating a new PSARC:\n" + + " -b Sets the blocksize in bytes when creating a new archive. (default = 64 KB)\n" + + " -g Sets the compression algorithm used\n" + + " -u Makes the PSARC uncompressed. Shorthand for \"-a none\".\n" + + " -z Compresses the PSARC with zlib. Shorthand for \"-a zlib\".\n" + + " -l Compresses the PSARC with LZMA. Shorthand for \"-a lzma\".\n" + + " -s Sets the intensity of the compression from 0 to 9. (default = 9)\n" + + "\n" + + "Examples:\n" + + " To extract an archive:\n" + + " vita4j -e data.psarc\n" + + "\n" + + " To create a new archive from a folder:\n" + + " vita4j -c ~/data/ data.psarc\n" + + "\n" + + " To create an archive with LZMA compression and a block size of 256 KB or 262144 B:\n" + + " vita4j -c ~/data/ -l -b 256 data.psarc\n" + + "\n" + + "If no options are specified, -i is presumed.\n" + ); + } } }