Class: Jekyll::Commands::Hoffnung3000

Inherits:
Command
  • Object
show all
Defined in:
lib/jekyll/commands/hoffnung3000.rb

Overview

Commands for archiving a HOFFNUNG3000 festival in a Jekyll website

Class Method Summary collapse

Class Method Details

.init_with_program(prog) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/jekyll/commands/hoffnung3000.rb', line 10

def init_with_program(prog)
  prog.command(:hoffnung3000) do |c|
    c.description "Archival tool for HOFFNUNG3000 festivals."
    c.syntax "hoffnung3000 <subcommand>"
    c.command(:events) do |f|
      f.description "Fetch all events and write to _data folder as events.json."
      f.action do |_args, _options|
        get_hoffnung(Jekyll.configuration({}), "events")
      end
    end
    c.command(:places) do |f|
      f.description "Fetch all places and write to _data folder as places.json."
      f.action do |_args, _options|
        get_hoffnung(Jekyll.configuration({}), "places")
      end
    end
    c.command(:places) do |f|
      f.description "Fetch festival meta data and write to _data folder as meta.json."
      f.action do |_args, _options|
        get_hoffnung(Jekyll.configuration({}), "meta")
      end
    end
  end
end