{"image_url":null,"url":"https://torazuka.hatenablog.com/entry/20160112/doukaku","blog_url":"https://torazuka.hatenablog.com/","author_url":"https://blog.hatena.ne.jp/torazuka/","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftorazuka.hatenablog.com%2Fentry%2F20160112%2Fdoukaku\" title=\"\u3069\u3046\u66f8\u304f: \u53c2\u8003\u554f\u984c1\u300c\u30dd\u30fc\u30ab\u30fc\u300d - \u864e\u585a\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","published":"2016-01-12 00:00:00","description":"\u6765\u6708\u306f\u3072\u3055\u3057\u3076\u308a\u306b\u3069\u3046\u66f8\u304f\u306b\u53c2\u52a0\u3059\u308b\u306e\u3067\u3001\u30ea\u30cf\u30d3\u30ea\u306b\u53c2\u8003\u554f\u984c1\u3092\u89e3\u304d\u307e\u3057\u305f\u3002Ruby\u3067\u3002 \u554f\u984c: \u52c9\u5f37\u4f1a - \u7b2c\u4e00\u56de \u30aa\u30d5\u30e9\u30a4\u30f3\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u3069\u3046\u66f8\u304f\u306e\u53c2\u8003\u554f\u984c - Qiita #!/usr/bin/ruby def is_fourcards (cs) return cs.has_value?(4) end def is_threecards (cs) return cs.has_value?(3) end def cnt_pairs (cs) return cs.select {|k,v| v == 2}.length end input = ARGV[0] ws = input.gsub(/\u2026","categories":["\u3069\u3046\u66f8\u304f"],"author_name":"torazuka","type":"rich","width":"100%","blog_title":"\u864e\u585a","height":"190","provider_name":"Hatena Blog","title":"\u3069\u3046\u66f8\u304f: \u53c2\u8003\u554f\u984c1\u300c\u30dd\u30fc\u30ab\u30fc\u300d","version":"1.0","provider_url":"https://hatena.blog"}