Re: [Lcdproc-ruby-newcomers] [Lcdproc] LCDproc Digest, Vol 7, Issue 12
Status: Beta
Brought to you by:
fangiotophia
From: Topher F. <tf...@fr...> - 2009-02-27 20:18:59
|
Hi Sascha, Assuming you have Ruby installed, CD into the LCDProc-Ruby directory where you extracted the download and type: ruby script/console.rb This will open an interactive console that you can use to play with the library. You can look at some of the examples to see how they work, but basically, you create a client, attach a screen and attach widgets. c = Client.new(:host => "localhost", :name => "test"); s = Screen.new("test_screen") w = Widget.new( :string ) c.attach(s) s.add_widget(w) This should create a basic screen that has the word "Hello" at the top left (it defaults to hello, you can pass any string you want). You can debug a bit by typing c.messages and see basically a log of everything you have done. You may also be interested in running the tests: CD into the LCDProc-Ruby directory and type: rake -T to see the tests, or rake test:basic to run the basic tests. Just go to http://www.rubygems.org/ and download the latest version for your OS. Then run gem install rake Also, the online documentation is below. It's not complete, but it should get you started. http://lcdproc-ruby.sourceforge.net/index.html Let me know if you need anything else! I'll be glad to help. P.S. I'm forwarding this to the LCDProc-Ruby list in case anyone else has similar questions. Topher -----Original Message----- From: Sascha [mailto:sas...@gm...] Sent: Friday, February 27, 2009 11:47 AM To: Topher Fangio Subject: Re: [Lcdproc] LCDproc Digest, Vol 7, Issue 12 Am Mittwoch 25 Februar 2009 15:38:48 schrieben Sie: > Hi Sascha, > > Sourceforge says that the perl-LCDd library works with LCDproc 0.4. I think > there have been quite a few differences in the 0.5 branch. The last update > was 19 Feb, 2003, so I would guess that it's not being actively developed. > There may be another library that I don't know about, but I figured that's > probably the one in which you were interested. > > About 8 months ago I wrote a Ruby library that interacts with the 0.5 > server. It's not quite in "active" development, but that's because the > project on which I was using it got scrapped. If there is interest, I can > definitely get back into it and fix some bugs/add more features. If I > remember correctly, there is support for the backlight and it would be > super simple to create a client (in Ruby) that turned the backlight on and > off at whatever times you wanted. > > You can check out the library at > http://sourceforge.net/projects/lcdproc-ruby/. There's a mailing list if > you have any questions specific to the library and I will most likely get > back to you the same day (depends on weekends and whatnot). > > I would love some feedback and since I'm going to be getting back into Ruby > for some web development, I'll have my environment setup anyway. > > Hope you find what you are looking for :-) > > Topher Hi, I tried to get this running, but I don't know how. I am familar with perl, php but I havn't read about ruby. Do you have a Howto to get this working? Regards Sascha No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.0.237 / Virus Database: 270.11.3/1970 - Release Date: 02/27/09 07:05:00 CONFIDENTIALITY NOTICE: This email message and any attachments hereto are intended only for use by the addressee(s) named herein and may contain information which is legally privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, or an authorized representative of the intended recipient, of this email message, you are hereby notified that any review, dissemination, distribution, copying, or use (including any reliance thereon) of this email message, and/or any attachment hereto, is strictly prohibited. Although this transmission and any attachments are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened, it is the responsibility of the recipient to ensure that it is free from virus or other defect and no responsibility is accepted by the sending company, its subsidiaries and affiliates, as applicable, for any loss or damage arising in any way from its use. If you have received this email message in error, please immediately notify the sender by return email and permanently delete from your system, the original and any copies of this email and any attachments hereto and any printout hereof. Unauthorized interception of this email is a violation of federal criminal law. |