How to use ruby, csv and webservice? Need a direction.



Hi, All.

I'm just a bit confused and need some direction here.

I have an app that does inventory and I also created a bunch of reports
using great Ruport Library. All of my reports can produce: xls, csv, pdf
& html.

What I'm trying to do is to have a scheduled ruby script on a separate
scheduling machine that will pull one of the reports in CSV format and
place it on HD for processing by our old DBF program.


There are two approaches:

1) I can have a copy of my app running on my scheduling computer that I
will connect to the central DB do it's processing and save the file
locally where it's needed. That's how I'm doing right now.

(+ I don't stress production server with reports)


2) My report urls are of this type:

http://myapp/reports/csv_export/2 - which spits out a csv file back at
you for report #2

So I was thinking that I can just point a ruby script to that url, grab
the file and place it on HD.

(+ This way I don't need to 2 copies of my app. Better maintainability)


I want to go with the second approach - but here is where I'm stuck and
need just a pointer. I'm sure it's obvious but I just don't know what to
do.




How do I call that url from my ruby scrip and how do I process that csv
file when I get it back? Everything I red talks about using xmlrpc or
soap - but I don't want to process that data again on a scheduling
computer - when it's already is being given to me in the proper format?
How do I handle that?

If ruby has something like linux's "wget" - that would be great - I
think that would solve my problem.

( the reason I can't use system wget is my scheduling pc - is a windows
xp box - it has to be for old DBF stuff to work)
--
Posted via http://www.ruby-forum.com/.

.



Relevant Pages

  • Re: Can Crystal Reports be scheduled or dynamicaly generated from .NET?
    ... feature to dinamically generate reports. ... I have never tried CR scheduling feature, to tell you the true this is the ... > wondering if it was possible to actually schedule Crystal Reports ... > pulling parameters from the database. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Can Crystal Reports be scheduled or dynamicaly generated from .NET?
    ... feature to dinamically generate reports. ... I have never tried CR scheduling feature, to tell you the true this is the ... > wondering if it was possible to actually schedule Crystal Reports ... > pulling parameters from the database. ...
    (microsoft.public.dotnet.general)
  • Re: Can Crystal Reports be scheduled or dynamicaly generated from .NET?
    ... feature to dinamically generate reports. ... I have never tried CR scheduling feature, to tell you the true this is the ... > wondering if it was possible to actually schedule Crystal Reports ... > pulling parameters from the database. ...
    (microsoft.public.dotnet.csharp.general)
  • Re: Crystal Enterprise 9.0 Scheduling
    ... the report to run at the desired time on a specific interval. ... reports could be scheduled successfully over night. ... calling the reports, one at a time, for scheduling. ... I don't know what that "Apos Excel" thing is, ...
    (microsoft.public.vb.crystal)
  • Re: Memory management problem?
    ... The DevMode etc properties can be VERY tricky. ... Run the app locally. ... One app is a reporting one, and it opens reports (in either ...
    (comp.databases.ms-access)