Module: JekyllIndico
- Defined in:
- lib/jekyll-indico/cache.rb,
lib/jekyll-indico/core.rb,
lib/jekyll-indico/version.rb,
lib/jekyll-indico/generator.rb
Overview
The main module for this package.
Defined Under Namespace
Classes: Error, GetIndico, Meetings, MissingIDs, MissingURL
Constant Summary collapse
- VERSION =
'0.6.2'
Class Method Summary collapse
-
.cache(base_url, meeting_ids, data_path) ⇒ Object
This will cache the hash of meeting IDs given into the data_path in _data in the current directory.
Class Method Details
.cache(base_url, meeting_ids, data_path) ⇒ Object
This will cache the hash of meeting IDs given into the data_path in _data in the current directory.
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/jekyll-indico/cache.rb', line 12 def self.cache(base_url, meeting_ids, data_path) meeting_ids.each do |name, number| yield name, number indico_dir = Pathname.new('_data') / data_path folder = indico_dir / name.to_s indico_dir.mkdir unless indico_dir.directory? folder.mkdir unless folder.directory? iris_meeting = JekyllIndico::Meetings.new(base_url, number) iris_meeting.to_files(folder) { |key| puts "Making #{folder / key}.yml\n" } end end |