This is Dashing widget and all components needed to retrieve, store and show daily strips from Dilbert. It is inspired by RandomAww widget.
##Usage
The latest version of this widget needs my slightly improved standard image widget. Put the daily_dilbert.rb
file in your /jobs
folder.
Make sure directory /assets/images/daily_dilbert
is created and accessible by Dashing user.
To include the widget in a dashboard, add the following snippet to the dashboard layout file:
<li data-row="1" data-col="1" data-sizex="3" data-sizey="1">
<div data-id="daily_dilbert" data-view="Image" data-width="100%"></div>
</li>
##Settings
Widget is made to support proxy server. If you have one, specify its url in PROXY in /jobs/daily_dilbert.rb
.
To minimize requests to strip web site daily strip is downloaded once a day at 7:00. The same scheduler task used to download image and show the same image on dashboard until 11:00 when another scheduler job starts and cycles through all existing image files in /assets/images/daily_dilbert
. The list of images is ordered by name (name is date) and then reversed to see newest strips first. By default, strip is rotated every 15 minutes. Please amend parameters if needed. I think, source code is self explanatory ;).
The every 15 minute
job is unscheduled ~6:00 to avoid collision with strip downloader job.
Chronic gem is causing me grief :-(
did gem install chronic .. says its there but for some reason dashing doesnt see it.