A couple of years I had not been back to this project.
What I thought would be a minor update eventually came to be a major release :-)
Various contributions, comment line patterns, 64bits port for Java...
July, 15th 2013
Execution contexts and faster python transformation tools.
Dec, 9th 2011
You guys start contributing and that's GREAT!
Text edition facilities, and many other improvements (non blocking execution, telnet...)
Oct, 1st 2009
>>> [aroyer-cli] <<<
(The main location of the project remains this page).
This 'Hello world' example shows the direct relationship
between the XML resource file and the CLI execution of the user-defined function 'sayHello()' for instance.
Here is list of the main features of the CLI toolkit:
The user can use left and right arrows, begin and end, delete and backspace keys for command line edition.
The user can use up and down arrows to navigate through the command line history.
Completion and help:
The user has facilities to get into the set of commands.
The CLI toolkit automatically manages completion,
and help can be set for every keyword and parameter.
User-defined commands can give access to user-defined menus,
which may contain other sets of user-defined commands,
and so on...
XML resource file:
All the command lines syntax can be described in an XML resource file, natively managing keywords, parameters, tags...
This XML resource file provides the ability to directly insert the final native calls attached to each command,
making the link with a global application.
Automatic documentation generation:
Based on the XML resource file, the CLI toolkit provides a stylesheet automatically generating CLI documentations.
Input/output can be easily redirected.
The CLI toolkit currently gives support for the following regular input/output devices:
console, telnet connections, files and strings.
But you may implement your own intput/output device for your special needs.
An inner traces management system is available with the toolkit.
How does it work?
Considering you already have the user code to execute at end,
all you have to do is the following:
Edit an XML resource file;
Transform the XML resource file into target language code;
Integrate the result of the transformation.
Please refer to the user guide for detailed instructions.
Here is a list of possible interests you could have in this projects:
Text-based user interface:
The CLI toolkit basically aims to implement text-based user interfaces.
Graphical user interfaces are generally more attractive,
however text-based interfaces also have their advantages:
few means prerequesits,
integration facilities (see automation below),
Monitoring and debug:
It is sometimes useful to have a secondary user interface,
to monitor and debug an application.
You can easily define a specific configuration file syntax with the CLI toolkit.
Therefore, you could use it instead of .ini or XML files.
Since CLI is text-based, it is compatible with automation.
Automated test tools generally need to interact with tested equipments or softwares.
The CLI toolkit is an easy way to implement an entry point on target equipments for unit tests.
The CLI toolkit can be used for its command line parsing ability,
making by that way compilers of simple syntaxes.
This open source software, written by Alexis Royer, is provided under BSD-like license.
Bug(major)! Java cli.dll does not compile anymore with g++ (GCC) 4.7.3 (-mno-cyygwin unknown option)
Bug(major)! TelnetServer: TelnetServer lost clients were not correctly unregistered (Dinesh Balasubramaniam's contribution)
This caused frenzy loops on select() calls with tk_stl implementation
TelnetServer could even accept no more clients with tk_inner implementation once the max number of concurrent clients has been reached
Bug(major)! cli2cpp.py --static bad generation
Bug(major)! " or \ characters in <help/> contents cause compilation errors
Bug(major)! cli2java.py: infinite generation for backward tag[@ref] within tag[@id/@hollow].
Bug(minor)! Crash in CmdLineEdition::GetNextWord()/GetPrevWord() (only used in tests).
Bug(minor)! Left and right parts inversion in CmdLineEdition copy constructor (no impact on the final behaviour).
Bug(minor)! Java: UnsatisfiedLinkError for cli.OutputDevice.__ScreenInfo__getbTrueCls()
Bug(minor)! C++: Crash in Traces::UnsetStream when streams are unset in the wrong order (trace output consistency improvement)
Bug(minor)! C++: telnet unit test does not compile on certain configurations (#include <stdio.h> changed into #include <unistd.h> for close() definition)
Bug(minor)! C++: OutputDevice::operator<<(void*) format improvements for better compatibility with 64 bits compilers
Bug(minor)! C++: Build info when building in debug under Cygwin
Info: resolving _ESCDELAY by linking to __imp__ESCDELAY (auto-import)
Info: resolving _stdscr by linking to __imp__stdscr (auto-import)
Info: resolving _LINES by linking to __imp__LINES (auto-import)
Info: resolving _COLS by linking to __imp__COLS (auto-import)
Bug(minor)! _mkres.mak: bad force rule on $(CLI_CPP_LIB): dependencies always relink the applications
Bug(major)! Java: "Java faile while executing command: 'cls'" => well-known command control 'cls' missing in NativeMenu.cpp
Bug(minor)! Java: java.lang.UnsatisfiedLinkError: __Native__getScreenInfo at cli.OutputDevice.__Native__getScreenInfo(Native Method)
(visible when the getScreenInfo() is called from Java,
fixed and checked with I/O devices unit test: java/build/make/io_device.mak, java/src/cli/test/TestIODevice.java)
Bug(minor)! Java: Crash on Endl deletion with MenuRef reference set (visible when calling deprecated System.runFinalizersOnExit(true))
Bug(minor)! Java: Native object references misfunctionning when declaring twice a same keyword in the same context (fixed and checked with test_no_res.mak)
Bug(minor)! Java: Crash when calling deprecated System.runFinalizersOnExit(true) (token addition for static null/stdin/stdout/stderr devices)
Bug(minor)! Java: Crash when calling deprecated System.runFinalizersOnExit(true) (no more finalization for TraceClass("CLI_JNI") main instance)
Bug(minor)! cli2cpp.xsl/cli2java.xsl: accented character management in T_MkCppName/T_MkJavaName
Bug(minor)! cli2java.xsl: Explicit java.lang/java.util package specification (avoid possible conflicts)
Bug(minor)! cli2help.xsl: Forward tag commands do not appear in documentation (T_Recursion|CHECK_MENU fix)
Bug(minor)! cli2help.xsl: Wrong default description for forward tag options.
Bug(minor)! cli2help.xsl: Space missing in command names (due to xsltproc limitation?)
Bug(minor)! Rejected! cli2help.xsl: wrong number of options generated for (a|b)+ patterns while (a|b)* works fine.
cli2help.xsl, deprecated in CLI 2.9, will remain unfixed. Please use cli2help.py instead.
The former LGPL license has been abandoned for a BSD-like license.
This is the decision of the author (myself) in order to have fewer constraints
on using and modifying the toolkit in any kind of softwares (even commercial ones),
which is what I wanted initially.
The following chart gives the evolution of the number of code lines throughout the time:
To my point of view, the major aims of the CLI toolkit have been reached so far, and I'm quite proud of that.
That's the reason why there are not many modifications expected in the next times.
But once again, if you feel the need for any other evolution, please .
May come with next releases:
Other target languages:
Supported languages are C++ and Java at present.
Next ones could be Perl or python...
Implement an easier way to let the user enter predefined string values as a parameter, rather than using forward tags.
Implement memory pools in order to provide better memory management with embedded integration contexts.
Latest version of the CLI toolkit is 2.9.
Please refer to history section for previous downloads.