Prev | Current Page 160 | Next

David Berube

"Practical Reporting with Ruby and Rails"


Of course, many people are selling instruments on eBay. You want to use eBay??™s REST
API to perform searches on your various competitors, finding out how much they are
getting for various items. Fortunately, it??™s easy to use Hpricot, a Ruby-based HTML and
XML parsing library, to do just that. This chapter??™s example will use eBay??™s REST API and
Hpricot to perform searches on multiple competitors, parse the result, and figure out the
average price.
To present the report, you??™ll write the result to a PDF file, using the LaTeX documentpreparation
system. PDFs are particularly useful for a couple reasons. Unlike HTML,
they appear almost identical in print as they do on the screen. Also, they can easily be
e-mailed or saved on disk. (Modern web browsers permit HTML pages to be saved to disk
with images, but most end users are not savvy enough to do this, and this facility will not
work with complicated web pages.)
WHY LATEX?
There are many ways to produce PDFs using Ruby, so you might wonder why LaTeX is being used in
this chapter.


Pages:
148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172
download stretching exercises grow taller teksty piosenek Kredyt hipoteczny kalkulator Dyskusja Nr9