No announcement yet.

how to automate diff of HTML

  • Time
  • Show
Clear All
new posts

  • how to automate diff of HTML

    I would like to use Beyond Compare to help me monitor a website and perform a diff on a regular bases.

    For example I would go to save the html to a file lets call it 1.htm. Then sometime later I would like check the website to see if it has changed by going out to save it off to 2.htm and then receive a diff report on 1.htm versus 2.htm.

    I would like to have this all done via a batch file or script and the final out put be an HTML as the output. If that is not possible then the diff be in a text form that is readable.

    So I am not looking for the side by side comparison, but instead the result difference.

    Is there a way to do this with Beyond Compare 2.5.3? or with 3.0?

  • #2
    Beyond Compare itself is AFAIK not able to download HTML-Pages from the WWW in order to compare them. You will have to use other tools to achieve this in a script.

    Maybe wget from can be usefull.
    The result of this is of course a HTML file, that means a sourcecode of a webpage. Since these are textfiles they can be compared by BC.

    Another approach is to compare the rendered content of that source files similar to the text you can copy and paste from a browser to a text-editor.
    If that is your goal you need other tools to convert the downloaded HTML files to plain text. But fortunaltly there is already an external converter for that task:

    Regarding BC3 goto this page and look for HTML to text.

    For the beginning I recommend to do the neccesary steps manually. If that works with the right parameters you can try to put it all in a batch script which finally calls BC in order to produce a report ...

    (BC 2.x and 3.x are both qualified to do so)

    Feel free to ask if you encounter any problems ...

    Last edited by chrroe; 19-Nov-2008, 12:04 PM.


    • #3
      Thanks, Christoph. Beyond Compare cannot download directly from a http:// address. It is a wishlist item to add this support.

      Thanks for the alternate solutions and workarounds. Having an ftp or sftp server on your webserver is also a common method of accessing a webserver with Beyond Compare.
      Aaron P Scooter Software


      • #4
        You can actually use web addresses in the 'text' compare tool. paste a web address in one or both sides to compare one page in the web with an html file or other page on the web


        • #5
          Yes, this was a new feature in version

          v3.1.0.10168 April 9, 2009