Created
February 20, 2015 11:09
-
-
Save pezholio/50977eb34e70cf282abf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"bot_id": "test-address-bot", | |
"title": "My simple bot", | |
"description": "This is a simple bot", | |
"language": "ruby", | |
"data_type": "address", | |
"files": [ | |
"scraper.rb" | |
], | |
"frequency": "monthly", | |
"publisher": { | |
"name": "Publisher of the data", | |
"url": "Publisher's website", | |
"terms": "Copyright terms (e.g. Open Government License, n/a, etc)", | |
"terms_url": "A place where these terms can be checked or verified" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
require 'json' | |
require 'turbotlib' | |
Turbotlib.log("Starting run...") # optional debug logging | |
(1...30).each do |n| | |
data = { | |
"saon" => "", | |
"paon" => n.to_s, | |
"street" => "Southlands Drive", | |
"locality" => "Timsbury", | |
"town" => "Bath", | |
"postcode" => "BA2 0HB" | |
} | |
# The Turbot specification simply requires us to output lines of JSON | |
puts JSON.dump(data) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment