1086RE: RSS reader thread...
- Oct 1, 2013
Yes please Rich , it won't do any harm. Once you start hooking things to Twitter how long can you imagine it will be before getting asked 'Can I see my partner's Tweets' ! It's not an unfair question either, so I can see this going that way.
What I'ld like to aim for is to perhaps provide a disk image which 'just runs out of the box' I think each user needs to register their app with Twitter though, so that means hooking their Pi to the web, with a screen and keyboard, and registering.
For a non personal Twitter reading device I don't think much more needs to be done than to plug into the USB socket a USB pendrive, which contains a file (which has been written by a MAC,PC or Pi) containing the name of the wifi network, the passcode and a list of feeds which the user would like the Pi to read. After that it should 'just run' by replacing the USB stick with the wifi dongle and rebooting. (Just looking at keeping the price, and the power consumption, as low as possible by targeting a model A Pi. (No ethernet and only one USB socket, but 300mA at 5V instead of 700mA)
All the ideas are flying out sideways at the moment so I need to start drawing up a few boundary conditions. Maybe save private Twittering for a later upgrade ( A la Steve Jobs ;) )
---In firstname.lastname@example.org, <fixitsan@...> wrote:Yah, but yoiu know the problem now. Featurecreep.If I use f = urllib.urlopen('<RSS feed url from the BBC>'), and then scrape through the returned file for incidences of '<item>' I can easily get RSS feeds working too.And the problem with that is there are different flavours of script languages being used for RSS, so I need to make sure that I capture the header, and then , hopefully, there might be a Python module already built to deal with it !Chris---In email@example.com, <Thinwing@...> wrote:sounds great..cant wait till it functions on a smart socket array...kp couchIn a message dated 10/1/2013 10:55:46 A.M. Pacific Daylight Time, fixitsan@... writes:No I didn't need to go that far Rich. Opening Python 2.x with IDLE (not Python 3.x with IDLE3) I just used the inbuilt 'urlopen'As long as the public feed is accessible without logging into Twitter, IE it is available through a regular browser without logging into Twitter, EG https:// twitter.com/bbcnews , then URLLIB does all the SSL stuff required.I used ..import urllibf = urllib.urlopen('https://twitter.com/bbcnews')print (f.read())OKay, including the line 'import urllib' then it's 3 lines of codeReplacing'BBCNews' with 'NYTimes' also works.The caveat, apparently, is that SSL isn't checking security certificates using this methodChris---In firstname.lastname@example.org, <rich@...> wrote:Are you calling an eternal executable to get the twitter feed, or did you register an app with twitter and connect yourself using the twitter API? (can't imagine you could do that in two lines of code, though)...If you are worried about someone getting your source code, use a compiled language instead of Python.
RichOn Tue, Oct 1, 2013 at 9:30 AM, <fixitsan@...> wrote:
I've gone from a RF 802.11 module + pic + sd card + breadboard + hundreds of lines of difficult code
To A Raspberry Pi, and 2 , TWO, lines of code.
In fact, I am able to get an HTTPS (secured with SSL) off a public Twitter feed, www.twitter.com/bbcnews , and send the output straight to the screen.
But with a few more lines the Twitter page can go straight to a file for processing and scraping.
I think that this is the way forward for me, at least for now. A model 'A' Raspberry Pi board costs £22 (+vat), when you add the £5.50 for the wifi dongle it still comes in at under £30. That's probably less than buying the microcontroller solution I was previously working on.
RaspPi's only disadvantages are that it's larger and the code cannot be secured (flashed onto a chip with protection bits set), Neither of those are too offensive considering the opportunities it brings in return.
I like the fact that I can just 'get on with programming' without getting too tied up with the technicalities. It sort of reminds me of when I used to spend hours writing shareware for the Psion Organiser using OPL. Python seems just as good at getting the job done.
Hehe, 2 lines of code versus over 1000 !
---In email@example.com, <michail1@...> wrote:I have been mining Bitcoin using raspberry pi's for a while.I can confirm that memory cards make a huge diff. (So, I keep several with images pre-setup just in case they go bad.) Strangely, I have the worse luck with Sandisk.I typically don't use with monitors, but when I do, I use the cheap $7 HDMI to VGA adapters.Next time you buy a pi, just add the $5 to get the 8GB card with it. Cheaper than you can buy in a store and come loaded with the OS'es preloaded.MichailIn a message dated 9/26/2013 4:07:10 P.M. Pacific Daylight Time, fixitsan@... writes:
Hello from my Raspberry Pi !
I have to say that I didn't expect to have so many problems with SD Cards from different manufacturers, But in the end I've booted up successfully from an old Sandisk 2GB.
Wifi installation was painless, and I'm reading this back in a browser window displayed on my monitor via it's DVI input through an HDMI to DVI cable, between the monitor and the Pi.
In one USB slot is the small wifi dongle, in the other USB slot is my industrial keyboard with built in mouse.
I've rebooted a couple of times and the hardware comes up well each time so I'm on the way now. I've never touched python, I had a couple of African pythons as pets when I was a teenager but thats about it !
So now I need to do some research and start playing about.....hoping for a quiet day at work tomorrow, but at least the weekend is here anyway :)
- << Previous post in topic Next post in topic >>