Automating reports

Tony Abou-Assaleh taa at acm.org
Tue Oct 4 15:25:12 EDT 2005


Just to clarify, when you use wget to download a url that includes
'GET' data, that data becomes part of the file name. E.g.,

wget http://www.marketwatch.com/charts/int-adv.chart?siteid=mktw

Will save the file as 'int-adv.chart?siteid=mktw'. There are restrictions
in the filesystem on the maximum length of a file name.

Cheers,

TAA

-----------------------------------------------------
Tony Abou-Assaleh
Lecturer, Computer Science Department
Brock University, St. Catharines, ON, Canada, L2S 3A1
Office: MC J215
Tel:    +1(905)688-5550 ext. 5243
Fax:    +1(905)688-3255
Email:  taa at acm.org
WWW:    http://www.cosc.brocku.ca/~taa/
----------------------[THE END]----------------------

On Tue, 4 Oct 2005, Mike Richardson wrote:

> Michael,
>
> 	try using the file output options (after the URL being requested)
> -O file
> --output-document=file
>
> Michael Phillips wrote:
> > wget complains that the filename is too long
> >
> > --- DANIEL MAGNUSZEWSKI <dmagnuszewski at mandtbank.com> wrote:
> >
> >
> >>Why can't he just use the following link?
> >>
> >>
> >
> > 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
> >
> >>I right clicked on the graph and got it's URL (to JUST the image, and
> >>not the whole page). Due to firewall issues, I am unable to test
> >>downloading this at work, but I know that you can download just images
> >>using wget.
> >>
> >>
> >>>>>linux478 at yahoo.com 10/04/05 2:20 PM >>>
> >>
> >>What I think is the url that Robert is using is too long for wget.
> >>The
> >>following command will download the 4th link in the url that you gave
> >>us.  I
> >>think this might be a start.
> >>
> >>wget $(lynx --dump
> >>
> >
> > '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'
> >
> >>| grep " 4. " | awk '{print $2}')
> >>
> >>Michael
> >>
> >>--- pirrone at localnet.com wrote:
> >>
> >>
> >>>
> >>>  Quoting "Robert F. Stockdale IV" <javabob at adelphia.net>:
> >>>
> >>>
> >>>>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[1]
> >
> >>>>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
> >>>
> >>>  Bob,
> >>>
> >>>  If you use wget -p it should grab all page requisites.  You may
> >>>even need -r for recursive and -l 2 or so to go down a level but if
> >>>it's in the browser window it should be gettable.
> >>>
> >>>  Frank
> >>>
> >>>  Links:
> >>>------
> >>>[1]
> >>>
> >>
> > /horde/services/go.php?url=http%3A%2F%2Fwww.marketwatch.com%2Ftools%2Fquotes%2Fprintable.asp%3Fsymb%3DSPX%26siteid%3Dmktw%26intflavor%3Dadvanced%26submitted%3Dtrue%26time%3D8%26freq%3D1%26comp%3DEnter%2520Symbol%3A%26compidx%3Daaaaa%7E0%26uf%3D4%26ma%3D1%26maval%3D50%26lf%3D4%26lf2%3D0%26lf3%3D0%26type%3D2%26compind%3Daaaaa%7E0%26size%3D1%26style%3D1013%26customdate%3Dtrue%26startdate%3D0%26enddate%3D0%26linkname%3DInteractive%2520Charting%26origurl%3D%2Ftools%2Fquotes%2Fintchart.asp%26rand%3D478450953
> >
> >>>
> >>
> >>Michael D. Phillips - A computer science enthusiast
> >>I do not hate Windows, I just like the alternatives better.
> >>Linux is my primary choice.
> >>
> >>
> >>
> >>__________________________________
> >>Yahoo! Mail - PC Magazine Editors' Choice 2005
> >>http://mail.yahoo.com
> >>
> >>
> >>
> >
> >
> >
> > Michael D. Phillips - A computer science enthusiast
> > I do not hate Windows, I just like the alternatives better.
> > Linux is my primary choice.
> >
> >
> >
> > __________________________________
> > Yahoo! Mail - PC Magazine Editors' Choice 2005
> > http://mail.yahoo.com
> >
> >
>
>
> --
> Michael Richardson
> Web Programmer, ePharmacotherapy Networks
> School of Pharmacy and Pharmaceutical Sciences
> State Univ. of New York at Buffalo
> Cooke Hall Room 309
> (716)645-2828 ext. 266
>



More information about the nflug mailing list