equal
deleted
inserted
replaced
|
1 #!/usr/bin/ruby |
|
2 # |
|
3 # A Ruby programmatic interface to the ezmlm-idx mailing list system |
|
4 # |
|
5 # == Version |
|
6 # |
|
7 # $Id$ |
|
8 # |
|
9 # == Authors |
|
10 # |
|
11 # * Michael Granger <mgranger@laika.com> |
|
12 # * Jeremiah Jordan <jjordan@laika.com> |
|
13 # |
|
14 # :include: LICENSE |
|
15 # |
|
16 #--- |
|
17 # |
|
18 # Please see the file LICENSE in the base directory for licensing details. |
|
19 # |
|
20 |
|
21 require 'pathname' |
|
22 |
|
23 |
|
24 ### Toplevel namespace module |
|
25 module Ezmlm |
|
26 |
|
27 # SVN Revision |
|
28 SVNRev = %q$Rev$ |
|
29 |
|
30 # SVN Id |
|
31 SVNId = %q$Id$ |
|
32 |
|
33 # Package version |
|
34 VERSION = '0.0.1' |
|
35 |
|
36 |
|
37 require 'ezmlm/list' |
|
38 |
|
39 |
|
40 |
|
41 ############### |
|
42 module_function |
|
43 ############### |
|
44 |
|
45 |
|
46 ### Iterate over each directory that looks like an Ezmlm list in the specified +listsdir+ and |
|
47 ### yield it as an Ezmlm::List object. |
|
48 def each_list( listsdir ) |
|
49 listsdir = Pathname.new( listsdir ) |
|
50 Pathname.glob( listsdir + '*' ) do |entry| |
|
51 next unless entry.directory? |
|
52 next unless ( entry + 'mailinglist' ).exist? |
|
53 |
|
54 yield( Ezmlm::List.new(entry) ) |
|
55 end |
|
56 end |
|
57 |
|
58 |
|
59 end # module Ezmlm |
|
60 |
|
61 # vim: set nosta noet ts=4 sw=4: |