We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4f0bac7 commit f8572aaCopy full SHA for f8572aa
_data/stats.yml
@@ -0,0 +1,2 @@
1
+---
2
+active_dojos: 180
update_profile.rb
@@ -0,0 +1,13 @@
+#!/usr/bin/env ruby
+
3
+require 'net/http'
4
+require 'json'
5
+require 'yaml'
6
7
+BASE_URL = 'https://coderdojo.jp'
8
+DOJO_STATS = JSON.parse Net::HTTP.get(URI.parse "#{BASE_URL}/stats.json"), symbolize_names: true
9
+STATS_PATH = '_data/stats.yml'
10
11
+stats = YAML.load_file(STATS_PATH)
12
+stats['active_dojos'] = DOJO_STATS[:active_dojos]
13
+YAML.dump stats, File.open(STATS_PATH, 'w')
0 commit comments