Hi dman, I don't know if you'd like to use this or add it to the instructions, but it might help newbies like me who are trying to import a static site for the first time.

Preparing a Static Website for Import into  Drupal
A video using the Drupal Module "Import_HTML", showing some of the problems and ways to avoid them.  The original site used Dreamweaver templates and legacy code from many updates. This tutorial  deals with web hosts that do not have HTML TIDY installed. In order to get pages to import, you must make them conform to W3 Standards or the pages will fail to import. This process took about a week to import, organize, edit and correct the old site after it was transferred. 
http://www.petersonsales.net/drupal.php

Let me know if you find it useful or can add it to your document references. It is about 19 minutes long, but it deals with some of the problems you run into if you don't quite know what you are doing :-)
Thanks for the help.
Jeff

Comments

jtherkel’s picture

Title: I created a Video Tutorial for those without HTML Tidy » installing HTML Tidy

It took me a while to figure out how to install HTML Tidy. On a shared host (WebEnabled), the install button within the HTML Import module UI did not work. At first, I assumed I should download the MkLinux (Mandrake) binary from http://tidy.sourceforge.net/. That didn't work.

Then I attempted to run:

pecl install tidy

This failed with the following error.

configure: error: Cannot find libtidy
ERROR: `/path_to_my_site_root/nobackup/tmp-pear/pear/download/tidy-1.2/configure --with-tidy' failed

Finally, I ran across some decent directions at http://www.mediawiki.org/wiki/Manual:Build_Tidy_from_source

cvs -d:pserver:anonymous@tidy.cvs.sourceforge.net:/cvsroot/tidy login

[Hit "Enter" key for the password]

cvs -z3 -d:pserver:anonymous@tidy.cvs.sourceforge.net:/cvsroot/tidy co -P tidy

cd tidy/build/gmake

make

cd ../../bin

cp tab2space /path_to_your_drupal_root/sites/all/modules/import_html/coders_php_library/bin

cp tidy /path_to_your_drupal_root/sites/all/modules/import_html/coders_php_library/bin

That worked like a charm. I would be happy to submit this as a documentation patch if people think it's helpful.

-John

dman’s picture

The install button is unlikely to work on a number of systems. it's a really cheap shortcut, only works on one known unbuntu distro with certain server permissions.

Can't say why pecl would fail.

yay, making it yourself - good one! Those instructions look OK. I didn't want to write instructions for that as every time I try I run into different requirement issues.

If however you had control of the server enough to run pecl ...
does mandrake not have it in a repository you can get with the normal package manager?

Good docs. Maybe we can put it somewhere in the install.txt

ijf8090’s picture

Title: installing HTML Tidy » installing HTML Tid

This worked for me on Ubuntu 11.04 64-bit, w. Drupal 6.22.

Thanks
Ian

liquidcms’s picture

Title: installing HTML Tid » installing HTML Tidy
Version: 6.x-1.x-dev » 7.x-1.x-dev

i'm a bit confused with installing HTML tidy:

i am running on Win7 wamp install which has php_tidy.dll; is this the same thing?

when i go to setup i get this:

HTMLTidy executable is not available. PHP Tidy Extension enabled OK. Couldn't find tidy binary anywhere!

which is kind of a mixed msg; it says i am ok and it says i am busted?

liquidcms’s picture

fixed.. :)

i downloaded tidy.exe from here: http://www.paehl.com/open_source/?HTML_Tidy_for_Windows

on setup changed path to html tidy to: e:/wamp/bin/tidy.exe (make sure to use / not \)

saved config (twice)

dman’s picture

Yeah, it's hard to document for all environments. There are (at least) two flavors of the PHP extension, which behave erratically on different PHP versions.
I tried to go with the extensions usually, and allow a fallback to the (less efficient but more consistent) binary. Each *should* have worked.

In D7 the fight began again so downloading binary and providing the path to it is now the preferred option.

Yeah the message above is unclear, but accurate. It's saying two things.

* HTMLTidy executable is not available. Couldn't find tidy binary anywhere!
* PHP Tidy Extension enabled OK.

The executable binary is one thing...
The PHP extension is another.

Over in admin/structure/import_html/setup you can choose which you prefer to use.

liquidcms’s picture

ahh.. that's likely the bug then and the confusion:

php_tidy => extension
htmltidy => command line

is that correct?

my confusion i think was that that section is label as HTML Tidy method, so tricky for first timers to get that that has anything to do with php_tidy (as no where does this ever refer to html tidy).

better labeling would help this a lot... like

Tidy Method:
- php extension
- command line (htmltidy)

also, to further add to this confusion; i think i did try selecting extension and that does not work (or still gives errors on that page), even though php_tidy is installed.

dman’s picture

Yes. Recent updates on some of my test machines have exposed the php_tidy extension as even more unreliable than before. I've had to prefer the commandline instead also.

liquidcms’s picture

my suggestion is simply making it a bit more clear that php_tidy = extension and htmltidy = command line. it doesn't really say that now and they are both grouped together under a section called htmltidy.

dman’s picture

Status: Active » Closed (fixed)

Clearing the old 6.x issues from the issue queue for a cleanup.
The wording was slightly updated, and I'm now recommending against the PHP-tidy method as it's too unreliable. README for the commandline binary is the recommended method