Re: split an html file
On 22/04/14 03:08, Mike McClain wrote:
> My brother Rick, a windrider, put together a webpage,
> about sailing and wind surfing that has grown too large and should be
> split into smaller sections to reduce load time.
First you 'should' fix the code[*1], replace the tables with a
non-deprecated structure, trim those keywords, *and* move all that CSS
to an external rule sheet.
If you are amongst those that insist on using tables (sigh):-
$ cp NauticalTerms&Nomenclature.html NauticalTerms&Nomenclature_0.html
$ nano NauticalTerms&Nomenclature_0.html # remove the tables from the
last half of the page.
$ nano NauticalTerms&Nomenclature_1.html # remove the tables from the
first half of the page.
$ sed to rewrite your links in the new page 0 and page 1
then delete the original page and use KLinkStatus to check your entire
site for deadlinks.
I'd split that page into 4 pages, so readers don't need to page down too
often - and moving all that inline CSS into an external style sheet will
reduce repetitive code *and* cut hundreds of lines from the page load.
The whole job should take about 1/2 an hour (recode and test).
> Can anyone point me to any tools that would automate the process of
> fixing all the links?
> In theory, there is no difference between theory and practice.
> In practice, there is. - Yogi Berra
[*1] I've cleaned that code for you - but you really should get rid of
those stinking tables - dynamic element positioning is never "too hard"
*unless* you are 100% positive you'll never have someone visiting your
site whose screen isn't the size you statically coded for (or are using
a mobile device).
The code is too large for paste.debian.net, you can download it here:-