Show HN: Set NASA APOD as Ubuntu Desktop Background
github.com
github.com
I wrote a little parser for this site a while back to display the daily photo as a desktop gadget, and had to resort to the same hack to get the image out. It's a shame there isn't a rss feed for this yet.. it is a bit hard to be believe that in this day and age, thousands of pieces of code around the world are relying on how one guy decided to write his html.
[Ninja Edit:] For what it is worth, here's the regex I actually ended up using:
^<a\s*?href\s*?=\s*?['"](image/.+?)\1\s*?>$
but obviously, this is equally fragile.One quick suggestion: I think it would be more straightforward if you used the GSettings API through PyGObject rather than running the gsettings command.
I will definitely check out PyGObject. I didn't even know it existed.
http://www.peachpit.com/blogs/blog.aspx?uk=Mac-Productivity-...
I'd recommend changing it to "Get URLs of images linked from these webpages" though, to get the high-res version.
Err, I don't know what's polite in terms of editing the readme and stuff. I hope what I did is acceptable.
It only sets it for the space I'm on when I run the script. I have no idea what will happen with crontab. But, you can also just use this to populate the folder, and have osx change the photo every hour or so from the menu.
I also removed the re-sizing. If you want to install the python imaging library, `brew install pil` works. Then just uncomment the function.
fbsetbg -c $the_fileChange them to your screen's resolution.
Unfortunately, I'm still saving up for my first Macbook. Otherwise: I'd be all over this request for you.
This made me think of someone getting stuck living in an airport and writing this script because they miss the stars.
Which is in no way relevant or particularly useful, admittedly.
I wouldn't say I'm stuck. The images of stars are my own little gateways to the Universe. I can't ever be "stuck" when I'm looking at them. I have a fascination with the stars and all things to do with space & quantum physics, so it works perfectly for me. I guess it's just something I've always been drawn to. I even have a tattoo which represents these things.
I find the stars and all celestial bodies to be comforting, beautiful, and quite inspirational. Much more than just a plain background.