]> git.pld-linux.org Git - packages/archivemail.git/blob - archivemail-add-archive-name-switch.patch
BR: rpmbuild(macros) >= 1.710
[packages/archivemail.git] / archivemail-add-archive-name-switch.patch
1 # Description: add and document --archive-name option
2 # Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=247340
3 # Author: Serafeim Zanikolas <serzan@hellug.gr>
4 # Last-Update: 2008-08-15
5 Index: archivemail/archivemail
6 ===================================================================
7 --- archivemail.orig/archivemail        2008-08-15 20:38:03.000000000 +0100
8 +++ archivemail/archivemail     2008-08-15 21:39:57.000000000 +0100
9 @@ -172,6 +172,7 @@
10  class Options:
11      """Class to store runtime options, including defaults"""
12      archive_suffix       = "_archive"
13 +    archive_name         = None
14      days_old_max         = 180
15      date_old_max         = None
16      delete_old_mail      = 0
17 @@ -210,6 +211,7 @@
18              opts, args = getopt.getopt(args, '?D:S:Vd:hno:F:P:qs:uv', 
19                               ["date=", "days=", "delete", "dry-run", "help",
20                               "include-flagged", "no-compress", "output-dir=",
21 +                            "archive-name=",
22                               "filter-append=", "pwfile=", "dont-mangle",
23                               "preserve-unread", "quiet", "size=", "suffix=",
24                               "verbose", "version", "warn-duplicate", "copy"])
25 @@ -262,6 +264,8 @@
26                  self.mangle_from = 0
27              if o in ('-v', '--verbose'):
28                  self.verbose = 1
29 +            if o in ('--archive-name'):
30 +                self.archive_name = os.path.expanduser(a)
31              if o == '--copy':
32                  if self.delete_old_mail: 
33                      user_error("found conflicting options --copy and --delete")
34 @@ -663,6 +667,8 @@
35    -P, --pwfile=FILE     file to read imap password from (default: None)
36    -F, --filter-append=STRING  append arbitrary string to the IMAP filter string
37    -s, --suffix=NAME     suffix for archive filename (default: '%s')
38 +      --archive-name=NAME  specify whole archive filename, overrides prefix
39 +                           and suffix
40    -S, --size=NUM        only archive messages NUM bytes or larger
41    -n, --dry-run         don't write to anything - just show what would be done
42    -u, --preserve-unread never archive unread messages
43 @@ -1102,6 +1108,8 @@
44          final_archive_name = mailbox_name.split('/')[-1] + parsed_suffix
45      else:
46          final_archive_name = mailbox_name + parsed_suffix
47 +    if options.archive_name:
48 +       final_archive_name = options.archive_name
49      if options.output_dir:
50          final_archive_name = os.path.join(options.output_dir, 
51                  os.path.basename(final_archive_name))
52 Index: archivemail/archivemail.sgml
53 ===================================================================
54 --- archivemail.orig/archivemail.sgml   2008-08-15 20:38:03.000000000 +0100
55 +++ archivemail/archivemail.sgml        2008-08-15 21:38:49.000000000 +0100
56 @@ -238,6 +238,15 @@
57  
58  <VarListEntry>
59  <Term>
60 +    <Option>--archive-name</Option>
61 +</Term>
62 +<ListItem><Para>
63 +Specify whole archive filename, overrides prefix and suffix.
64 +</Para></ListItem>
65 +</VarListEntry>
66 +
67 +<VarListEntry>
68 +<Term>
69      <Option>-S <Replaceable/NUM/, --size=<Replaceable/NUM/</Option>
70  </Term>
71  <ListItem><Para>Only archive messages that are <Replaceable/NUM/ bytes or
This page took 0.05167 seconds and 3 git commands to generate.