source: trunk/gsdl/perllib/colcfg.pm@ 14

Last change on this file since 14 was 4, checked in by sjboddie, 26 years ago

Initial revision

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 1.3 KB
Line 
1# reads in a collection configuration file
2
3package colcfg;
4
5use cfgread;
6
7
8# the collection configuration file data is stored in the form
9#
10# {'creator'}->string
11# {'maintainer'}->array of strings
12# {'public'}->string
13# {'beta'}->string
14# {'key'}->string
15# {'indexes'}->array of strings
16# {'defaultindex'}->string
17# {'plugins'}->array of strings
18
19sub read_collect_cfg {
20 my ($filename) = @_;
21
22 return &cfgread::read_cfg_file ($filename,
23 '^(creator|public|beta|key|defaultindex)$',
24 '^(maintainer|indexes|plugins)$');
25}
26
27sub write_collect_cfg {
28 my ($filename, $data) = @_;
29
30 &cfgread::write_cfg_file($filename, $data,
31 '^(creator|public|beta|key|defaultindex)$',
32 '^(maintainer|indexes|plugins)$');
33}
34
35
36# the build configuration file data is stored in the form
37#
38# {'builddate'}->string
39# {'metadata'}->array of strings
40# {'languages'}->array of strings
41# {'numdocs'}->string
42# {'numwords'}->string
43# {'numbytes'}->string
44
45sub read_build_cfg {
46 my ($filename) = @_;
47
48 return &cfgread::read_cfg_file ($filename,
49 '^(builddate|numdocs|numwords|numbytes)$',
50 '^(metadata|languages)$');
51}
52
53sub write_build_cfg {
54 my ($filename, $data) = @_;
55
56 &cfgread::write_cfg_file($filename, $data,
57 '^(builddate|numdocs|numwords|numbytes)$',
58 '^(metadata|languages)$');
59}
60
61
621;
Note: See TracBrowser for help on using the repository browser.