Custom Weather Icon Set

The weather extension inside ADWExtensionPack supports custom weather icon sets.
Icon sets should be located inside the “AdwUserData/weatherthemes” folder. You must create the “weatherthemes” folder if doesn’t exist inside “AdwUserData”.

An icon set needs the follow data:

  1. Icon Set Name (Folder name leading by at least three numbers, for example 001IconSetExample)
  2. This folder defined in the step one must contain:
    • A folder named icons with all weather icons
    • A file named weather.xml with the icon set data
    • A file named preview.png with the icon set image preview

Look at the following image so you better understand the folder structure 😉

 

The most important file is weather.xml. This file assigns an icon to each weather condition code. Check the following example:


<?xml version="1.0" encoding="utf-8"?>
     <codes>
          <condition>
               <code>1</code>
               <day_icon>sunny.png</day_icon>
               <night_icon>night.png</night_icon>
          </condition>
          <condition>
               <code>2</code>
               <day_icon>sun_interval.png</day_icon>
               <night_icon>night_interval.png</night_icon>
          </condition> 
          ...
          ...
          ...
     </codes>  

Each condition can have one or more <code> tags, but can only have one <day_icon> tag and only one <night_icon> tag.
The icon filenames don’t matter, it only matters that they are properly linked inside the weather.xml file.

So, imagine we are creating a custom icon set but we don’t have (or we are lazy to create) images for every weather condition: we could reuse one of the images for more than one weather condition, like the following example:


<?xml version="1.0" encoding="utf-8"?>
     <codes>
          <condition>
               <code>1</code>
               <day_icon>sunny.png</day_icon>
               <night_icon>night.png</night_icon>
          </condition>
          <condition>
               <code>2</code>
               <code>3</code>
               <code>4</code>
               <day_icon>sun_interval.png</day_icon>
               <night_icon>night_interval.png</night_icon>
          </condition> 
          ...
          ...
          ...
     </codes>  

It’s important to acknowledge that if a code is not found in the file, the default sun will be used, so the file should have all the weather codes. In the next table you can see all the codes with the weather condition description for your information.

Code Description Example
1 Clear clear sky
2 Clouds few clouds
3 Clouds scattered clouds, broken clouds
4 Clouds overcast clouds
6 Atmosphere mist, smoke, haze, sand, dust whirls, fog, volcanic ash, squalls…
7 Snow light snow, snow, sleet, shower sleet, light rain and snow, rain and snow, light shower snow, shower snow…
8 Rain light rain, moderate rain, heavy intensity rain, very heavy rain…
9 Drizzle light intensity drizzle, drizzle, light intensity drizzle rain, drizzle rain, shower rain and drizzle….
10 Thunderstorm thunderstorm with light rain, thunderstorm with rain, light thunderstorm, ragged thunderstorm, thunderstorm with light drizzle, thunderstorm with drizzle
11 Rain freezing rain
13 Drizzle heavy intensity drizzle, heavy intensity drizzle rain, heavy shower rain and drizzle
14 Thunderstorm thunderstorm with heavy rain, heavy thunderstorm, thunderstorm with heavy drizzle
15 Snow heavy snow, heavy shower snow

And here is a sample icon set so you can unzip and check how the things work.