mirror of
https://github.com/seigler/dash-docs
synced 2025-07-27 09:46:12 +00:00
Define events' date in YAML and continue displaying events 5 days after their start date (fixes #361)
This commit is contained in:
parent
2cc99dbbed
commit
6e2960d1ba
24 changed files with 26 additions and 8 deletions
|
@ -104,6 +104,7 @@ Events should be placed in `_events/YYYY-MM-DD-SHORTTITLE.md` and adhere to this
|
||||||
|
|
||||||
```
|
```
|
||||||
---
|
---
|
||||||
|
date: 2014-02-21
|
||||||
title: "2014 Texas Bitcoin Conference"
|
title: "2014 Texas Bitcoin Conference"
|
||||||
venue: "Circuit of the Americas™ - Technology and Conference Center"
|
venue: "Circuit of the Americas™ - Technology and Conference Center"
|
||||||
address: "9201 Circuit of the Americas Blvd"
|
address: "9201 Circuit of the Americas Blvd"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
---
|
---
|
||||||
|
date: 2014-02-21
|
||||||
title: "Berlin, Texas: Bitcoin hackathon"
|
title: "Berlin, Texas: Bitcoin hackathon"
|
||||||
venue: "c-base Raumstation"
|
venue: "c-base Raumstation"
|
||||||
address: "Rungestraße 20, 10179"
|
address: "Rungestraße 20, 10179"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
---
|
---
|
||||||
|
date: 2014-03-05
|
||||||
title: "Bitcoin and Virtual Money"
|
title: "Bitcoin and Virtual Money"
|
||||||
venue: "NYSSA Conference Center"
|
venue: "NYSSA Conference Center"
|
||||||
address: "1540 Broadway"
|
address: "1540 Broadway"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
---
|
---
|
||||||
|
date: 2014-03-06
|
||||||
title: "2014 Texas Bitcoin Conference"
|
title: "2014 Texas Bitcoin Conference"
|
||||||
venue: "Circuit of the Americas™ - Technology and Conference Center"
|
venue: "Circuit of the Americas™ - Technology and Conference Center"
|
||||||
address: "9201 Circuit of the Americas Blvd"
|
address: "9201 Circuit of the Americas Blvd"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
---
|
---
|
||||||
|
date: 2014-03-18
|
||||||
title: "Bitcoinference 2014"
|
title: "Bitcoinference 2014"
|
||||||
venue: "Amsterdam Science Park 123"
|
venue: "Amsterdam Science Park 123"
|
||||||
address: "1098 XG"
|
address: "1098 XG"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
---
|
---
|
||||||
|
date: 2014-03-20
|
||||||
title: "Commercism Bitcoinference"
|
title: "Commercism Bitcoinference"
|
||||||
venue: "Microsoft Conference Center"
|
venue: "Microsoft Conference Center"
|
||||||
address: "1065 La Avenida Street, Building 1"
|
address: "1065 La Avenida Street, Building 1"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
---
|
---
|
||||||
|
date: 2014-03-21
|
||||||
title: "Amsterdam MoneyLab: Coining Alternatives"
|
title: "Amsterdam MoneyLab: Coining Alternatives"
|
||||||
venue: "Lab 111"
|
venue: "Lab 111"
|
||||||
address: "111 Arie Biemondstraat"
|
address: "111 Arie Biemondstraat"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
---
|
---
|
||||||
|
date: 2014-03-25
|
||||||
title: "CoinSummit"
|
title: "CoinSummit"
|
||||||
venue: "Yerba Buena Center for the Arts"
|
venue: "Yerba Buena Center for the Arts"
|
||||||
address: "701 Mission Street"
|
address: "701 Mission Street"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
---
|
---
|
||||||
|
date: 2014-03-27
|
||||||
title: "Bitcoin and Cryptocurrency Research Conference"
|
title: "Bitcoin and Cryptocurrency Research Conference"
|
||||||
venue: "Friend Center Convocation Room, Princeton University"
|
venue: "Friend Center Convocation Room, Princeton University"
|
||||||
address: "303 Sherrerd Hall"
|
address: "303 Sherrerd Hall"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
---
|
---
|
||||||
|
date: 2014-04-03
|
||||||
title: "Swedish Bitcoin Conference 2014"
|
title: "Swedish Bitcoin Conference 2014"
|
||||||
venue: "Finlandshuset Conference Center"
|
venue: "Finlandshuset Conference Center"
|
||||||
address: "Snickarbacken 4"
|
address: "Snickarbacken 4"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
---
|
---
|
||||||
|
date: 2014-04-07
|
||||||
title: "Inside Bitcoins NYC"
|
title: "Inside Bitcoins NYC"
|
||||||
venue: "Javits Convention Center"
|
venue: "Javits Convention Center"
|
||||||
address: "655 West 34th Street"
|
address: "655 West 34th Street"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
---
|
---
|
||||||
|
date: 2014-04-11
|
||||||
title: "Bitcoin Expo 2014"
|
title: "Bitcoin Expo 2014"
|
||||||
venue: "Metro Toronto Convention Centre"
|
venue: "Metro Toronto Convention Centre"
|
||||||
address: "255 Front St W"
|
address: "255 Front St W"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
---
|
---
|
||||||
|
date: 2014-04-23
|
||||||
title: "Bitcoin Conference Russia"
|
title: "Bitcoin Conference Russia"
|
||||||
venue: "Business club Cabinet Lounge"
|
venue: "Business club Cabinet Lounge"
|
||||||
address: "No. 6 Novaya Ploshad, 109012"
|
address: "No. 6 Novaya Ploshad, 109012"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
---
|
---
|
||||||
|
date: 2014-05-10
|
||||||
title: "Global Bitcoin Summit 2014"
|
title: "Global Bitcoin Summit 2014"
|
||||||
venue: "China National Convention Center"
|
venue: "China National Convention Center"
|
||||||
address: "No.7 Tianchen East Road"
|
address: "No.7 Tianchen East Road"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
---
|
---
|
||||||
|
date: 2014-05-15
|
||||||
title: "Bitcoin Foundation Bitcoin 2014"
|
title: "Bitcoin Foundation Bitcoin 2014"
|
||||||
venue: "Passenger Terminal"
|
venue: "Passenger Terminal"
|
||||||
address: "Piet Heinkade 271019 BR"
|
address: "Piet Heinkade 271019 BR"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
---
|
---
|
||||||
|
date: 2014-05-31
|
||||||
title: "Central Europe Bitcoin Expo"
|
title: "Central Europe Bitcoin Expo"
|
||||||
venue: "Austria Center Vienna"
|
venue: "Austria Center Vienna"
|
||||||
address: "Bruno-Kreisky-Platz 1"
|
address: "Bruno-Kreisky-Platz 1"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
---
|
---
|
||||||
|
date: 2014-06-20
|
||||||
title: "Bitcoin in the Beltway"
|
title: "Bitcoin in the Beltway"
|
||||||
venue: "Marriott Renaissance Downtown"
|
venue: "Marriott Renaissance Downtown"
|
||||||
address: "999 9th St NW"
|
address: "999 9th St NW"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
---
|
---
|
||||||
|
date: 2014-06-24
|
||||||
title: "Inside Bitcoins Conference & Expo"
|
title: "Inside Bitcoins Conference & Expo"
|
||||||
venue: "Hong Kong SkyCity Marriott Hotel"
|
venue: "Hong Kong SkyCity Marriott Hotel"
|
||||||
address: "1 Sky City Road East"
|
address: "1 Sky City Road East"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
---
|
---
|
||||||
|
date: 2014-07-09
|
||||||
title: "Inside Bitcoins Conference & Expo"
|
title: "Inside Bitcoins Conference & Expo"
|
||||||
venue: "Melbourne Convention and Exhibition Centre"
|
venue: "Melbourne Convention and Exhibition Centre"
|
||||||
address: "South Wharf VIC 3006"
|
address: "South Wharf VIC 3006"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
---
|
---
|
||||||
|
date: 2014-08-25
|
||||||
title: "Camp Bitcoin"
|
title: "Camp Bitcoin"
|
||||||
venue: "The Burning Man camp"
|
venue: "The Burning Man camp"
|
||||||
address: ""
|
address: ""
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
---
|
---
|
||||||
|
date: 2014-09-01
|
||||||
title: "World Bitcoin Forum 2014"
|
title: "World Bitcoin Forum 2014"
|
||||||
venue: "The Bundeshaus"
|
venue: "The Bundeshaus"
|
||||||
address: "Platz der Vereinten Nationen 2"
|
address: "Platz der Vereinten Nationen 2"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
---
|
---
|
||||||
|
date: 2014-09-15
|
||||||
title: "Inside Bitcoins London"
|
title: "Inside Bitcoins London"
|
||||||
venue: "The Grange"
|
venue: "The Grange"
|
||||||
address: "10 Godliman St"
|
address: "10 Godliman St"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
---
|
---
|
||||||
|
date: 2014-11-02
|
||||||
title: "Bitcoin World at Money2020"
|
title: "Bitcoin World at Money2020"
|
||||||
venue: "Aria"
|
venue: "Aria"
|
||||||
address: "3730 Las Vegas Blvd"
|
address: "3730 Las Vegas Blvd"
|
||||||
|
|
|
@ -94,16 +94,11 @@ module Jekyll
|
||||||
Dir.foreach('_events') do |file|
|
Dir.foreach('_events') do |file|
|
||||||
# Skip events with malformed name
|
# Skip events with malformed name
|
||||||
next if file == '.' or file == '..'
|
next if file == '.' or file == '..'
|
||||||
date = file.split('-')
|
|
||||||
next if date.length < 4
|
|
||||||
next if !/^[0-9]{4}$/.match(date[0])
|
|
||||||
next if !/^[0-9]{2}$/.match(date[1])
|
|
||||||
next if !/^[0-9]{2}$/.match(date[2])
|
|
||||||
# Skip event if not in the future
|
|
||||||
next if Time.new.to_i > Time.new(date[0].to_i,date[1].to_i,date[2].to_i).to_i
|
|
||||||
# Assign variables
|
# Assign variables
|
||||||
data = YAML.load_file('_events/'+file)
|
data = YAML.load_file('_events/'+file)
|
||||||
data['date'] = date[0] + '-' + date[1] + '-' + date[2]
|
# Skip event if it has started more than five days ago
|
||||||
|
date = data['date'].to_s.split('-')
|
||||||
|
next if Time.new.to_i > (Time.new(date[0].to_i,date[1].to_i,date[2].to_i).to_i + 432000)
|
||||||
# Get geolocalisation data from Google Maps
|
# Get geolocalisation data from Google Maps
|
||||||
begin
|
begin
|
||||||
geoloc = JSON.parse(open("https://maps.googleapis.com/maps/api/geocode/json?address=" + CGI::escape(data['address'] + ', ' + data['city'] + ', ' + data['country']) + "&sensor=false","User-Agent"=>"Ruby/#{RUBY_VERSION}").read)
|
geoloc = JSON.parse(open("https://maps.googleapis.com/maps/api/geocode/json?address=" + CGI::escape(data['address'] + ', ' + data['city'] + ', ' + data['country']) + "&sensor=false","User-Agent"=>"Ruby/#{RUBY_VERSION}").read)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue