diff --git a/bin/newsletter b/bin/newsletter index 07d79b5..e2966ff 100755 --- a/bin/newsletter +++ b/bin/newsletter @@ -11,29 +11,34 @@ feed = Nokogiri::XML( post = feed.search("rss channel item").first title = post.search("title").text url = post.search("link").text +body = post.search("description").text body = %(
By David Eisinger · View original post
-#{post.search("description").text} -) +#{body}) + +# escape curly braces (they're important in listmonk) +body = body .gsub("{", "{") .gsub("}", "}") - .gsub(/width="(\d+)"/) do - %(width="#{$1.to_i/2}") - end - .gsub(/height="(\d+)"/) do - %(height="#{$1.to_i/2}") - end - .gsub(/