Hipsters rejoice, you can actually make those high-tech IPS panels look like crap. Really nostalgic crap. [Kaveen Rodrigo] wrote in to show how he displays weather data as his Apple ][ emulated screensaver.
He’s building on the Apple2 package that is part of the xscreensaver available on Linux systems. The program has an option flag that allows you to run another program inside of it. This can be just about anything including using it as your terminal emulator. [Adrian] recently sent us the screenshot shown here for our retro edition. He is running bash and loaded up freenet just to enjoy what it used to be like in the good old days.
In this case, [Kaveen] is using Python to pull in, parse, and print out a Yahoo weather json packet. Since it’s just a program that is called when the screensaver is launched, you can use it as such or just launch it manually and fill your second monitor whenever not in use.
We gave it a whirl, altering his code to take a tuple of zip codes. Every hour it will pull down the data and redraw the screen. But we’ve put enough in there that you’ll be able to replace it with your own data in a matter of minutes. If you do, post a screenshot and what you’re using it for in the comments.
Here’s our example code:
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # # a2.py # Based on the work of Kaveen Rodrigo which can be found here: # http://geeknirvana.org/?p=4 # The original carried the following license: # # Copyright 2014 Kaveen Rodrigo <kaveenr@KNET> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, # MA 02110-1301, USA. # # import urllib2,json,time,os locationCodes = (53716,91105,17201) def getIt(postalCode): try: html = urllib2.urlopen("http://query.yahooapis.com/v1/public/yql?q=select%20item%20from%20weather.forecast%20where%20location%3D%22"+str(postalCode)+"%22&format=json").read() return json.loads(html) except: print("Are you on the innernet?") exit() def main(): while True: for code in locationCodes: js = getIt(code) print(js["query"]["results"]["channel"]["item"]["title"]) print(js["query"]["results"]["channel"]["item"]["condition"]["text"]+" Temp "+js["query"]["results"]["channel"]["item"]["condition"]["temp"]+" F") print print time.sleep(3600) os.system('clear') print " apple ][" print return 0 if __name__ == '__main__': main()
16 thoughts on “Apple ][ Graphics As Your Screensaver Or Second Screen”
Argh… I really need to take some time to learn python =/
It’s fun. Really good for small automation stuff. I use it daily for formatting text and other stuff.
I just use an apple II lol
Hah… Cut out the middleman!
In countries where PAL is the colour standard for video, we like NTSC is usually referred to as “Never Twice Same Colour”!
We suffered with our Apple video until an Australian company, McClaggin Wright, produced, amongst other things, a truly brilliant PAL video card.
I noticed it said 70C in the demo screenshot. As I’m sure you’d be roasted if it was going to be that hot, I figured you may want to replace “%22&format=json” with “%22and%20u%3D%22c%22&format=json”. That way you query the temperature in C and not in F. Otherwise you could just change the “C” to “F” in the print statement.
Fun screensaver :)
Screenshot shows temps of 70 C, 63 C and 71 C? I realise it’s summer in the northern hemishpere but I didn’t think it got that hot! :)
Mhhh, ok? so what’s new in this article? Did the exact thing 6 Years ago…
Yes, but you didn’t share it with us on Hack-a-Day. Besides, if you really want to get down to “who did it first”, I did the exact same thing, but using an actual Apple //e back in the 1980’s. So there.
My thoughts exactly. What is the next post going to be? “Man attaches two tubes together with ducttape.”
>This may not work out of the box in Ubuntu Read this to figure out.
For a simple screensaver one has to mess with some system internals. This is why desktop linux will always remain at that magical 1%.
Fun fact: about 1% of US children are autistic.
There is also ‘m6502’ in the xscreensaver collection. You know, the reimplementation of http://www.6502asm.com/ for your screen saver… :)
The link is broken… how unfortunate. .·´¯`(>▂<)´¯`·.
Gotta say that my real Apple II looks better than these screenshots. The Apple would make any two adjoining white pixels always white, so there was a lot less orange and blue tint to it than you get here especially for the inverse text. It would also kill the fringe in text modes entirely, and it was more likely you’d have green/purple fringe. (Both are possible, but the default would’ve been green/purple…)
But this is for the hipsters, not the folks who actually want actual retro stuff. ;)
Hahaha very funny…
Ghost Mannequin Effcet
Completely unrelated spam.
Please be kind and respectful to help make the comments section excellent. (Comment Policy)