summaryrefslogtreecommitdiffstats
path: root/generation/passlist.rb
diff options
context:
space:
mode:
authorholger <holgercremer@gmail.com>2019-11-01 21:55:22 +0100
committerGitHub <noreply@github.com>2019-11-01 21:55:22 +0100
commit04e0406316320f6039365b80de8c58c3c58413c5 (patch)
treece31b694a0f2604ea16a9ae5580426ea666941ba /generation/passlist.rb
parent2714fc190f01894eaaa64bf3869a4a4269ab1dcf (diff)
parentd92aa9d79a3f80557119b660f7191e96b7d79878 (diff)
downloadserial-barcode-scanner-04e0406316320f6039365b80de8c58c3c58413c5.tar.bz2
Merge pull request #45 from smilix/master
mqtt script & pdf generation improvements
Diffstat (limited to 'generation/passlist.rb')
-rw-r--r--generation/passlist.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/generation/passlist.rb b/generation/passlist.rb
index cb02bd1..9702762 100644
--- a/generation/passlist.rb
+++ b/generation/passlist.rb
@@ -22,7 +22,7 @@ require "csv"
\begin{document}
\begin{center}
\begin{longtable}{| >{\centering\arraybackslash}p{8.5cm}| >{\centering\arraybackslash}p{8.5cm}| >{\centering\arraybackslash}p{8.5cm}|}
- %s
+ %s
\end{longtable}
\end{center}
\end{document}}
@@ -36,13 +36,13 @@ require "csv"
@graphics = %q{ \includegraphics{%s} \rule{0cm}{3.5cm} %s}
@name = %q{ %s %s %s}
-@ktt = %q{\includegraphics[width=8cm,angle=180]{ktt} %s }
+@ktt = %q{\includegraphics[width=8cm,angle=180]{../ktt} %s }
@csv = CSV.read(ARGV[0])
#generate barcodes
-@csv.each{|r|
- system("barcode -n -E -b 'USER %s' -o '%s.eps' -e 39\n" % [r[0], r[0]])
+@csv.each{|r|
+ system("barcode -n -E -b 'USER %s' -o 'passlist/%s.eps' -e 39\n" % [r[0], r[0]])
}
#generate latex
@@ -54,8 +54,8 @@ name = ""
sign = le ? "\\\\" : "&"
graphics += @graphics % [@csv[i-1][0], sign]
name += @name % [@csv[i-1][1], @csv[i-1][2], sign]
- if le
- tmp += @line % [graphics, name]
+ if le
+ tmp += @line % [graphics, name]
graphics = ""
name = ""
1.upto(3) {|j|
@@ -68,4 +68,4 @@ name = ""
name = ""
end
}
-File.open("barcode.latex", "w+"){|f| f.write(@template % tmp)}
+File.open("passlist/passlist.latex", "w+"){|f| f.write(@template % tmp)}