public
Description: Read an RSS feed (even HTTPS with authentication) and rebroadcast it to a Twitter account.
Clone URL: git://github.com/trak3r/rss2twitter.git
trak3r (author)
Wed Apr 30 07:07:04 -0700 2008
commit  149c7f9389a7c6d10d589d81409532f7f1212a10
tree    ff8d54d85e0b077ff068d6c2da8915d18ec43a78
parent  48eef21d8beec7ff101790ea83422f6a612b688b
rss2twitter / truncation_test.rb
100644 11 lines (8 sloc) 0.307 kb
1
2
3
4
5
6
7
8
9
10
11
#!/bin/ruby
 
max = 140 # message limit for twitter
 
for x in 1..max do
  printf "%d", ( x % 10 )
end
printf "\n"
 
msg = "You are only coming through in waves. Your lips move but I can't hear what you're saying. I have become comfortably numb. A distant ship's smoke on the horizon."
printf "%s", msg[0..max]