diff --git a/config.rb b/config.rb new file mode 100644 index 0000000..cb4315f --- /dev/null +++ b/config.rb @@ -0,0 +1,21 @@ +# coding: utf-8 +DB_HOST="127.0.0.1" +DB_PASS="" +DB_USER="matkant" +DB_DB="matkant" +OUTPUT_PATH="./pdf/" +YAML_BASE = { "author": "Christoffer Müller Madsen", + "city": "Aarhus", + "from": ["Falstersgade 18, 4. th", "8000 Aarhus C"], + 'currency': 'DKK', + 'commasep': true, + 'lang': 'danish', + 'seriffont': 'Linux Libertine', + 'sansfont': 'Linux Biolinum', + 'fontsize': '12pt', + 'geometry': 'a4paper, left=25mm, right=25mm, top=30mm, bottom=17mm', + 'closingnote': %Q[Overfør venligst det anførte beløb via MobilePay til +45 81 73 02 02 i løbet af de næste 14 dage. Alternativt kan QR-koden i bunden af siden benyttes. + +Med venlig hilsen +] } +MOBILEPAY_PHONE_NUMBER = "004581730202" diff --git a/invoice.rb b/invoice.rb index 0aa5db6..1eaecac 100644 --- a/invoice.rb +++ b/invoice.rb @@ -21,10 +21,13 @@ OptionParser.new do |opts| end opts.on("-m", "--mobilepay", "Generate QR codes for MobilePay") do |m| require 'rqrcode' - Options[:mobilepay] = true + Options[:mobilepay] = m end end.parse! +if Options[:draft] + Options[:mobilepay] = false +end Transaction = Struct.new(:time, :person, :product, :amount) diff --git a/output/201706-1.pdf b/output/201706-1.pdf new file mode 100644 index 0000000..4cfe544 Binary files /dev/null and b/output/201706-1.pdf differ diff --git a/pandoc/details.yml b/pandoc/details.yml new file mode 100644 index 0000000..ebef8a1 --- /dev/null +++ b/pandoc/details.yml @@ -0,0 +1,36 @@ +--- +author: Christoffer Müller Madsen +city: Aarhus +from: +- Falstersgade 18, 4. th +- 8000 Aarhus C +currency: DKK +commasep: true +lang: danish +seriffont: Linux Libertine +sansfont: Linux Biolinum +fontsize: 12pt +geometry: a4paper, left=25mm, right=25mm, top=30mm, bottom=17mm +closingnote: | + Overfør venligst det anførte beløb via MobilePay til +45 81 73 02 02 i løbet af de næste 14 dage. Alternativt kan QR-koden i bunden af siden benyttes. + + Med venlig hilsen +to: +- Christoffer Müller Madsen +- Ada-218 +invoice-nr: 201710-3 +service: +- description: Frikadelle med rugbrød og rødkål + pieceprice: 13 + price: 13.0 + amount: 1.0 +- description: Høj snegl med creme + pieceprice: 12 + price: 12.0 + amount: 1.0 +- description: Kaffe i krus (0.25 L) + pieceprice: 5 + price: 10.0 + amount: 2.0 +qrcode: true +--- diff --git a/pandoc/output.pdf b/pandoc/output.pdf new file mode 100644 index 0000000..7dcf03e Binary files /dev/null and b/pandoc/output.pdf differ diff --git a/pandoc/template.tex b/pandoc/template.tex index 3c21527..7883446 100644 --- a/pandoc/template.tex +++ b/pandoc/template.tex @@ -21,9 +21,9 @@ $if(letterhead)$ $endif$ $if(draft)$ -\usepackage{draftwatermark} -\SetWatermarkText{$drafttext$} -\SetWatermarkScale{1} + \usepackage[printwatermark]{xwatermark} + \usepackage{xcolor} +\newwatermark*[allpages,angle=45,scale=5,xpos=-1cm,ypos=2cm]{$drafttext$} $endif$ % TYPOGRAPHY diff --git a/pdf/201705-1.pdf b/pdf/201705-1.pdf new file mode 100644 index 0000000..c6af759 Binary files /dev/null and b/pdf/201705-1.pdf differ diff --git a/pdf/201705-2.pdf b/pdf/201705-2.pdf new file mode 100644 index 0000000..a6854fb Binary files /dev/null and b/pdf/201705-2.pdf differ diff --git a/pdf/201705-3.pdf b/pdf/201705-3.pdf new file mode 100644 index 0000000..32467c5 Binary files /dev/null and b/pdf/201705-3.pdf differ diff --git a/pdf/201705-4.pdf b/pdf/201705-4.pdf new file mode 100644 index 0000000..bae65d0 Binary files /dev/null and b/pdf/201705-4.pdf differ diff --git a/pdf/201705-5.pdf b/pdf/201705-5.pdf new file mode 100644 index 0000000..73af636 Binary files /dev/null and b/pdf/201705-5.pdf differ diff --git a/pdf/201706-1.pdf b/pdf/201706-1.pdf new file mode 100644 index 0000000..11644be Binary files /dev/null and b/pdf/201706-1.pdf differ diff --git a/pdf/201706-2.pdf b/pdf/201706-2.pdf new file mode 100644 index 0000000..e9d3831 Binary files /dev/null and b/pdf/201706-2.pdf differ diff --git a/pdf/201706-3.pdf b/pdf/201706-3.pdf new file mode 100644 index 0000000..ee9c7c9 Binary files /dev/null and b/pdf/201706-3.pdf differ diff --git a/pdf/201706-4.pdf b/pdf/201706-4.pdf new file mode 100644 index 0000000..7ef6a9e Binary files /dev/null and b/pdf/201706-4.pdf differ diff --git a/pdf/201707-1.pdf b/pdf/201707-1.pdf new file mode 100644 index 0000000..3550c61 Binary files /dev/null and b/pdf/201707-1.pdf differ diff --git a/pdf/201707-2.pdf b/pdf/201707-2.pdf new file mode 100644 index 0000000..c4bf6df Binary files /dev/null and b/pdf/201707-2.pdf differ diff --git a/pdf/201707-3.pdf b/pdf/201707-3.pdf new file mode 100644 index 0000000..bcdcb8a Binary files /dev/null and b/pdf/201707-3.pdf differ diff --git a/pdf/201707-4.pdf b/pdf/201707-4.pdf new file mode 100644 index 0000000..1e6388b Binary files /dev/null and b/pdf/201707-4.pdf differ diff --git a/pdf/201708-1.pdf b/pdf/201708-1.pdf new file mode 100644 index 0000000..5661fa2 Binary files /dev/null and b/pdf/201708-1.pdf differ diff --git a/pdf/201708-2.pdf b/pdf/201708-2.pdf new file mode 100644 index 0000000..16980f3 Binary files /dev/null and b/pdf/201708-2.pdf differ diff --git a/pdf/201708-3.pdf b/pdf/201708-3.pdf new file mode 100644 index 0000000..b9d523b Binary files /dev/null and b/pdf/201708-3.pdf differ diff --git a/pdf/201708-4.pdf b/pdf/201708-4.pdf new file mode 100644 index 0000000..ff66b81 Binary files /dev/null and b/pdf/201708-4.pdf differ diff --git a/pdf/201709-1.pdf b/pdf/201709-1.pdf new file mode 100644 index 0000000..1e9c9c5 Binary files /dev/null and b/pdf/201709-1.pdf differ diff --git a/pdf/201709-2.pdf b/pdf/201709-2.pdf new file mode 100644 index 0000000..85b0516 Binary files /dev/null and b/pdf/201709-2.pdf differ diff --git a/pdf/201709-3.pdf b/pdf/201709-3.pdf new file mode 100644 index 0000000..d6cb85f Binary files /dev/null and b/pdf/201709-3.pdf differ diff --git a/pdf/201709-4.pdf b/pdf/201709-4.pdf new file mode 100644 index 0000000..5637fba Binary files /dev/null and b/pdf/201709-4.pdf differ diff --git a/pdf/201710-1.pdf b/pdf/201710-1.pdf new file mode 100644 index 0000000..c4a15ef Binary files /dev/null and b/pdf/201710-1.pdf differ diff --git a/pdf/201710-2.pdf b/pdf/201710-2.pdf new file mode 100644 index 0000000..580de00 Binary files /dev/null and b/pdf/201710-2.pdf differ diff --git a/pdf/201710-3.pdf b/pdf/201710-3.pdf new file mode 100644 index 0000000..7dcf03e Binary files /dev/null and b/pdf/201710-3.pdf differ