Fix JavaDoc URL
[cli-helper.git] / doc / index.org
index 4dde3c1..13d337f 100644 (file)
@@ -1,3 +1,6 @@
+:PROPERTIES:
+:ID:       bb4f96cd-458c-495b-a605-313b2e3e28d2
+:END:
 #+TITLE: CLI Helper - library to help implementing commandline interfaces
 
 * General
 
 - See [[https://www3.svjatoslav.eu/projects/cli-helper/apidocs/][JavaDoc]]
 
-* Library contents
-- See also: [[https://www3.svjatoslav.eu/projects/svjatoslav_commons/apidocs/][CLI Helper JavaDoc]].
+* Overview
+:PROPERTIES:
+:ID:       fef7ebc3-0f00-4b82-a926-c0cfdf709762
+:END:
+- See also: [[https://www3.svjatoslav.eu/projects/cli-helper/apidocs/][CLI Helper JavaDoc]]
 
-This library is a collection of command-line interface (CLI) helper
-functions that simplifies the process of building and maintaining CLI
-applications. The library provides several different functionalities,
-such as:
+This is library intended to facilitate creation of commandline
+applications in Java programming language. Library is packaged as an
+artifact to Maven repository. This makes it simple to add library as
+dependency to your project.
 
+Library provides following general functionalities:
 - [[id:4fca35e4-fdf1-4675-a36f-6206d6fb72cb][Asking for user input]]
-- Handling application command-line arguments
-
+- [[id:46115263-ed3d-4acc-9ec5-523d7acf87b8][Commandline arguments processing]]
 
 ** Ask for user input
 :PROPERTIES:
@@ -42,87 +48,6 @@ such as:
 - askLong() :: Asks the user to enter an integer.
 - askString() :: Asks the user to enter a string.
 
-** Command-line application CLI arguments processing
-*** Theory
-**** Commands and Arguments
-
-Every command-line application has a way of receiving input from
-users, usually in the form of command-line arguments. A command-line
-argument is a piece of information provided to the command-line
-application when it's invoked. These arguments are provided as an
-array of strings. The first element of the array (argument 0) is
-typically the name of the command itself.
-
-In the example below, 'my-video-coder' is our command, and the rest
-are arguments:
-
-#+BEGIN_SRC shell
-my-video-coder encode --input vid1.mp4 vid2.mp4 vid3.mp4 --quality 5
-#+END_SRC
-
-To better understand how these concepts work together, let's break
-down our example command:
-
-| argument # | type                   | values                     |
-|------------+------------------------+----------------------------|
-|          0 | command                | my-video-coder             |
-|          1 | subcommand             | encode                     |
-|          2 | option1                | --input                    |
-|    3, 4, 5 | parameters for option1 | vid1.mp4 vid2.mp4 vid3.mp4 |
-|          6 | option2                | --quality                  |
-|          7 | parameters for option2 | 5                          |
-
-**** Options
-
-Options are arguments that change the behavior of a command. They
-usually start with a dash (-) or double dash (--). For instance,
-'--input' and '--quality' are options in our example command.
-
-**** Parameters
-
-A parameter provides additional information to a command or
-option. For instance, 'vid1.mp4 vid2.mp4 vid3.mp4' are parameters for
-the '--input' option, and '5' is a parameter for the '--quality'
-option in our example command.
-
-**** Positional Parameters
-
-These are the arguments that follow the command and are usually
-required for the command to execute. In our example, 'encode' is a
-positional parameter.
-
-**** Subcommands
-
-Subcommands are more specific actions that a command can perform. They
-are often used with commands that have multiple functions. In our
-example, 'encode' is a subcommand of 'my-video-coder'.
-
-*** Implementation
-
-Parsing Command-line Arguments:
-- `Parameter` class is used for defining parameters with their
-  descriptions, types, and aliases. It also keeps track of whether the
-  specific parameter was present in the command line or not. This
-  information is used later in the processing.
-
-  - `DirectoryParameter`, `FileParameter`, `IntegerParameter`,
-    `StringParameter`, `NullParameter`, and `StringParameters` are
-    examples of Parameter classes, each one having unique
-    characteristics for handling specific types of parameters
-    (directories, files, integers, strings, etc.).
-
-- `ArgumentCount` class determines if a parameter can have any amount
-  of arguments (MULTI), exactly one argument (SINGLE), or no arguments
-  (NONE).
-
-- `Parser` class takes all these parameters and checks whether all
-  required arguments are provided and if they match the expected
-  format.
-
-**** Usage example
-
-TODO:
-
 * Getting the library
 Instructions to embed svjatoslav-commons library in your project:
 
@@ -134,7 +59,7 @@ Maven pom.xml file snippet:
     <dependency>
         <groupId>eu.svjatoslav</groupId>
         <artifactId>cli-helper</artifactId>
-        <version>1.0</version>
+        <version>1.1</version>
     </dependency>
     ...
 </dependencies>
@@ -150,3 +75,25 @@ Maven pom.xml file snippet:
     ...
 </repositories>
 #+END_SRC
+* TODO:
+
+List of improvement suggestions:
+
+- Add more concrete examples of how to use the library in JavaDoc
+  comments. This will help developers quickly get started and learn
+  the API.
+
+- Provide more comprehensive unit tests for CliHelper,
+  ParameterParser, Options and subclasses. This will ensure robustness
+  and stability.
+
+- Add JavaDoc comments to all classes and methods where
+  applicable. This will provide better visibility into the library's
+  functionality for developers.
+
+- Add more option types like date/time, regular expression etc.
+
+- Document best practices for using the library in a larger project.
+
+- Implement support for more complex CLI applications like option
+  dependencies and conflicts resolution.