open(temporary_latex_file, 'w')
fh.puts latex_source
fh.close
puts "Searched #{
keywords.length} keywords and #{
sellers.delete_if {|s| s.nil?}.length
} sellers for a total of #{
sellers.length*keywords.length
} eBay searches."
puts `"#{path_to_pdflatex}" #{temporary_latex_file} --quiet` # Runs PDFLatex with
# the --quiet switch, which eliminates much of the chatter it usually displays.
# It will still display errors, however.
puts "Wrote report to average_price_report.pdf"
Save all the code as average_price_report.rb.
Note that I cannot include any specific eBay IDs in this book, but you can feel free to
go to the eBay site, perform a random search, and insert a few user IDs and keywords
into a command, like this one:
ruby average_price_report.rb "keyword1,keyword2" "seller_id1,seller_id2,seller_id3"
The results should look something like this:
Searched 2 keywords and 3 sellers for a total of 6 eBay searches.
entering expanded_mode . . .
Wrote report to average_price_report.pdf
This will create a file called average_price_report.
Pages:
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182