#!/usr/bin/env ruby
require 'haml'
template = '
%div(style="margin:2em;border:0;background:#ffffcc;font-family:Georgia")
  %div(style="margin:1em")
    %h1(style="border-bottom:2px solid #fff")
      Name
    %p(style="margin-left:5%")
      Beschreibung
    %div(style="margin-left:10%;align:center")
      %h2 Bilder:
    - picCount.times do |i|
      %img(style="border:1px solid black;margin:20px;" src="https://simianer.de/ebay/#{picName}#{i+1}t.jpg")
      %br
    %div(style="clear:left")
    %br
    %br
    %p
      Bitte beachten Sie auch meine anderen Artikel!
Ersteigern Sie mehrere Artikel, so zahlen Sie nur 1x Versandkosten.
    %h3(style="margin-bottom:0px")
      Viel Spaß beim Bieten! :-)'
if __FILE__ == $0
  picName = ARGV[0]
  picCount = ARGV[1]
  haml_engine = Haml::Engine.new(template)
  puts haml_engine.render(
    Object.new,
    locals={:picName => picName, :picCount => picCount.to_i}
  )
end