From 0203bed0c46e1c890afd6910119b5264b22d101c Mon Sep 17 00:00:00 2001 From: Paul Rodger Date: Fri, 12 Apr 2002 14:46:09 +0000 Subject: Added docbook documentation from which we can generate a manpage. --- CHANGELOG | 6 +- MANIFEST | 2 + Makefile | 22 ++++++ README | 4 +- archivemail.sgml | 222 ++++++++++++++++++++++++++++++++++++++++++++++++++++ test_archivemail.py | 9 ++- 6 files changed, 257 insertions(+), 8 deletions(-) create mode 100644 Makefile create mode 100644 archivemail.sgml diff --git a/CHANGELOG b/CHANGELOG index 8cd7189..d5dbf71 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,10 +1,10 @@ -Version 0.3.1 - ???? +Version 0.3.1 - 12 April 2002 * Stopped calling 'gzip' externally and started using the gzip library so that we can append to a copy of the gzip archive directly. * Removed 'bzip2' and 'compress' options since they are increasing complexity without adding much, and needed to be called externally. - Maybe when we get a bzip2 library I will add back an option to - compression archives using bzip2. + Maybe when python gets a bzip2 library I will add back an option to + compress archives using bzip2. Version 0.3.0 - 11 April 2002 * We now preserve the last-accessed and last-modified timestamps correctly diff --git a/MANIFEST b/MANIFEST index 054e847..0bd13ae 100644 --- a/MANIFEST +++ b/MANIFEST @@ -4,5 +4,7 @@ MANIFEST README TODO archivemail +archivemail.1 +archivemail.sgml setup.py test_archivemail.py diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..83e416e --- /dev/null +++ b/Makefile @@ -0,0 +1,22 @@ + +VERSION=0.3.1 + +default: + @echo "no default target" + +clean: + rm -f *.pyc + +clobber: clean + rm -rf build dist + +sdist: clobber + cp archivemail.py archivemail + fakeroot python setup.py sdist + rm archivemail +tag: + cvs tag -F current + cvs tag v$(VERSION) + +archivemail.1: archivemail.sgml + nsgmls archivemail.sgml | sgmlspl docbook2man-spec.pl diff --git a/README b/README index 7aaeb58..644bd38 100644 --- a/README +++ b/README @@ -13,8 +13,8 @@ USE: 'archivemail' is a tool written in Python for organising and storing old email choking any of your mailboxes. It can move messages older than a -certain number of days to a separate 'archive' mbox-format mailbox which -can be compressed with bzip2, gzip or compress. +certain number of days to a separate 'archive' mbox-format mailbox that +is compressed with 'gzip'. For example, have you been subscribing to the 'linux-kernel' mailing list for the last 6 years and ended up with an 160-meg mailbox that 'mutt' is diff --git a/archivemail.sgml b/archivemail.sgml new file mode 100644 index 0000000..28412fe --- /dev/null +++ b/archivemail.sgml @@ -0,0 +1,222 @@ + + +"> + + + +"> + + + +"> + + + +"> +]> + + + +12 April 2002 + + +archivemail +1 +SP + + + +archivemail +archive and compress your old email + + + + + + + + + + + + +Description + + + + + +By default it will read the mailbox + + + + + + + + + +Options + + + + + + +Archive messages older than + + + + + +Use the directory name + + + + + + +Use the suffix + + + + + + + +Don't write to any files -- just show what would have been done. This is +useful for testing to see how many messages would have been archived. + + + + + + + + +Delete rather than archive old mail. Use this option with caution! + + + + + + + + +Warn about duplicate Message-IDs that appear in the input mailbox. + + + + + + + + +Reports lots of extra debugging information about what is going on. + + + + + + + + +Turns on + + + + + + + +Display the version of + + + + + + + +Display brief summary information about how to run + + + + + + +Notes + + + + +Probably the best way to run -q option. + + + + + + + +Exit Status +Normally the exit status is 0, and nonzero on an unexpected errors. + + + + +See Also + + &python;, &gzip; + + + + +Author +Paul Rodger + + + diff --git a/test_archivemail.py b/test_archivemail.py index 56ca635..adde027 100755 --- a/test_archivemail.py +++ b/test_archivemail.py @@ -203,6 +203,7 @@ class TestMboxWrite(unittest.TestCase): if os.path.exists(name): os.remove(name) +########## options class testing ################# class TestOptionDefaults(unittest.TestCase): def testVerbose(self): @@ -222,8 +223,7 @@ class TestOptionDefaults(unittest.TestCase): self.assertEqual(archivemail.options.quiet, 0) -########## generic routine testing ################# - +########## archivemail.is_too_old() unit testing ################# class TestIsTooOld(unittest.TestCase): def testVeryOld(self): @@ -262,6 +262,7 @@ class TestIsTooOld(unittest.TestCase): time_msg = time.time() + (minutes * 60) assert(not archivemail.is_too_old(time_message=time_msg, max_days=1)) +################ archivemail.choose_temp_dir() unit testing ############# class TestChooseTempDir(unittest.TestCase): def setUp(self): @@ -460,7 +461,9 @@ class TestArchiveMboxNew(unittest.TestCase): if os.path.exists(name): os.remove(name) - +# +# Test the file mode (permissions) of the original mailbox after archival +# class TestArchiveMboxMode(unittest.TestCase): def setUp(self): archivemail.options.quiet = 1 -- cgit v1.2.3