summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Parri <simonparri@ganzeria.com>2019-08-28 08:20:27 -0500
committerSimon Parri <simonparri@ganzeria.com>2019-08-28 08:20:27 -0500
commit8bade080be64b96ee8b47870dc7a7731c72731e8 (patch)
treea19314f743f60c77024066d56df4956d0696681d
parent7ec3c2c8bdc4db17e8d15072bae962bf488c8043 (diff)
downloadspelling-rbee-8bade080be64b96ee8b47870dc7a7731c72731e8.tar.gz
spelling-rbee-8bade080be64b96ee8b47870dc7a7731c72731e8.zip
update readme
-rw-r--r--README8
-rwxr-xr-xspelling-rbead2
2 files changed, 4 insertions, 6 deletions
diff --git a/README b/README
index c632ee6..7818f5c 100644
--- a/README
+++ b/README
@@ -17,14 +17,12 @@ Useage:
SPELLING-RBEAD
The spelling ruby reader.
-spelling-rbead is the email reader for spelling-rbee. You can use it to read your email
-for a message that begins with the line spelling and that then follows the format for spelling-rbee.
-This a way to make .txts for spelling-rbee (however it is not the only way.)
+spelling-rbead is the email reader for spelling-rbee. It to reads your email
+for a message that has the word "Spelling:" in the subject and outputs the contents.
Dependencies:
ruby
ruby net/imap
-an existing file to write to
Useage:
-./spelling-rbead <server> <username> <password> <address who sent the list> <file to write to>
+./spelling-rbead <server> <username> <password> <address who sent the list> | <file>
diff --git a/spelling-rbead b/spelling-rbead
index 02e23f8..4ea24c0 100755
--- a/spelling-rbead
+++ b/spelling-rbead
@@ -11,7 +11,7 @@ from = ARGV[3]
imap = Net::IMAP.new(server)
imap.login(user, password)
imap.select "inbox"
-n = imap.search("FROM \"#{from}\" SUBJECT \"Spelling\"").last
+n = imap.search("FROM \"#{from}\" SUBJECT \"Spelling:\"").last
if n
msgs = imap.fetch n, "body[1.text]"
c = msgs[0].attr["BODY[1.TEXT]"]