From 1c9e58072b9b38563723bd9562a47169221abfb4 Mon Sep 17 00:00:00 2001 From: Johan Van de Wauw Date: Mon, 18 Nov 2024 01:01:13 +0100 Subject: [PATCH] Fringe pretalx (#264) * 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 --- content/fringe-events.yaml | 43 ------------------------------------ content/fringe.html | 22 ++++++++++-------- lib/data_sources/schedule.rb | 2 +- sample/export/pentabarf.yaml | 13 +++++++++++ 4 files changed, 27 insertions(+), 53 deletions(-) delete mode 100644 content/fringe-events.yaml diff --git a/content/fringe-events.yaml b/content/fringe-events.yaml deleted file mode 100644 index a4422f99..00000000 --- a/content/fringe-events.yaml +++ /dev/null @@ -1,43 +0,0 @@ ---- -kind: internal -events: - 'CHAOSScon EU 2025': - location: Brussels, Belgium - start: 2025-01-30 - end: 2025-01-30 - cost: $10 - registration: required - website: https://chaoss.community/chaosscon-2025-eu/ - contact: elizabeth@chaoss.community - 'DuckCon #6': - location: Amsterdam, The Netherlands - start: 2025-01-31 - end: 2025-01-31 - cost: free - registration: required - website: https://duckdb.org/2025/01/31/duckcon6 - contact: gabor@duckdb.org - 'Workshop on FOSS license and security compliance tools': - location: Brussels, Belgium - start: 2025-01-31 - end: 2025-01-31 - cost: €0 - €100 - registration: recommended - website: https://pretix.eu/aboutcode/fosdem-2025/ - contact: hello@aboutcode.org - 'Config Management Camp 2025': - location: Ghent, Belgium - start: 2025-02-03 - end: 2025-02-05 - cost: free - registration: required - website: https://cfgmgmtcamp.org - contact: info@cfgmgmtcamp.org - 'OpenEmbedded Workshop 2025': - location: Brussels, Belgium - start: 2025-02-03 - end: 2025-02-03 - cost: €75 - registration: required - website: https://pretalx.com/openembedded-workshop-2025/ - contact: philip@balister.org diff --git a/content/fringe.html b/content/fringe.html index e2e0c98f..417c40b1 100644 --- a/content/fringe.html +++ b/content/fringe.html @@ -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', {}) +%>

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. @@ -20,15 +24,15 @@ - <% $item_by_id.fetch('/fringe-events/')[:events].to_a.each do |event_name, meta| %> + <% fringe.each do |event_name, meta| %> - <%= event_name.to_s %> - <%= meta[:location] %> - - - <%= meta[:cost] %> - <%= meta[:registration] %> - <%= meta[:contact] %> + <%= event_name.to_s %> + <%= meta["location"] %> + <%= meta["starts"] %> + <%= meta["ends"] %> + <%= meta["cost"] %> + <%= meta["registration"] %> + "><%= meta["contact"] %> <% end %> diff --git a/lib/data_sources/schedule.rb b/lib/data_sources/schedule.rb index 81ba842e..cd2ce928 100644 --- a/lib/data_sources/schedule.rb +++ b/lib/data_sources/schedule.rb @@ -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) diff --git a/sample/export/pentabarf.yaml b/sample/export/pentabarf.yaml index 4eff541b..44566991 100644 --- a/sample/export/pentabarf.yaml +++ b/sample/export/pentabarf.yaml @@ -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: fosdem-test@fosdem.org + online: true + submitter: 1 +