Skip to content

Commit

Permalink
Fringe pretalx (#264)
Browse files Browse the repository at this point in the history
* Fetch fringe from pretalx yaml

* Make pretalx/penta schedule import safer

If we add new types such as stands/fringe events the
old code could add them to the schedule

* Add sample file

* Fix example fringe event
  • Loading branch information
johanvdw authored Nov 18, 2024
1 parent f70c3e5 commit 1c9e580
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 53 deletions.
43 changes: 0 additions & 43 deletions content/fringe-events.yaml

This file was deleted.

22 changes: 13 additions & 9 deletions content/fringe.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
---
title: Fringe
---

<%
file = @site.config.fetch(:pretalx).fetch(:meta_export_file)
pretalx_data = YAML.load_file(file)
fringe = pretalx_data.fetch('fringe', {})
%>
<p>
The FOSDEM Fringe consists of independent events involving free and open source software taking place in the days around the FOSDEM weekend.
They are organised independently of FOSDEM so please refer any questions to the contacts listed.
Expand All @@ -20,15 +24,15 @@
</tr>
</thead>
<tbody>
<% $item_by_id.fetch('/fringe-events/')[:events].to_a.each do |event_name, meta| %>
<% fringe.each do |event_name, meta| %>
<tr>
<td><a href="<%= meta[:website] %>"><%= event_name.to_s %></a></td>
<td><%= meta[:location] %></td>
<td><time><%= meta[:start] %></time></td>
<td><time><%= meta[:end] %></time></td>
<td><%= meta[:cost] %></td>
<td><%= meta[:registration] %></td>
<td><a href="mailto:<%= meta[:contact] %>"><%= meta[:contact] %></a></td>
<td><a href="<%= meta['url'] %>"><%= event_name.to_s %></a></td>
<td><%= meta["location"] %></td>
<td><%= meta["starts"] %></td>
<td><%= meta["ends"] %></td>
<td><%= meta["cost"] %></td>
<td><%= meta["registration"] %></td>
<td><a href="mailto:<%= meta["contact"] %>"><%= meta["contact"] %></a></td>
</tr>
<% end %>
</tbody>
Expand Down
2 changes: 1 addition & 1 deletion lib/data_sources/schedule.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def to_items(hash, name)

r = []
cache.each do |k, v|
if k[-1] == 's'
if ['days', 'rooms', 'tracks', 'events', 'speakers'].include?(k)
name = k[0..-2]
v.each do |id, meta|
r << Nanoc3::Item.new('', meta, "/schedule/#{name}/#{id}/", mtime)
Expand Down
13 changes: 13 additions & 0 deletions sample/export/pentabarf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -193,3 +193,16 @@ speakers:
saturday:
- test_event
sunday: []
fringe:
test:
name: demo fringe event
url: https://archive.fosdem.org
location: test
starts: '2022-02-03'
ends: '2022-03-03'
cost: €100
registration: recommended
contact: [email protected]
online: true
submitter: 1

0 comments on commit 1c9e580

Please sign in to comment.