From 4e58774754855bfae6c4a5cbd95eb30995794e50 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Mon, 10 Jun 2013 18:54:06 -0400 Subject: [PATCH] Update the description in the man page. Copy the man page description to the cabal file. Add a 'doc' target to the makefile. --- doc/man1/email-validator.1 | 16 +++++++++------- email-validator.cabal | 23 ++++++++++++++++++++++- makefile | 7 +++++++ 3 files changed, 38 insertions(+), 8 deletions(-) diff --git a/doc/man1/email-validator.1 b/doc/man1/email-validator.1 index 9599187..232a5f4 100644 --- a/doc/man1/email-validator.1 +++ b/doc/man1/email-validator.1 @@ -22,20 +22,22 @@ stdout), one per line. .SH DESCRIPTION .P -We check the validity of an email address using three techniques: +Validate an email address using three techniques: .IP \[bu] 2 -We ensure that the length of local and domain parts is within the +Ensuring that the length of local and domain parts is within the RFC-specified limits. .IP \[bu] -A regular expression is used to check for invalid characters and syntax. +A syntax check using a regular expression, or the full RFC 5322 +grammar (see the \fB\-\-rfc5322\fR option). .IP \[bu] -We confirm the existence of a MX record for the domain part of the -address. This is not required; in fact many domains accept mail via -an 'A' record for e.g. example.com which is used in lieu of an MX -record. This behavior can be controlled via the \fR\-a\fR flag. +Confirmation of the existence of an \fIMX\fR record for the domain +part of the address. This is not required; in fact many domains accept +mail via an \fIA\fR record for e.g. example.com which is used in lieu +of an \fIMX\fR record. This behavior can be controlled via the +\fR\-\-accept\-a\fR flag. .P These checks are performed in parallel using the number of available diff --git a/email-validator.cabal b/email-validator.cabal index 8870064..acb9fca 100644 --- a/email-validator.cabal +++ b/email-validator.cabal @@ -12,7 +12,28 @@ extra-source-files: synopsis: Perform basic syntax and deliverability checks on email addresses. description: - Perform basic syntax and deliverability checks on email addresses. + Validate an email address using three techniques: + . + * Ensuring that the length of local and domain parts is within the + RFC-specified limits. + . + * A syntax check using a regular expression, or the full RFC 5322 + grammar (see the @--rfc5322@ option). + . + * Confirmation of the existence of an @MX@ record for the domain part of + the address. This is not required; in fact many domains accept mail + via an @A@ record for e.g. example.com which is used in lieu of an @MX@ + record. This behavior can be controlled via the @--accept-a@ flag. + . + These checks are performed in parallel using the number of available + threads. To increase the number of threads, you can pass the + appropriate flag to the GHC runtime. + . + This will set the number of threads to 25: + . + @ + $ email-validator -i addresses.csv +RTS -N25 + @ executable email-validator diff --git a/makefile b/makefile index 2681fc3..8d802d2 100644 --- a/makefile +++ b/makefile @@ -13,6 +13,13 @@ profile: src/*.hs runghc Setup.hs configure --user --enable-executable-profiling runghc Setup.hs build +doc: src/*.hs + runghc Setup.hs configure --user + runghc Setup.hs hscolour --executables + runghc Setup.hs haddock --internal \ + --executables \ + --hyperlink-source + clean: runghc Setup.hs clean -- 2.43.2