Sha256: 4d4fb1dbdb04e72db8f58cfaddcf73fc72db439a8d56c80d110e21dbf30c0f10

Contents?: true

Size: 611 Bytes

Versions: 1

Compression:

Stored size: 611 Bytes

Contents

#!/usr/bin/env ruby
# frozen_string_literal: true

require 'pathname'
require 'yaml'
require 'optparse'

require 'jekyll-indico/cache'

options = { config: '_config.yml' }

OptionParser.new do |opts|
  opts.on('-c', '--config=FILE', 'Read a config file') do |c|
    options[:config] = c
  end
end.parse!

puts "Reading #{options[:config]}"

config = YAML.safe_load(File.read(options[:config]))
meeting_ids = JekyllIndico::Meetings.meeting_ids(config)
data_path = config.dig('indico', 'data') || 'indico'

JekyllIndico.cache(meeting_ids, data_path) do |name, number|
  puts "Accessing #{number} for #{name}"
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jekyll-indico-0.1.0 exe/jekyll-indico-cache