Re: tool to check that html files are listed in a javascript ToC

Subject: Re: tool to check that html files are listed in a javascript ToC
From: Lou Quillio <public -at- quillio -dot- com>
To: "TECHWR-L" <techwr-l -at- lists -dot- techwr-l -dot- com>
Date: Thu, 07 Jul 2005 12:44:26 -0400


Elizabeth O'Shea wrote:
> Does anyone know of a tool that will read the names of the files in my
> project folder, search for them in the javascript, and then produce a report
> that tells me which files in the folder are also listed in the javascript
> ToC (or which files in the folder aren't in the Toc)? Or am I just going to
> have to buckle down and do it myself?

Two steps:


Dead Links
==========

To find broken links in your file (that is, links for which no
target file is in your folder), I'd use a simple link checker.
There are many, including the ubiquitous `cURL` and `wget`, but the
simplest may be the Firefox "LinkChecker" extension.

http://www.kevinfreitas.net/extensions/linkchecker/

[It may be necessary to load the file in a browser, view and save
the source as a separate file, and run the checker on that. We want
to check it after the Javascript has executed. Kinda depends on
what the script is doing.]

The extension will highlight any links on the page for which a valid
target can't be found.


Orphaned Links
==============

To locate the *un-linked* files in your folder (the 'orphaned'
pages), you might try one of the "List All Links" bookmarklets.
There's a suitable one here:

http://www.trylookinghere.com/bookmarklets/bookmarkletgenpur3.shtml

Bookmark the "List All Links" link (heh) on this page (that is,
right-click -> Add to Favorites, or drag it to a toolbar, etc. It's
actually a snippet of Javascript, so you may get a warning, but it's
perfectly safe.

Load *your* page in a browser, and invoke the "List All Links"
bookmarklet. A separate browser window listing all the links on
your page will pop-up. Copy-paste this output to a text editor
file, globally strip the list of URLs of everything except the
filenames, sort the result as it's sorted in your folder list, and
compare. Anything in your folder that's not in the text file isn't
linked-to from your HTML.

Again, the 'orphaned pages' pass might work better on a sanitized
HTML file (post Javascript execution), same as the 'dead links' pass.

Natch we have to be talking about a lot of links/files before this
effort is worth it but, if so, it can't fail.

HTH

LQ

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Now Shipping -- WebWorks ePublisher Pro for Word! Easily create online
Help. And online anything else. Redesigned interface with a new
project-based workflow. Try it today! http://www.webworks.com/techwr-l

Doc-To-Help 2005 now has RoboHelp Converter and HTML Source: Author
content and configure Help in MS Word or any HTML editor. No
proprietary editor! *August release. http://www.componentone.com/TECHWRL/DocToHelp2005

---
You are currently subscribed to techwr-l as:
archiver -at- techwr-l -dot- com
To unsubscribe send a blank email to leave-techwr-l-obscured -at- lists -dot- techwr-l -dot- com
Send administrative questions to lisa -at- techwr-l -dot- com -dot- Visit
http://www.techwr-l.com/techwhirl/ for more resources and info.



Follow-Ups:

References:
tool to check that html files are listed in a javascript ToC: From: Elizabeth O'Shea

Previous by Author: Re: Sarbanes-Oxley Act of 2002
Next by Author: Re: ADMIN Re: London
Previous by Thread: tool to check that html files are listed in a javascript ToC
Next by Thread: RE: tool to check that html files are listed in a javascript ToC


What this post helpful? Share it with friends and colleagues:


Sponsored Ads