Skip to content

Instantly share code, notes, and snippets.

@pezholio
Created February 20, 2015 11:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pezholio/50977eb34e70cf282abf to your computer and use it in GitHub Desktop.
Save pezholio/50977eb34e70cf282abf to your computer and use it in GitHub Desktop.
{
"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"
}
}
# -*- 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