Automating reports

DANIEL MAGNUSZEWSKI dmagnuszewski at mandtbank.com
Tue Oct 4 09:31:12 EDT 2005


If you look at the link, there are two variables passed into the cgi
script. They are startdate and enddate. Both of these are set to zero.
I'm assuming that this may be a default setting to show the last (day,
week, etc).

Just a thought.

-Dan

>>> Justin.Bennett at dynabrade.com 10/04/05 8:26 AM >>>
If you right click on the image on the page can you  get the url of
just 
the image 
(http://www.marketwatch.com/charts/int-adv.chart?siteid=mktw&symb=SPX&sid=3377&time=8&freq=1&startdate=0&enddate=0&comp=Enter+Symbol%3A+aaaaa%7E0&compidx=aaaaa~0&ma=1&maval=50&uf=4&lf=4&lf2=0&lf3=0&type=2&size=2&style=1013&mocktick=1&rand=478450953)

you might be able to tweek the url everyday to get the current  image. 

If not you might have to save the images everyday in a folder as a 
certain name and run the script against the saved pics.



Justin Bennett
Network Administrator
Dynabrade, Inc.
8989 Sheridan Dr.
Clarence, NY 14031
 



On 10/4/2005 4:47 AM, Robert F. Stockdale IV wrote:

> Unfortunately wget doesn't download the graphics correctly. Actually

> it downloads the page without the graphic. This is the command I
used:
>
> wget 
>
http://www.marketwatch.com/tools/quotes/printable.asp?symb=SPX&siteid=mktw&intflavor=advanced&submitted=true&time=8&freq=1&comp=Enter%20Symbol:&compidx=aaaaa~0&uf=4&ma=1&maval=50&lf=4&lf2=0&lf3=0&type=2&compind=aaaaa~0&size=1&style=1013&customdate=true&startdate=0&enddate=0&linkname=Interactive%20Charting&origurl=/tools/quotes/intchart.asp&rand=478450953

>
>
> If the web address is loaded in a browser it brings up a printable 
> chart of the S&P 500 index. Is there something I'm missing? The Fpdf

> looks like a great idea. Hope I can use it. I'm not real good at 
> scripting, although I'm trying to learn some. Been looking at 
> abs-guide (Advanced Bash Scripting Guide) and some Python.
> Thank you.
> Bob
>
> Justin Bennett wrote:
>
>> I do similar stuff with automated reporting from our database. I use

>> PHP and the Fpdf program (http://www.fpdf.org/) to generate a PDF 
>> from a PHP program. From PHP you could Email this or print it. I 
>> don't know if you know php but:
>>
>> You could write a php program that:
>>
>> 1. Gets the Images with wget and save them in a local directory
>> 2. Creates a PDF and includes your labels and images you saved from

>> the wget
>> 3. Emails or prints the PDF
>>
>> Fpdf has some examples that you could modify to do what you like 
>> without the much trouble.  Then I fire the PHP program from cron on
a 
>> nightly basis.
>>
>>
>> Justin
>>
>>
>> Justin Bennett
>> Network Administrator
>> Dynabrade, Inc.
>> 8989 Sheridan Dr.
>> Clarence, NY 14031
>>
>>
>>
>>
>> On 10/3/2005 4:15 AM, Robert F. Stockdale IV wrote:
>>
>>> Hello everyone:
>>>     I have this project I'm trying to do. It starts by saving
charts 
>>> from a web page. There are 4 charts that get updated daily (M-F). I

>>> currently do this manually by right clicking on the chart in
Firefox 
>>> and select save as. These are stock indexes for monitoring the 
>>> investment portion of a retirement portfolio. I then put the 4 
>>> charts on one page in OpenOffice Writer with labels above each 
>>> chart. How can I automate this process or is there an easier
process 
>>> to create a pdf or postscript file for output to default printer? I

>>> can send a sample output if some one would like to see the manual 
>>> result.
>>> Thank you
>>> Bob
>>
>>
>>
>>





More information about the nflug mailing list