2013/05/04
KAICHO: s_naray[at]yahoo[dot]co[dot]jp
¦not the plane mail address to avoid SPAM

Sanaly - Source code ANALYsis web front end for GNU Global (Japanese)

¡Abstract

Sanaly is a web front end to read/analyze/investigate source code of softwares. This is just a small front end, a back end is GNU global.

¡ScreenShot of sanaly top page

Sanaly shows 2 windows, the left one shows the control to extract source codes and the extracted codes by GNU Global, the right one shows a main page which can be customized by users.
To extract a source code, put the url of the code(ex. src.rpm, tar.gz, tar.bz2) on the left-top box, and just push "EXT" button, then sanaly kicks GNU Global and add the extracted codes on the left window.

¡download

package name SRPM package RPM package(for both RHEL5/6)
Sanaly sanaly-0.6-1.src.rpm sanaly-0.6-1.noarch.rpm
geturllist geturllist-0.3-1.src.rpm geturllist-0.3-1.noarch.rpm

geturllist is a small tool to update urllist, which is used by Sanaly "search" box in the right window. This is not a mandatory tool but better to install, to weekly update the urllist into the latest one.

Special GNU Global is available.

package name source code SRPM package RPM package
stable
version
GNU Global GNU global Download page global-6.2.12-13.src.rpm global-6.2.12-13.x86_64.rpm(for EL5)
global-6.2.12-13.el6.i686.rpm(for EL6)
global-6.2.12-13.el6.x86_64.rpm(for EL6)
development
version
global-6.3.1-13.src.rpm global-6.3.1-13.x86_64.rpm(for EL5)
global-6.3.1-13.el6.i686.rpm(for EL6)
global-6.3.1-13.el6.x86_64.rpm(for EL6)

This global above has following extended features which are not implemented on origial global:

  1. can parse additional languages:

  2. can colorize strings/literal:
    All strings are colorized by htags by default.

  3. can parse per its mimetype/filetype, which is described in /etc/gtags.conf.sanaly
    The mimetype/filetypemap feature is implemented by using "/usr/bin/file" and its output string. For example, the builtin-parser of /etc/gtags.conf.sanaly is below. See "mimetypemap" and "filetypemap" lines.

    builtin-parser:\
            :langmap=c\:.c.h:\
            :langmap=yacc\:.y:\
            :langmap=asm\:.asm.ASM.Asm.s.S:\
            :langmap=java\:.java:\
            :langmap=cpp\:.c++.cc.hh.cpp.cxx.hxx.hpp.C.H:\
            :langmap=php\:.php.php3.phtml:\
            :langmap=python\:.py.pyx.pxd.pxi.scons:\
            :langmap=ruby\:.rb:\
            :langmap=perl\:.pl:\
            :langmap=sh\:.sh.SH.bsh.bash.ksh.zsh:\
            :mimetypemap=python\:text/x-python:\
            :mimetypemap=python\:application/x-python:\
            :mimetypemap=ruby\:text/x-ruby:\
            :mimetypemap=ruby\:application/x-ruby:\
            :mimetypemap=perl\:text/x-perl:\
            :mimetypemap=perl\:application/x-perl:\
            :filetypemap=c\:ASCII C program text:\
            :filetypemap=sh\:POSIX shell script text executable:\
            :filetypemap=sh\:Bourne-Again shell script text executable:\
            :filetypemap=sh\:Bourne shell script text executable:\
            :filetypemap=python\:python script text executable:\
            :filetypemap=python\:Python script text executable:\
            :filetypemap=python\:a python script text executable:\
            :filetypemap=python\:a /usr/bin/python script text executable:\
            :filetypemap=python\:a /usr/bin/env python script text executable:\
            :filetypemap=ruby\:ruby script text executable:\
            :filetypemap=ruby\:a /usr/local/bin/ruby script text executable:\
            :filetypemap=ruby\:a /usr/bin/ruby script text executable:\
            :filetypemap=ruby\:a /usr/bin/env ruby script text executable:\
            :filetypemap=perl\:perl script text executable:\
            :filetypemap=perl\:a /usr/bin/perl script text executable:\
            :filetypemap=perl\:a /usr/bin/env perl script text executable:
    

¡How to install

This is mainly for RHEL5/6 including CentOS5/6, and OracleLinux5/6. I have never installed this onto other distributions, so please let me know if you succeed/fail to install this onto such distributions.

Just install all packages once, like:
 # rpm -Uvh sanaly-0.6-1.noarch.rpm global-6.2.12-13.el6.x86_64.rpm 

as previously described, geturllist is not a mandatory utility.

¡How to use

just access to "http://webserver/sanaly/" by your web browser, where the webserver is the Linux box sanaly has been installed.

¡Configuration files

Sanaly configuration files are followings:

¡License

¡Support

in a support bbs or e-mail.