Add facebook fetch command

This commit is contained in:
Lorin Werthen 2017-10-03 14:07:39 +02:00
parent c9bc76f696
commit 878e46a711
No known key found for this signature in database
GPG key ID: F11FFC921E0E08E0
4 changed files with 10 additions and 3 deletions

2
.gitignore vendored
View file

@ -18,3 +18,5 @@ node_modules/
*.iml
.author-information
.fb_token

View file

@ -3,7 +3,7 @@ title: 25h codenight
image: https://zeus.ugent.be/zeuswpi/FS1Hc2l8.png
description: 1 uur voor elk levensjaar van Zeus!
created_at: 11-10-2016
time: 1-11-2016
time: 01-11-2016 00:00
location: Therminal
banner: https://zeus.ugent.be/zeuswpi/vRX2hOYZ.png
locationlink: Hoveniersberg, Gent

View file

@ -16,7 +16,7 @@ module IcalHelper
e.dtstart = Icalendar::Values::DateTime.new item[:time], 'tzid' => tzid
e.dtend = Icalendar::Values::DateTime.new item[:end], 'tzid' => tzid if item[:end]
e.summary = item[:title]
e.description = item[:description] + "\n\n" + item.reps[:text].compiled_content
e.description = "#{item[:description]}\n\n#{item.reps[:text].compiled_content}"
e.location = item[:location]
e.url = @config[:base_url] + item.path

View file

@ -38,8 +38,13 @@ module PreprocessHelper
end
def convert_event_time_to_timestamps
all_events.each do |event|
@items.find_all('/events/*/*.md').each do |event|
# HACK: Strings in a format like "2017-10-05T20:45:00+0200" automatically get converted to Time
event[:time] = event[:time].to_s
event[:time] = DateTime.parse(event[:time])
event[:end] = event[:end].to_s if event[:end]
event[:end] = DateTime.parse(event[:end]) if event[:end]
end
end