From 222456c1e641f3c76e6f314fc496e134bd26f949 Mon Sep 17 00:00:00 2001 From: Svjatoslav Agejenko Date: Wed, 2 Apr 2025 00:28:05 +0300 Subject: [PATCH] Use emacs to compile nice looking static web page --- .gitignore | 3 + doc/index.html | 377 ------------------------------------------ tools/update web site | 22 ++- 3 files changed, 20 insertions(+), 382 deletions(-) delete mode 100644 doc/index.html diff --git a/.gitignore b/.gitignore index aea84ec..af651c9 100755 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,9 @@ /.project /.classpath /target/ + /doc/apidocs/ +/dec/index.html + /.idea/ /*.iml diff --git a/doc/index.html b/doc/index.html deleted file mode 100644 index fc778b5..0000000 --- a/doc/index.html +++ /dev/null @@ -1,377 +0,0 @@ - - - - - - - -CLI Helper - library to help implementing commandline interfaces - - - - - - -
-

CLI Helper - library to help implementing commandline interfaces

- - -
-

1. General

-
- -
- -
-

1.1. Source code

-
- -
-
-
- -
-

2. Overview

-
- - -

-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: -

- -
- -
-

2.1. Ask for user input

-
-
-
askBoolean()
Asks the user to enter a boolean value (yes/no).
-
askLong()
Asks the user to enter an integer.
-
askString()
Asks the user to enter a string.
-
-
-
-
- -
-

3. Alternatives and further reading

- -
- -
-

4. Getting the library

-
-

-Instructions to embed svjatoslav-commons library in your project: -

- -

-Maven pom.xml file snippet: -

- -
-
<dependencies>
-    ...
-    <dependency>
-        <groupId>eu.svjatoslav</groupId>
-        <artifactId>cli-helper</artifactId>
-        <version>1.2</version>
-    </dependency>
-    ...
-</dependencies>
-
-
-<repositories>
-    ...
-    <repository>
-        <id>svjatoslav.eu</id>
-        <name>Svjatoslav repository</name>
-        <url>http://www3.svjatoslav.eu/maven/</url>
-    </repository>
-    ...
-</repositories>
-
-
-
-
-
-

5. 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.
  • -
-
-
-
-
-

Author: Svjatoslav Agejenko

-

Created: 2024-04-25 Thu 17:30

-

Validate

-
- - diff --git a/tools/update web site b/tools/update web site index aebafec..a630418 100755 --- a/tools/update web site +++ b/tools/update web site @@ -1,17 +1,29 @@ #!/bin/bash +cd "${0%/*}"; if [ "$1" != "T" ]; then gnome-terminal -e "'$0' T"; exit; fi; -if [ "$1" != "T" ]; then gnome-terminal -e "'$0' T"; exit; fi - -cd "${0%/*}" cd .. +# Build the project jar file and the apidocs. mvn clean package +# Export org to html using emacs in batch mode +( + cd doc/ + + rm -f index.html + emacs --batch -l ~/.emacs --visit=index.org --funcall=org-html-export-to-html --kill + + #rm setup.html + #emacs --batch -l ~/.emacs --visit=setup.org --funcall=org-html-export-to-html --kill +) + +# Copy the apidocs to the doc folder so that they can be uploaded to the server. rm -rf doc/apidocs/ cp -r target/apidocs/ doc/ +# Upload project homepage to the server. rsync -avz --delete -e 'ssh -p 10006' doc/ n0@www3.svjatoslav.eu:/mnt/big/projects/cli-helper/ -echo -echo "Press ENTER to close this terminal" +echo "" +echo "Press ENTER to close this window." read -- 2.20.1