note 40439 added to index
| From: | riseofthethorax at yahoo dot com | Date: | Wed, 03 Mar 2004 22:33:35 +0000 |
| Subject: | note 40439 added to index | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-66210@lists.php.net to get a copy of this message | ||
# This is not a script
#
# One way to skin a cat, or rather download the
# entire www.php.net annotated manual
# in a working offline state..
# Prerequisite:
# cygwin (wget, perl, bash) and windows..
# first:
# run this in cygwin:
# wget -np -r http://www.php.net/manual/en/index.php
# in DOS or Windows run->"cmd":
# cd www.php.net/manual/en/
# move *.php *.html
# Second:
# in cygwin's bash shell type the little program
#
# for i in *.html
# do
# mv $i tmp
# ./relink.pl < $tmp > $i
# rm tmp
# done
#
# or store this in a file called "convert.sh" and run it
# but don't forget to put #!/bin/sh at the top of the file
# or you can't use it as a script..
# go into index.php (or wherever the index.html file is)
# do the same bash commands as above.
# move index.html to the directory where all the other web files are..
# now take one of the html files, preferably the largest one..
# do this:
# ./extras.pl < somefilehere.html > download.txt
#
# Okay this should have dumped all the URL's to a file called download.txt
# in the page you picked. Actually it takes anything in double quotes and
# dumps it to the file.. Most of the stuff in the page in double quotes is
# pictures and webpages..
#
# Now do this with wget (assuming you are in "www.php.net/manual/en"):
#
# wget -x -nH --input-file=download.txt
#
# That should get the remaining files from the php site and put them
# somewhere locally..
#
# Now if you go into index.html you should be able to navigate the
# website without ever having to get on the net, and you can read
# everyone's comments in full color..
# Listing1 ("relink.pl"):
# ----------->8------------------------------>8---------------------
# while (<STDIN>) {
# s/http:\/\/static\.php\.net\/www\.php\.net\///gi;
# s/<base.+\/>//gi;
# s/"([^"]+)php"/"$1html"/gi;
# print $_;
#}
# ----------->8------------------------------>8---------------------
# Listing2 ("extras.pl"):
# ----------->8------------------------------>8---------------------
# while (<STDIN>) {
# if (/"\/([^"]+)"/) { print "http://us4.php.net/$1\n";}
# }
# ----------->8------------------------------>8---------------------
----
Manual Page -- http://www.php.net/manual/en/index.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+40439
Delete -- http://master.php.net/manage/user-notes.php?action=delete+40439&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+40439&report=yes
Search -- http://master.php.net/manage/user-notes.php