Skip to content

Commit

Permalink
Fixes for ree 1.8.7
Browse files Browse the repository at this point in the history
  • Loading branch information
tedkulp committed May 13, 2011
1 parent d1738d1 commit cc2569a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions test.rb → receive-email.rb
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#!/usr/bin/env ruby
#Email to Jekyll script
#(c)2011 Ted Kulp <ted@tedkulp.com>
#MIT license -- Have fun
#Most definitely a work in progress

#Mail is an awesome gem. Install it.
require 'rubygems'
require 'mail'

#Change me
Expand All @@ -17,10 +19,10 @@
exit if message.nil? or message.strip.empty?

#Parse it, baby
mail = Mail.read(message)
mail = Mail.new(message)

markup_extensions = {html: 'html', markdown: 'markdown', md: 'markdown', textile: 'textile', txt: 'textile'}
keyvals = {tags: '', markup: 'html', slug: '', draft: false, layout: 'post'}
markup_extensions = {:html => 'html', :markdown => 'markdown', :md => 'markdown', :textile => 'textile', :txt => 'textile'}
keyvals = {:tags => '', :markup => 'html', :slug => '', :draft => false, :layout => 'post'}
subject = mail.subject

#Regex to grab all the of ((key: value)) sets in the subject
Expand Down Expand Up @@ -91,4 +93,4 @@
end
str << "---\n"
str << body
end
end

0 comments on commit cc2569a

Please sign in to comment.