![]() ![]() n, -naming Show the image file-naming rules and exit. Use different backgrounds for different times. Specify time (in seconds) to wait before updating. h, -help show this help message and exit WeatherDesk - Change the wallpaper based on the weather This is the script mentioned in James Bridle book Ways of Being, in the chapter Seeing like a Planet.Usage: WeatherDesk.py Weatherdesk was inspired by Satellite Eyes, a Mac app by Tom Taylor, and by the amazing work of remote sensing satellites and those who make them possible. It would be great to have versions of the script for different operating systems, if anyone wants to fork this repo. something like: /home/stml/Documents/weatherdesk Further work The PATH_TO_DIRECTORY needs to be the full path to the folder containing the script, e.g. To do this on Linux, run sudo crontab -e in the terminal and add the following line to the cron file (a list of commands that is run automatically in the background):Ġ,30 * * * * cd /weatherdesk &. The file can be set to run automatically, and update the desktop with a more recent image, as often as you like. This line then enlarges the smaller cropped image to the full size, saving it with the same name. (This crops an area 638 pixels wide and 384 pixels high, offset 2290 pixels right and 842 pixels down)Ĭonvert -size 1276x768 cropped_source.png -magnify -unsharp 0x1 cropped_source.png In the second example,, a smaller area is cropped with the line:Ĭonvert source.png -crop 638x384+2290+842 cropped_source.png This line exits the file and closes the program. something like: /home/stml/Documents/weatherdesk/cropped_source.png The path needs to match the location of the file on your computer, and it needs to be the full path to work properly if the script is run automatically by a cron job (see below), e.g. This line sets cropped_source.png to be the desktop image. You also need to edit the cropping size if your desktop is a different size.ĭconf write "/org/gnome/desktop/background/picture-uri" "'file:////cropped_source.png'" ![]() Editing this line will change the area which is cropped. This line crops the source to a 1276x768 pixel image called cropped_source.png, offset 1736 pixels to the right, and 624 pixels down, which is the area of the image which includes the Mediterranean. This line downloads the latest EUMETSAT image at 4000x4000 pixel resolution, and saves it to a file named source.pngĬonvert source.png -crop 1276x768+1736+624 cropped_source.png This line opens the script, and tells the computer that this is a bash script. There are currently two example files, one which crops to the whole Mediterranean region () and one which crops (and enlarges) the Eastern Mediterranean, centred on Greece and the Aegean sea (). ![]() The images at the end of this file show examples of cropped areas. The above image shows a raw EUMETSAT image, with the cropped area shaded. white-background images - working on a fix for this!) (Unfortunately, the API has started returning non-alpha i.e. The image will be black white during local night time! At dawn and dusk, you will see the terminator, as the sun's light arrives and then leaves the hemisphere. These are two example bash scripts for downloading the latest EUMETSAT Natural Colour Enhanced RGB - MSG - 0 degree data - an image of Europe, Africa, and parts of Asia, updated by Meteosat every fifteen minutes - cropping it to an area, and setting it as a desktop image (on Linux systems). A simple script for creating a desktop picture from a near-live satellite image ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |