View Single Post
Old 02-06-2012, 09:22 AM   #6
andyh2000
Avid reader
andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.
 
andyh2000's Avatar
 
Posts: 825
Karma: 6377682
Join Date: Apr 2009
Location: UK
Device: Samsung Galaxy Z Flip 4 / Kindle Paperwhite
Quote:
Originally Posted by cptnemo View Post
Yes, but I have 1,300 pages. I can't fix manually every single broken link. So I need some software to do it for me: move the pages and links from subfolder to one parent folder.
I know you've already mirrored the site so might not want to do it again but I use "wget" to mirror web sites and it has a "no directories" option ("-nd") which stops it creating sub-directories. It also fixes up the internal links so nothing is broken.

The actual command I use is:
Code:
wget.exe -p -k -nd -q -E -R js,txt,css -nc %pg%
which translates as:

get all images, etc. needed to display HTML page
make links in downloaded HTML point to local files
don't create directories
quiet
save HTML documents with `.html' extension
comma-separated list of rejected extensions: js,txt,css
skip downloads that would download to existing files

and you'll need to add "-r" for recursive download (thanks frostschutz for pointing that out below - my usage was for turning a single page into an epub)

You can get it from here: http://gnuwin32.sourceforge.net/packages/wget.htm

Hope this helps

Andrew

Last edited by andyh2000; 02-06-2012 at 09:58 AM. Reason: Oops - forgot the option "-r" for recursive
andyh2000 is offline   Reply With Quote