Skip to content

Commit 199a8b1

Browse files
committed
fix the formatting/url selection bug
1 parent 7812b0c commit 199a8b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/tweet.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
sitemap_xml = Nokogiri::XML(open(sitemap_url))
1616
urls = sitemap_xml.css("url loc").map { |x|
1717
x.text
18-
}.select { |x| x !~ /blog/ }
18+
}.select { |x| x !~ /blog|newsletter/ }
1919

2020
# Some notable 3rd party stuff
2121
urls << 'https://docs.docker.com/engine/admin/logging/fluentd/' # Docker
@@ -34,7 +34,7 @@
3434
# Formatting
3535
title = Nokogiri::HTML(open(url_to_tweet)).css("title").text
3636
title.gsub!(/\s*\| Fluentd.*$/, "")
37-
tweet_body = "\"#{title}\" #{url_to_tweet}"
37+
tweet_body = "\"#{title.strip}\" #{url_to_tweet}"
3838

3939
# client
4040
client = Twitter::REST::Client.new do |config|

0 commit comments

Comments
 (0)