Refactoring Antikythera classes.

Spent time splitting Antikythera class library into name spaces to aid future work and usage; it was a good time to do this exercise as the number of classes is still small and manageable.

  • Antik::IMAP (CIMAP, CIMAPParse, CIMAPBodyStruct)
  • Antik::SMTP (CSMTP)
  • Antik::ZIP (CZIP, ZIPIO)
  • Antik::File (CTask, CApprise, CMIME)
  • Antik::Util (CRedirect, CLogger)

Time has also been spent on a number of example programs that use the classes facilities.

  1. IMAPCommandTerminal – A Simple IMAP command console/terminal that logs on to a given IMAP server and executes commands typed in. The raw command responses are echoed back as default but parsed responses are displayed if specified in program options.
  2. DownloadAllAttachments – Log on to a given IMAP server and download attachments found in any e-mail in a specific mailbox to a given local folder. The final destination folder is a base name with the mailbox name attached.
  3. ArchiveMailBox – Log on to a given IMAP server and download all e-mails for a given mailbox and create an .eml file for them in a specified destination folder. The .eml files are created within a sub-folder with the mailbox name and with filenames consisting of the mail UID prefix and the subject line. If parameter –updates is set then the date of the newest .eml in the destination folder is used as the basis of the IMAP search (ie. only download new e-mails). Note: MIME encoded words in the email subject line are decoded to the best ASCII fit available.
  4. WaitForMailBoxEvent Log on to a IMAP server and wait for a status change in a specified mailbox. By default it will use IDLE but polling every time period using NOOP is also supported. This is not directly useful but may be applied to other situations where the functionality is needed.
  5. SMTPSendMail A command line program to log on to an SMTP server and send an email to given recipients. The mails details such as contents, subject and any attachments are configured via command line arguments.
  6. ArchiveFolder A command line program that writes the contents of a source folder to a ZIP archive; traversing it recursively and adding any sub-folder contents. It compresses each file with deflate unless its size does not decrease in which case it simply stores the file.
  7. ExtractToFolder A command line program that extracts the contents of a ZIP archive to a specified destination folder. Note: Any destination folders are created by the program before a file is extracted as the class will not do this.
  8. ZIPArchiveInfo This is a command line program to scan a ZIP archive and output information about it.

The aim is to add more over time and add unit tests as and when new areas are added to the library.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s