|
|
@@ -1,6 +1,7 @@ |
|
|
|
require 'scraperwiki' |
|
|
|
require 'petrify' |
|
|
|
require 'csv' |
|
|
|
require 'json' |
|
|
|
|
|
|
|
class Site |
|
|
|
def self.generate |
|
|
@@ -25,6 +26,10 @@ class Site |
|
|
|
{ summary: summary, last_updated: last_updated }) |
|
|
|
Petrify.csv(path, 'inlink-summary', summary) |
|
|
|
|
|
|
|
# Generate a JSON file with all the data |
|
|
|
apps = ScraperWiki.select("* from applications") |
|
|
|
Petrify.file(path, 'data.json', apps.to_json) |
|
|
|
|
|
|
|
# New applications page |
|
|
|
apps = ScraperWiki.select("* from `applications` |
|
|
|
order by date_received desc limit 60") |
|
|
|