Re: Wishlist: support the file:/// protocol

2006-07-17 Thread Mauro Tortonesi

David wrote:


In replies to the post requesting support of the “file://” scheme, requests
were made for someone to provide a compelling reason to want to do this. 
Perhaps the following is such a reason.


hi david,

thank you for your interesting example. support for “file://” scheme 
will be very likely introduced in wget 1.12.


--
Aequam memento rebus in arduis servare mentem...

Mauro Tortonesi  http://www.tortonesi.com

University of Ferrara - Dept. of Eng.http://www.ing.unife.it
GNU Wget - HTTP/FTP file retrieval tool  http://www.gnu.org/software/wget
Deep Space 6 - IPv6 for Linuxhttp://www.deepspace6.net
Ferrara Linux User Group http://www.ferrara.linux.it


Re: Wishlist: support the file:/// protocol

2006-06-25 Thread David
  In replies to the post requesting support of the “file://” scheme, requests were made for someone to provide a compelling reason to want to do this. Perhaps the following is such a reason.I have a CD with HTML content (it is a CD of abstracts from a scientific conference), however for space reasons not all the content was included on the CD – there remain links to figures and diagrams on a remote web site. I’d like to create an archive of the complete content locally by having wget retrieve everything and convert the links to point to the retrieved material. Thus the wget functionality when retrieving the local files should work the same as if the files were retrieved from a web server (i.e. the input local file needs to be processed, both local and remote content retrieved, and the copies made of the local and remote files all need to be adjusted to now refer to the local copy rather than the remote content). A
 simple shell script that runs cp or rsync on local files without any further processing would not achieve this aim.Regarding to where the local files should be copied, I suggest a default scheme similar to current http functionality. For example, if the local source was /source/index.htm, and I ran something like:   wget.exe -m -np -k file:///source/index.htm  this could be retrieved to ./source/index.htm (assuming that I ran the command from anywhere other than the root directory). On Windows, if the local source file is c:\test.htm, then the destination could be .\c\test.htm. It would probably be fair enough for wget to throw up an error if the source and destination were the same file (and perhaps helpfully suggest that the user changes into a new subdirectory and retry the command).   
 One additional problem this scheme needs to deal with is when one or more /../ in the path specification results in the destination being above the current parent directory; then the destination would have to be adjusted to ensure the file remained within the parent directory structure. For example, if I am in /dir/dest/ and ran   wget.exe -m -np -k file://../../source/index.htm  this could be saved to ./source/index.htm (i.e. /dir/dest/source/index.htm)-David. 
		On Yahoo!7 
 
Socceroos Central: Latest news, schedule, blogs and videos.  

Re: Wishlist: support the file:/// protocol

2005-12-14 Thread Antonio Zerbinati
Hi All,
first of all, keep in mind that rsync already handle local (and remote)
file/dir transfer at best, IMHO rsync is the best solution, ever, for
coping files when you have shell access to.
You can have a look at here: http://rsync.samba.org/ftp/rsync/rsync.html

just look at the details of what the --progress and --partial does.

Saying that, wget should never be used as a rsync clone, but, a raw file:// 
protocol may still be useful. Think that wget is used by a small program to 
collect some file; those file can stay on web or be local, should the program 
call different tool, wget for the net, and cp/rcp/rsync for local stored file?  
if wget can handle both, there is no need for that. 

Hope this will help,
Antonio.




Re: Wishlist: support the file:/// protocol

2005-12-13 Thread Steven M. Schweda
   I, too, see little value in using Wget to copy files which are
accessible locally, but let's say that someone wished to add this
feature.  Given a link like file:///a/b.c, what would be the
destination for the downloaded file on the local file system?  How
would link conversion work?

   Also, if the implementation involves something as clever as 'system(
cp -p /a/b.c somewhere);', please bear in mind that such code is not
portable (to VMS, for example).



   Steven M. Schweda   (+1) 651-699-9818
   382 South Warwick Street[EMAIL PROTECTED]
   Saint Paul  MN  55105-2547


Re: Wishlist: support the file:/// protocol

2005-12-12 Thread Hrvoje Niksic
[EMAIL PROTECTED] writes:

 This may be useful when some network share are mounted to local file system

 *** OK, so why do you want to download the file from local file system to 
 local 
 file system?

Because Wget can shows the download speed, restart a download with
`-c', etc.  I second the usefulness of this proposal, despite how
strange it looks at first glance.