E
E
easyterm2012-04-04 10:58:51
Programming
easyterm, 2012-04-04 10:58:51

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

1 answer(s)
I
int03e, 2012-04-04
@int03e

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

Well, screw the gui with QtRuby so that it hangs in the tray and you can turn it on and off.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question