[Lxr-commits] CVS: lxr/templates lxr.conf,1.6,1.7
Brought to you by:
ajlittoz
|
From: Malcolm B. <mb...@us...> - 2002-01-23 14:59:27
|
Update of /cvsroot/lxr/lxr/templates
In directory usw-pr-cvs1:/tmp/cvs-serv10443/templates
Modified Files:
lxr.conf
Log Message:
Add mapping from interpreter names to languages. If the file extension does
not select a language, then the first line of the file is checked for a #!
If one is found, then the interpreter name is matched against the 'interpreters'
map in lxr.conf, and the relevant language module loaded.
Index: lxr.conf
===================================================================
RCS file: /cvsroot/lxr/lxr/templates/lxr.conf,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- lxr.conf 2002/01/23 08:16:19 1.6
+++ lxr.conf 2002/01/23 14:59:21 1.7
@@ -5,71 +5,87 @@
{
# Global configuration
- # 'glimpsebin' => '/info/lxr/bin/glimpse',
- 'ectagsbin' => '/usr/bin/ctags',
- 'tmpdir' => '/tmp',
+ 'glimpsebin' => '/info/lxr/bin/glimpse', # Path to glimpse executable
+ 'ectagsbin' => '/usr/bin/ctags', # Path to Exuberant Ctags executable
+ 'tmpdir' => '/tmp', # Place where lxr can write temporary files
# Location of the Generic.pm config file
'genericconf' => '/path/to/lib/LXR/Lang/generic.conf'
},
{
- # Configuration for http://karsk.ping.uio.no/~argggh/lxr.
+ # Configuration for http://192.168.1.3/lxr.
# baseurl is used to select configuration block.
- 'baseurl' => 'http://192.168.1.3/lxr',
- 'virtroot' => '/lxr',
+ 'baseurl' => 'http://192.168.1.3/lxr', # Put your URL here
+ 'virtroot' => '/lxr', # The bit after the / above
'variables' => {
- # Define typed variable "v", read valueset from file.
- 'v' => {'name' => 'Version',
- 'range' => [ readfile('src/cvsversions') ],
-
- # If files within a tree can have different versions,
- # e.g in a CVS tree, 'range' can be specified as a
- # function to call for each file:
- #'range' => sub { return
- # ($files->allreleases($LXR::Common::pathname),
- # $files->allrevisions($LXR::Common::pathname))
- # }, # deferred function call.
+ # Define typed variable "v". This is the list of versions to index.
+ 'v' => {'name' => 'Version',
+ # This can come from a file, a function or be explicitly
+ # ennumerated.
+ # From a file:
+ 'range' => [ readfile('src/versions') ],
+ # Explicitly:
+ # 'range' => [qw(v1 v2 v3.1 v4 experimental)],
+ # If files within a tree can have different versions,
+ # e.g in a CVS tree, 'range' can be specified as a
+ # function to call for each file:
+ #'range' => sub { return
+ # ($files->allreleases($LXR::Common::pathname),
+ # $files->allrevisions($LXR::Common::pathname))
+ # }, # deferred function call.
- 'default' => '1.0.6'},
+ # The default version to display
+ 'default' => '1.0.6'},
- # Define typed variable "a". First value is default.
- 'a' => {'name' => 'Architecture',
- 'range' => [qw(i386 alpha arm m68k mips ppc sparc sparc64)]},
- },
-
- 'maps' => {
- '/include/asm[^\/]*/' => '/include/asm-$a/',
- '/arch/[^\/]+/' => '/arch/$a/',
- },
+ # Define typed variable "a". First value is default.
+ 'a' => {'name' => 'Architecture',
+ 'range' => [qw(i386 alpha arm m68k mips ppc sparc sparc64)]},
+ },
-
- # Templates used for headers and footers
- 'htmlhead' => 'html-head.html',
- 'htmltail' => 'html-tail.html',
- 'htmldir' => 'html-dir.html',
- 'htmlident' => 'html-ident.html',
-
- 'sourcehead' => 'html-head.html',
- 'sourcedirhead' => 'html-head.html',
- 'stylesheet' => 'templates/lxr.css',
+ # These do funky things to paths in the system - you probably don't need them.
+ 'maps' => {
+ '/include/asm[^\/]*/' => '/include/asm-$a/',
+ '/arch/[^\/]+/' => '/arch/$a/',
+ },
+
+
+ # Templates used for headers and footers
+ 'htmlhead' => 'html-head.html',
+ 'htmltail' => 'html-tail.html',
+ 'htmldir' => 'html-dir.html',
+ 'htmlident' => 'html-ident.html',
+
+ 'sourcehead' => 'html-head.html',
+ 'sourcedirhead' => 'html-head.html',
+ 'stylesheet' => 'lxr.css',
+
+ # sourceroot - where to get the source files from
-# sourceroot can either be the name of an ordinary directory
-# containing one directory for each version, or cvs: and the name of a
-# cvs repository
+ # For ordinary directories, this specifies a directory which has each version as a
+ # subdirectory e.g.
+ # indexed-src/version1/...
+ # indexed-src/version2/...
+ # The names of the version directories must match the values for the Version
+ # variable above.
+ 'sourceroot' => '/home/malcolm/indexed-src',
+ # Alternatively, this can specify a CVS repository by setting the value to "cvs:"
+ # followed by the path to the repository. Note this must be file accessible - remote
+ # server access does NOT work.
+ # 'sourceroot' => 'cvs:/hom/karsk/a/CVSROOT/linux',
- 'sourceroot' => '/home/malcolm/indexed-src',
-# 'sourceroot' => 'cvs:/hom/karsk/a/CVSROOT/linux',
- 'sourcerootname' => 'Example',
-# where to look for include files inside the sourcetree
+ # The name to display for this source tree
+ 'sourcerootname' => 'Example',
+
+ # where to look for include files inside the sourcetree. This is used to hyperlink
+ # to included files.
'incprefix' => ['/include', '/include/linux'],
-
+
# Which extensions to treat as images when browsing. If a file is an image,
# it is displayed.
-
- 'graphicfile' => '(?i)\.(gif|jpg|jpeg|pjpg|pjpeg|xbm|png)$',
+ 'graphicfile' => '(?i)\.(gif|jpg|jpeg|pjpg|pjpeg|xbm|png)$', #'
# How to map files to languages
# Note that the string for the key and the first entry in the
@@ -126,15 +142,32 @@
# ['tcl', '(?i)\.tcl$|\.wish$' #'
# , 'LXR::Lang::Generic'],
},
+
+ # Maps interpreter names to languages. The format is:
+ # regexp => langname
+ # regexp is matched against the part after #! on the first line of a file
+ # langname must match one of the keys in filetype above.
+ #
+ # This mapping is only used if the filename doesn't match a pattern above, so
+ # a shell script called shell.c will be recognised as a C file, not a shell file.
- # If dbname is a directory the db-file databases will be stored here
- # if a relational database is used the name is a dbi database specifier
+ 'interpreters' => {
+ 'perl' => 'Perl',
+# 'bash' => 'shell',
+# 'csh' => 'shell',
+ 'python' => 'Python',
+ },
+
+ # The DBI identifier for the database to use
+ # For mysql, the format is dbi:mysql:dbname=<name>
+ # for Postgres, it is dbi:Pg:dbname=<name>
'dbname' => 'dbi:mysql:dbname=lxr',
-# Used with the mysql backend
-# 'dbpass' => 'foo',
-# 'dbuser' => 'lxr'
- # 'dbname' => 'src/db',
+
+ # If you need to specify the username or password for the database connection,
+ # uncomment the following two lines
+ # 'dbpass' => 'foo',
+ # 'dbuser' => 'lxr',
# For using glimpse, the directory to store the .glimpse files in is required
- 'dbdir' => '/path/to/glimpse/database',
+ 'dbdir' => '/path/to/glimpse/databases',
})
|