Show weather information
From DISE KnowledgeBase
In this tutorial we are going to make a box displaying weather data and icons, fetched from an RSS feed.
Step by step
For this tutorial, we are using a weather feed offered by the Norwegian Meteorological Institute and the Norwegian Broadcasting Corporation, information provided at [1].
- In Dise RSS Reader, click Add to enter a new feed.
- in the feed settings window, enter The name Stockholm and the URL http://www.yr.no/place/Sweden/Stockholm/Stockholm/forecast.rss. Under Output file, enter C:\rss\weather\stockholm.txt.
- Un-check the box Include description of feed (at the top)
- We only want the 5 first items, so tick the checkbox Maximum numbers of news items to include and enter 5.
- In the tab field in the top right corner, scroll until you reach the tab Download enclosed files.
- Tick the Download enclosed files (images) box and browse to the directory C:\rss\weather.
- Under Main part of file name enter Weather and under Default file if a file could not be downloaded enter Default.png.
Designing the information box
- In Dise Composer, create a new Dise Movie.
- Insert a table object.
- Select the Table format tab and enter 5 under Rows and 2 under Columns.
- Select the Data tab and click the Connect data button.
- Browse to the file C:\rss\weather\stockholm.txt downloaded by RSS Reader.
- Tick the Row procesing checkbox and enter the values From Row: 1, To Row: 5.
- Tick the Column procesing checkbox and enter the values From Column: 1, To Column: 2 and under Field delimiter: - (dash).
- Select the Options tab, right-click and select all in the preview area and tick the Word break checkbox.
- Select the Text tab and make format changes to fit. I chose to make the first column bold and used the font Palatino Linotype with size 12.
- Now you will have something like this:
- For the icons, insert a new table object.
- Select the Table format tab and enter 5 under Rows and 1 under Columns.
- Select the images tab.
- Select the first cell and tick the Image cell (text is filename) checkbox.
- Click browse and select the file C:\rss\weather\Weather1.image downloaded by RSS Reader.
- Tick the Use image alpha checkbox.
- Repeat the last three steps for the rest of the cells.
- Select the two table objects by holding shift and clicking.
- Align them to top by clicking the
button.
- Make them the same height by holding shift and click the
button.
- Insert a white rounded rectangle shape.
- Select it, right-click and select Edit Object settings, then go to the Transparency tab in the Object settings tool.
- Tick the Gradient transparency checkbox and press the down arrow in the transparency direction tool.
- Place the weather information on the rounded rectangle.
Result