Re: Defining "url" in .wgetrc
Thanx that gave me some ideas:) "Tony Lewis" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > ks wrote: > >> Just one more question. >> Something like this inside "somefile.txt" >> >> http://fly.srk.fer.hr/ >> -r http://www.gnu.org/ -o gnulog >> -S http://www.lycos.com/ > > Why not use a batch file or command script (depending on what OS you're > using) containing something like: > > wget http://fly.srk.fer.hr > wget -r http://www.gnu.org -o gnulog > wget -S http://www.lycos.com > > Tony > >
Re: Defining "url" in .wgetrc
On Thursday 20 April 2006 15:12, you wrote: > Curtis Hatter skrev: > > On Thursday 20 April 2006 10:18, you wrote: > >> Im newbie and using a windows port of wget version 1.10.2b > >> > >> I want to define wget http://fly.srk.fer.hr/ inside .wgetrc by that I > >> want to define several path to download like http://fly.srk.fer.hr/ > >> inside .wgetrc and only use the command wget which then use .wgetrc to > >> before everthing. > >> > >> 1. > >> I this possible i can not find the variable which im suppose to use > >> inside .wgetrc to have the value http://fly.srk.fer.hr/ ? > > > > Yes it is possible, use 'input=file' in .wgetrc file. When you start wget > > it will read the file specified for urls. It works like the '-i' command > > line option so read that for more information on how it can be used. > > > > Curtis > > Thanx a mill that works. > Just one more question. > What really would give me the flexibility is if I can use the -i > "somefile.txt" to also variables for every defined url. > Something like this inside "somefile.txt" > > http://fly.srk.fer.hr/ > -r http://www.gnu.org/ -o gnulog > -S http://www.lycos.com/ > > I guess this is possible but not the way I do it? I'm not sure this is possible by default with wget. I would say at this point you are best off writing a simple perl/ruby/python/bash/etc script to read a file line by line that contains the urls and command line arguments you want. For example... The urls.txt file would like: http://fly.srk.fer.hr/ -r http://www.gnu.org/ -o gnulog -S http://www.lycos.com/ And the Perl code to read it could like: open FILE, "<", "urls.txt" while () { chomp; system "wget $_"; } I would do this slightly differently in production but for an example I hope it gets the idea across. Curtis
RE: Defining "url" in .wgetrc
ks wrote: > Just one more question. > Something like this inside "somefile.txt" > > http://fly.srk.fer.hr/ > -r http://www.gnu.org/ -o gnulog > -S http://www.lycos.com/ Why not use a batch file or command script (depending on what OS you're using) containing something like: wget http://fly.srk.fer.hr wget -r http://www.gnu.org -o gnulog wget -S http://www.lycos.com Tony
Re: Defining "url" in .wgetrc
Curtis Hatter skrev: On Thursday 20 April 2006 10:18, you wrote: Im newbie and using a windows port of wget version 1.10.2b I want to define wget http://fly.srk.fer.hr/ inside .wgetrc by that I want to define several path to download like http://fly.srk.fer.hr/ inside .wgetrc and only use the command wget which then use .wgetrc to before everthing. 1. I this possible i can not find the variable which im suppose to use inside .wgetrc to have the value http://fly.srk.fer.hr/ ? Yes it is possible, use 'input=file' in .wgetrc file. When you start wget it will read the file specified for urls. It works like the '-i' command line option so read that for more information on how it can be used. Curtis Thanx a mill that works. Just one more question. What really would give me the flexibility is if I can use the -i "somefile.txt" to also variables for every defined url. Something like this inside "somefile.txt" http://fly.srk.fer.hr/ -r http://www.gnu.org/ -o gnulog -S http://www.lycos.com/ I guess this is possible but not the way I do it?
Re: Defining "url" in .wgetrc
On Thursday 20 April 2006 10:18, you wrote: > Im newbie and using a windows port of wget version 1.10.2b > > I want to define wget http://fly.srk.fer.hr/ inside .wgetrc by that I want > to define several path to download like http://fly.srk.fer.hr/ inside > .wgetrc and only use the command wget which then use .wgetrc to before > everthing. > > 1. > I this possible i can not find the variable which im suppose to use inside > .wgetrc to have the value http://fly.srk.fer.hr/ ? Yes it is possible, use 'input=file' in .wgetrc file. When you start wget it will read the file specified for urls. It works like the '-i' command line option so read that for more information on how it can be used. Curtis
Defining "url" in .wgetrc
Im newbie and using a windows port of wget version 1.10.2b I want to define wget http://fly.srk.fer.hr/ inside .wgetrc by that I want to define several path to download like http://fly.srk.fer.hr/ inside .wgetrc and only use the command wget which then use .wgetrc to before everthing. 1. I this possible i can not find the variable which im suppose to use inside .wgetrc to have the value http://fly.srk.fer.hr/ ? 2 If this is not possible any ideas how to make some config file that wget use so that i can define several " http://fly.srk.fer.hr/"; paths to download? 3 The idea is to mirror parts of a site that contains files that are not *.html files but other files that are needed. Are wget suited for this job? Thanx in advance KS