NAME
nitls - search and lists the packages, groups and paths of Nit sources files.
SYNOPSIS
nitls [options] [FILE]...
DESCRIPTION
nitls
is used to search and list Nit files in directories and extract the module-group-package relation.
It is basically a ls
, a which
or a simple find
specialized on .nit
source files.
By default nitls
works with the current directory (.
).
Each file can then be:
- A Nit module (file). In this case, only this single module is considered
- A Nit group (directory). In this case, all the modules of the groups (and recursively the sub-groups) are considered
- A normal directory. In this case, all its entries are analysed. Files that are Nit modules and directories that are Nit groups are considered. Other files and directories are ignored.
EXAMPLES
Show the tree of modules from the current directory.
$ nitls test_prog: Test program for model tools. (.) |--game: Gaming group (./game) | `--game: A game abstraction for RPG. (./gamegame.nit) |--platform: Fictive Crappy Platform. (./platform) | `--platform: Declares base types allowed on the platform. (./platformplatform.nit) |--rpg: Role Playing Game group (./rpg) | |--careers: Careers of the game. (./rpgcareers.nit) | |--character: Characters are playable entity in the world. (./rpgcharacter.nit) | |--combat: COmbat interactions between characters. (./rpgcombat.nit) | |--races: Races of the game. (./rpgraces.nit) | `--rpg: A worlg RPG abstraction. (./rpgrpg.nit) `--test_prog: A test program with a fake model to check model tools. (./test_prog.nit)
Show the list of packages imported by the modules of the current directory.
$ nitls -d -P *.nit base64: Offers the base 64 encoding and decoding algorithms (/homeprivatprognitlibbase64.nit) core: # Nit common library of core classes and methods (/homeprivatprognitlibcore) curl: Data transfer with URL syntax (/homeprivatprognitlibcurl) json (/homeprivatprognitlibjson) libevent: Lowevel wrapper around the libevent library to manage events on file descriptors (/homeprivatprognitliblibevent.nit) md5: Native MD5 digest implementation as `Text::md5` (/homeprivatprognitlibmd5.nit) more_collections: Highly specific, but useful, collections-related classes. (/homeprivatprognitlibmore_collections.nit) nitcc_runtime: Runtime library required by parsers and lexers generated by nitcc (/homeprivatprognitlibnitcc_runtime.nit) nitcorn: Lightweight framework for Web applications development (.) parser_base: Simple base for hand-made parsers of all kinds (/homeprivatprognitlibparser_base.nit) performance_analysis: Services to gather information on the performance of events by categories (/homeprivatprognitlibperformance_analysis.nit) realtime: Services to keep time of the wall clock time (/homeprivatprognitlibrealtime.nit) serialization: # Abstract serialization services (/homeprivatprognitlibserialization) template: Basic template system (/homeprivatprognitlibtemplate)
Show the directory of the package inkscape_tools
.
$ nitls -pP inkscape_tools /homeprivatprognitcontribinkscape_tools
OPTIONS
Each combination of option
PRESENTATION MODE
Three presentation modes are available.
-P
, --package
List packages in a flat list (default).
Only package are displayed (and not the individual files).
-t
, --tree
List source files in their groups and packages.
Each .nit
file is presented in a tree of packages and groups.
-s
, --source
List source files in a flat list.
Each .nit
file is presented individually.
The three modes are exclusives.
The default mode is --package
unless one on the argument is a group, then it is --group
.
COLLECT
-r
, --recursive
Process directories recursively.
All .nit
files found in the specified directory and subdirectories are considered.
-d
, --depends
List dependencies of given modules.
All imported modules are also considered.
In --tree and --source modes, the modules directly imported are also displayed.
-k
, --keep
Ignore errors and files that are not a Nit source file.
When a file that is not a valid Nit module is encountered, it is ignored and the rest of the files are processed.
Without this option, an error message is displayed and nitls terminates on such a case.
PRESENTATION OPTIONS
-p
, --path-only
List only path (instead of name + path).
Paths are displayed uncolored.
-M
List dependencies suitable for a rule in a Makefile.
Alias for -d
, -p
and -s
.