A Dashing widget that shows the current xkcd comic.
The widget will display the current comic if it was published today, and otherwise it will find a random one. This ensures there is a new comic shown every day.
The only dependency is json.
Add it to Dashing's Gemfile:
gem 'json'
and run bundle install
.
To use this widget, simply run:
dashing install fd453f2c31a9d0131c52
To add the widget to your dashboard, include the following snippet in the layout file:
<li data-row="1" data-col="1" data-sizex="1" data-sizey="1">
<div data-view="DailyXKCD" data-id="xkcd-of-the-day"></div>
</li>
The job to fetch a comic is run every day.
Hey @brockklein ... I pretty much did the same thing, but did not copy the png file anywhere (I think it's just an example file). It runs fine for me. I didn't edit anything at all after copying the files to the locations you specified. Perhaps the only difference is that my widgets/ folder is called "daily_xkcd" rather than "dailyxkcd" like you mention.