boramalper / himawaripy

Set near-realtime picture of Earth as your desktop background
http://labs.boramalper.org/himawaripy
MIT License
1.62k stars 239 forks source link

Add possibility to define a hourly offset or let the script calculate the offset #38

Closed dr1s closed 8 years ago

dr1s commented 8 years ago

I extended the script so you'll be able to define an offset or let the script calculate the offset depending on your local timezone. E.g. if you live in Europe and don't want to see the Earth by night.

I'm open for suggestions on reducing the modules the commit depends on.

This pull request is a cleaned up version of #25 and it's tested on OS X.

wngr commented 8 years ago

Works on Fedora with auto offset.

Zeustopher commented 8 years ago

Tested on Linux Mint 17.2 with Cinnamon with the auto offset and it works there also. I enjoy having the offset like this because I get to see more changes throughout the day than just a sliver of the earth.

dr1s commented 8 years ago

I merged the latest code to my branch so it doesn't conflict anymore.

boramalper commented 8 years ago

I'll merge it tonight (~5 hours later). Thanks! :)

boramalper commented 8 years ago

A question before merging: Why did you check whether hour_offset was greater than zero, instead of different than zero? Can't it be negative? Sorry, I got it now. :)

Also, I think we should treat it as an error, if auto_offset is set to True and yet hour_offsetis different than zero.

Lastly, why did you use | instead of or? Pardon me if they are different, but here they seem to have same effect.

dr1s commented 8 years ago

Also, I think we should treat it as an error, if auto_offset is set to True and yet hour_offset is different than zero.

Thats a valid point, so far i just treated auto_offset with a higher priority.

Lastly, why did you use | instead of or? Pardon me if they are different, but here they seem to have same effect.

Just a habit from using other languages. If it bothers you I can change it.

Let me see if i find the time to commit a patch tonight, because I won't find the time in the next 2 weeks.

boramalper commented 8 years ago

I'll do it, no worries. :)

Thanks a lot again!