From b8ba03535bc834967d1613652d741c0e40960fa7 Mon Sep 17 00:00:00 2001 From: Martin Voigt Date: Fri, 27 Mar 2026 13:48:41 +0100 Subject: [PATCH 1/8] some scraper tests --- lib/ingestors/ingestor_factory.rb | 10 +++++-- .../pantraining/laserlab_event_ingestor.rb | 26 +++++++++++++++++++ 2 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 lib/ingestors/pantraining/laserlab_event_ingestor.rb diff --git a/lib/ingestors/ingestor_factory.rb b/lib/ingestors/ingestor_factory.rb index 9bd8169fd..555bbc180 100644 --- a/lib/ingestors/ingestor_factory.rb +++ b/lib/ingestors/ingestor_factory.rb @@ -12,8 +12,8 @@ def self.ingestors Ingestors::TessEventIngestor, Ingestors::ZenodoIngestor, Ingestors::OaiPmhIngestor, - Ingestors::GithubIngestor, - ] + taxila_ingestors + llm_ingestors + heptraining_ingestors + Ingestors::GithubIngestor + ] + taxila_ingestors + llm_ingestors + heptraining_ingestors + pantraining_ingestors end def self.taxila_ingestors @@ -57,6 +57,12 @@ def self.heptraining_ingestors ] end + def self.pantraining_ingestors + [ + Ingestors::Pantraining::PanIngestorB + ] + end + def self.ingestor_config @ingestor_config ||= ingestors.map do |i| [i.config[:key], i.config.merge(ingestor: i)] diff --git a/lib/ingestors/pantraining/laserlab_event_ingestor.rb b/lib/ingestors/pantraining/laserlab_event_ingestor.rb new file mode 100644 index 000000000..c77884650 --- /dev/null +++ b/lib/ingestors/pantraining/laserlab_event_ingestor.rb @@ -0,0 +1,26 @@ +require 'icalendar' +require 'nokogiri' +require 'open-uri' +require 'tzinfo' + +module Ingestors + module Pantraining + class LaserlabEventIngestor < Ingestor + def self.config + { + key: 'laserlab_event', + title: 'Laserlab Events', + category: :events + } + end + + def read(url) + @verbose = false + scrape_laserlab_events(url) + end + + scrape_laserlab_events(url) + html = get_html_from_url(url) + end + end +end From 7cfbdd9ee2fd44e90e84cf21beff2df296b9dedc Mon Sep 17 00:00:00 2001 From: Martin Voigt Date: Fri, 27 Mar 2026 17:28:06 +0100 Subject: [PATCH 2/8] space specific logos and footer configuration --- .gitignore | 1 + app/assets/stylesheets/application.scss | 5 +++++ app/views/about/us.html.erb | 3 ++- app/views/layouts/_footer.html.erb | 14 ++++++++++---- app/views/layouts/_supported_by.erb | 3 ++- app/views/spaces/_space.html.erb | 2 +- config/tess.example.yml | 3 +++ 7 files changed, 24 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 67cb83951..0373e1ceb 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ config/secrets.yml config/sunspot.yml config/tess.yml config/ingestion.yml +config/initializers/hosts.rb tmp/ solr/test/ solr/pids/ diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 91ebdbc39..0d22fbc5e 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -808,6 +808,11 @@ input[type=checkbox].field-lock + label:before, margin: 15px; } +.masonry-brick .space-logo { + padding: .5em; + border-radius: 4px; +} + .list-card { @include floating-card; border-radius: 8px; diff --git a/app/views/about/us.html.erb b/app/views/about/us.html.erb index f6cfa5980..b7c72b6a8 100644 --- a/app/views/about/us.html.erb +++ b/app/views/about/us.html.erb @@ -18,7 +18,8 @@ <% if TeSS::Config.funders.present? %>

<% TeSS::Config.funders.each do |funder| %> - <% unless funder[:only] && funder[:only] != 'about' %> + <% expected_space = current_space.default? ? 'default' : current_space.host %> + <% if (funder[:only].blank? || funder[:only] == 'about') && (funder[:space].blank? || funder[:space] == expected_space) %> <%= link_to(funder[:url], target: '_blank', rel: 'noopener') do -%> <%= image_tag(funder[:logo], class: 'funding-logo') -%> <% end %> diff --git a/app/views/layouts/_footer.html.erb b/app/views/layouts/_footer.html.erb index 939537e2f..966d0451d 100644 --- a/app/views/layouts/_footer.html.erb +++ b/app/views/layouts/_footer.html.erb @@ -1,9 +1,15 @@ +<% space_string_in_config = current_space.default? ? 'default' : current_space.host %> +