summaryrefslogtreecommitdiff
path: root/ebay-template
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2014-08-10 11:19:38 +0100
committerPatrick Simianer <p@simianer.de>2014-08-10 11:19:38 +0100
commit5869505d64c04c536bdcd71a197ade918c36bf1c (patch)
tree6af5232a9f2e058f15230a370a960f89871a2b74 /ebay-template
init
Diffstat (limited to 'ebay-template')
-rwxr-xr-xebay-template37
1 files changed, 37 insertions, 0 deletions
diff --git a/ebay-template b/ebay-template
new file mode 100755
index 0000000..6c409cd
--- /dev/null
+++ b/ebay-template
@@ -0,0 +1,37 @@
+#!/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%")
+ %h2 Bilder:
+ - picCount.times do |i|
+ %a(href="http://simianer.de/ebay/#{picName}#{i+1}.jpg" target="_blank")
+ %img(style="border:2px solid blue;float:left;margin:20px;" src="http://simianer.de/ebay/#{picName}#{i+1}t.jpg")
+ %div(style="clear:left")
+ %br
+ %br
+ %p
+ Bitte beachten Sie auch meine <a href="http://shop.ebay.de/merchant/iuas81" target="_blank">anderen Artikel</a>!<br />Ersteigern Sie mehrere Artikel, so zahlen Sie nur 1x Versandkosten.
+ %h3(style="margin-bottom:0px")
+ Viel Spa&szlig; 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
+