summaryrefslogtreecommitdiffstats
path: root/test_pdf.rb
blob: 8328ee62fdab219e81658f25dda52c3bcf06304e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
require_relative 'lib/registration'
require 'prawn'

params = {
  'name' => 'Imbalance',
  'city' => 'Oslo',
  'website' => 'http://imbalance.no',
  'label' => 'Calculated Imperfection',
  'shortbio' => 'Thrash metal from Norway',
  'members' => "Harald Eilertsen, Bass/Vocals\nWelle, Drums\nThormodr, Guitar",
  'contact' => {
    'name' => 'Harald Eilertsen',
    'addr' => "Gamleveien 13\n1289 Snufstad",
    'phone' => '98765432',
    'email' => 'mail@imbalance.no'
  },
  'songs' => {
    '1' => {
      'title' => 'Bestial by Nature',
      'time' => '02:80',
      'isrc' => '',
      'performers' => "Harald Eilertsen\nThormod Steinert\nLars Welle",
      'composers' => "Harald Eilertsen\nThormod Steinert",
      'notes' => 'Rævrukkje rum kjurr!'
    },
    '2' => {
      'title' => 'The Prophecy',
      'time' => '06:40',
      'isrc' => 'NO-2GC-12010001-1',
      'performers' => "Harald Eilertsen\nThormod Steinert\nLars Welle",
      'composers' => "Harald Eilertsen\nThormod Steinert",
      'notes' => 'Ulven kjæm!'
    }
  }
}

generate_pdf_for(Band.new(params), "output.pdf")