Code browsing Tool Opengrok
Opengrok is a powerful cross-platform code reading tool, many online source view sites are used to build, such as the famous Android online source view site Androidxref.
Opengrok Characteristics
Opengrok offers the following features:
1. Fast Search engine for code
Search full text, definitions, symbols, file paths, and modification history
Search for any specified subdirectory (hierarchical search)
Incrementally update index files
2. Support Google-like query syntax, such as Path:makefile Defs:target
Search for modified files in date range
Support for using wildcard search, such as * for multiple characters,? Represents a single character
Show matching rows in search results
3. A version history viewing interface for a WEB read-only version
Modification log of the file
Diff between two versions of a file
History of folders
4. Cross-reference display with syntax highlighting, you can use CSS to customize the style
Plug-ins can be developed to support new language and version control systems
Languages already supported: Supported Languages and Formats
Version control system supported: Supported Revision control systems
build Opengrok on MacOS platform installation
1. Install Tomcat
$ brew Install Tomcat
2. Installing Ctags
$ Brew Install Ctags
3. Installing Opengrok
$ wget-o-http://java.net/projects/opengrok/downloads/download/opengrok-0.12.1.tar.gz | Tar Xvz
Turn on Tomcat
Method 1:CD to the directory where Tomcat is located, then executes the command,
$ Catalina Start
$ open Http://localhost:8080/source
Method 2: Download the GUI program under MacOS Tomcatcontroller
Configure the directory where Tomcat resides.
Open Opengrok Project
Opengrok is actually a webapp.
Import Project
For example, import ffmpeg, create a local_src folder under the Opengrok directory, link the FFmpeg folder to the SRC directory under local_src by means of a soft reference, so that Opengrok can find ffmpeg code.
Build an index
Open Browser
Visit Http://localhost:8080/source to see the code.
Reference
http://blog.simplypatrick.com/2015/01/16/opengrok-on-mac-osx/
https://zhuanlan.zhihu.com/p/24369747
Https://github.com/OpenGrok/OpenGrok/wiki/Features
http://bytesthink.com/blog/?p=184