Answer the question
In order to leave comments, you need to log in
How can I print tweets on a real-time printer?
I have a thermal printer here and I really want to connect a tweeter to it. Just for sport. :) But the problem is that I don't understand much about programming. Can anyone tell me the easiest way to print tweets in real time?
PS It's all this post's fault. http://habrahabr.ru/post/141308/
Answer the question
In order to leave comments, you need to log in
I don’t know ready-made solutions, if programming is interesting - I would do something like this ... We receive tweets using the twitter streaming api, accumulate the required amount (so as not to print 1 tweet per sheet), and then just print :-)
Ruby:
port = "LPT1:" # Windows printer port
port = "/dev/lpt" # Linux printer port
File.open(port, "wb") do |printer|
printer.write(our_tweets)
printer.flush
end
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question