Skip to content

Instantly share code, notes, and snippets.

@progd
progd / get_ldrfullfeed_json.rb
Created April 29, 2012 00:56
Fetch LDRFullFeed JSON and fix type
# -*- coding: utf-8 -*-
require 'open-uri'
require 'json'
LDR_FULL_FEED_URL = 'http://wedata.net/databases/LDRFullFeed/items_all.json'
OUTFILE = 'ldrfullfeed.json'
REPLACE = {
'^http://matome\.naver\.jp/odai/[0-9]+/[0-9]+' => 'SUB',
'^http://matome\.naver\.jp/' => 'GEN',
@progd
progd / full_feed.rb
Created April 29, 2012 00:46
FilterFullFeed (Automatic Ruby plugin)
# -*- coding: utf-8 -*-
module Automatic::Plugin
class FilterFullFeed
require 'nokogiri'
SITEINFO_TYPES = %w[SBM INDIVIDUAL IND SUBGENERAL SUB GENERAL GEN]
def initialize(config, pipeline=[])
@config = config