|
|
![]() - a wicked fast source browser Known Issues ...
Unstable usage pageSince {OpenGrok is still in development, please check the trunk usage info first (or run opengrok.jar with dummy params). Man page below doesn't have to be up to date, but we try to refresh it. Man page for opengrok.jar Java Application
NAME
OpenGrok - a wicked fast source browser
SYNOPSIS
opengrok.jar
opengrok.jar [-qe] [-c ctagsToUse] [-i ignore_name [ -i ..]]
[-w webapp_context]
[-s SRC_ROOT] -d DATA_ROOT [subtree ...]
opengrok.jar [-l | -t] -d DATA_ROOT
org.opensolaris.opengrok.search.Search -R configfile.xml
[ -d | -r | -p | -h | -f ] "query string" ...
DESCRIPTION
OpenGrok is a fast and usable source code search and cross reference
engine written in pure Java. It helps you search, cross-referenece
and navigate your source tree. It can understand various program file
formats and version control histories.
OPTIONS
The following options are supported:
-q Run quietly. Suitable for use in a cronjob
-e Economical - consumes less disk space. It does not generate
hyper text cross reference files offline, but will do so
on demand - which could be sightly slow. It will still
generate a spelling correction database.
-c Path to Exuberant Ctags from http://ctags.sf.net
by default takes the Exuberant Ctags in PATH.
-i Ignore named files or directories
-w Context of webapp. Default is /source. If you specify a
different name, make sure to rename source.war to that name.
-s SRC_ROOT is root directory of source tree
default: last used SRC_ROOT, else current working directory
-d DATA_ROOT is where output of indexer is stored
Specified files and directories are processed
if not specified all files under SRC_ROOT are processed
subtrees - only specified files or directories under SRC_ROOT are processed
if not specified, all files under SRC_ROOT are processed
-l list all files in the index
-t lists tokens occurring more than 5 times.
SEARCHING
If no options are provided OpenGrok launches the standalone search
GUI.
A webapp source.war provides web bases search and navigation
facilities.
For command line search there is a simple java class
org.opensolaris.opengrok.search.Search that supports searching
using a given configuration file. Options are:
-d Symbol Definitions
-r Symbol References
-p Path
-h History
-f Full text
FILE FORMATS
OpenGrok can grok various program file formats like C, C++, Shell
Scripts like ksh, sh, Perl, Java, Java Class files, JAR files, ELF
files, troff man pages, file archives like Zip, Gzip, BZip2, Tar
and meta language files like XML, SGML or HTML.
EXAMPLES
Example 1: Indexing files in /usr/include and storing the output data to
/var/tmp/opengrok_data.
$ opengrok.jar -s /usr/include -d /var/tmp/opengrok_data
Example 2: Indexing only files under rpc/ in /usr/include and storing the
output data to /var/tmp/opengrok_data, and ignore svc.h
$ opengrok.jar -s /usr/include -i svc.h -d /var/tmp/opengrok_data rpc
Example 3: List the files indexed into database
$ opengrok.jar -l -d /var/tmp/opengrok_data
Example 4: Generate/update the path description tag database. Path
descriptions are stored in tab separated format, one path per line:
path1 description 1
usr/src/path2 description 2
usr/src/uts/path3 description 3
$ java -classpath opengrok.jar org.opensolaris.opengrok.web.EftarFile paths.tsv DATA_ROOT/index/dtags.eftar
Example 5: Searching using CLI
$ java -classpath opengrok.jar org.opensolaris.opengrok.search.Search -R ~/opengrok/configuration.xml -d malloc
AUTHORS
Chandan B.N, Sun Microsystems
Trond Norbye - norbye.org, Knut Pape - eBriefkasten.de.
|