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 CentOS 5/6/7)
Sanaly sanaly-0.7-4.src.rpm sanaly-0.7-4.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 EL5 global-6.2.12-13.x86_64.rpm
EL6 global-6.2.12-13.el6.i686.rpm
global-6.2.12-13.el6.x86_64.rpm
development
version
global-6.3.3-15.src.rpm EL5 global-6.3.3-15.x86_64.rpm
EL6 global-6.3.3-15.el6.i686.rpm
global-6.3.3-15.el6.x86_64.rpm
EL7 global-6.3.3-15.el7.centos.x86_64.rpm
python-pygments pygments get it page python-pygments-1.6-3.src.rpm EL6/7 python-pygments-1.6-3.noarch.rpm
# pygments is a python library which helps global lexical analysis. This feature is included into/from globa-6.3.2. If pygments is not installed, global would try to use ctags instead, however pygments is a bit wiser than ctags. Although, pygments is slower than ctags, and it should be on EL6 or later as it needs pythong-2.6 or higher, EL5 has python-2.4 actually.

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-additionals of /etc/gtags.conf.sanaly is below. See "mimetypemap" and "filetypemap" lines.

    builtin-parser-additionals:\
            :langmap=python\:.py.pyx.pxd.pxi.scons:\
            :langmap=ruby\:.rb:\
            :langmap=perl\:.pl:\
            :langmap=sh\:.sh.SH.bsh.bash.ksh.zsh:\
            :langmap=cpp\:.tjs:\
            :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=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, python-pygments 1st and others next like:
 # rpm -Uvh python-pygments-1.6-3.noarch.rpm
 # rpm -Uvh sanaly-0.7-4.noarch.rpm global-6.3.3-15.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.