Add facebook fetch command
This commit is contained in:
parent
c9bc76f696
commit
878e46a711
4 changed files with 10 additions and 3 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -18,3 +18,5 @@ node_modules/
|
||||||
*.iml
|
*.iml
|
||||||
|
|
||||||
.author-information
|
.author-information
|
||||||
|
|
||||||
|
.fb_token
|
||||||
|
|
|
@ -3,7 +3,7 @@ title: 25h codenight
|
||||||
image: https://zeus.ugent.be/zeuswpi/FS1Hc2l8.png
|
image: https://zeus.ugent.be/zeuswpi/FS1Hc2l8.png
|
||||||
description: 1 uur voor elk levensjaar van Zeus!
|
description: 1 uur voor elk levensjaar van Zeus!
|
||||||
created_at: 11-10-2016
|
created_at: 11-10-2016
|
||||||
time: 1-11-2016
|
time: 01-11-2016 00:00
|
||||||
location: Therminal
|
location: Therminal
|
||||||
banner: https://zeus.ugent.be/zeuswpi/vRX2hOYZ.png
|
banner: https://zeus.ugent.be/zeuswpi/vRX2hOYZ.png
|
||||||
locationlink: Hoveniersberg, Gent
|
locationlink: Hoveniersberg, Gent
|
||||||
|
|
|
@ -16,7 +16,7 @@ module IcalHelper
|
||||||
e.dtstart = Icalendar::Values::DateTime.new item[:time], 'tzid' => tzid
|
e.dtstart = Icalendar::Values::DateTime.new item[:time], 'tzid' => tzid
|
||||||
e.dtend = Icalendar::Values::DateTime.new item[:end], 'tzid' => tzid if item[:end]
|
e.dtend = Icalendar::Values::DateTime.new item[:end], 'tzid' => tzid if item[:end]
|
||||||
e.summary = item[:title]
|
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.location = item[:location]
|
||||||
e.url = @config[:base_url] + item.path
|
e.url = @config[:base_url] + item.path
|
||||||
|
|
||||||
|
|
|
@ -38,8 +38,13 @@ module PreprocessHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
def convert_event_time_to_timestamps
|
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[:time] = DateTime.parse(event[:time])
|
||||||
|
|
||||||
|
event[:end] = event[:end].to_s if event[:end]
|
||||||
event[:end] = DateTime.parse(event[:end]) if event[:end]
|
event[:end] = DateTime.parse(event[:end]) if event[:end]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue