7 Replies Latest reply on Sep 11, 2007 2:27 AM by dsind

    Clean up HTML source

    dsind Level 1
      The company that i work for has recently acquired a new product and I have been assigned to work on the documentation. The legacy docs that we have received ar so big that I've never come across such big help files. For example, there's one project that has about 1400 topics and it's total size is 265 mb. Thetre are at least 10 more projjects.

      I opened one topic and realized that the people who worked on it before me embedded the style info in the HTM code.Before i add the new features etc. I would like to trim the file sizes. Cleaning up each file manually is going to take a lifetime, can you guys suggest some automated tasks that will make my task a bit easier?

      Much Appreciate.
        • 1. Re: Clean up HTML source
          RoboColum(n) Level 5
          Hi dsind and welcome to the RH community.

          Your task of cleaning up the code could be difficult and time consuming. You may be able to use a find and replace tool ( FAR is my own personal favourite) but the problem you will have in the syntax of the styles used in the code. Is there a pattern to the code used? if not, the easiest option may be to manually go through each topic. You could "trap" the majority of topics using a find and replace tool first and then look at those topics that are trapped.

          BTW 1400 topics is not particularly big so don't worry.
          • 2. Re: Clean up HTML source
            MergeThis Level 4
            If you're going to have to clean up the code manually, which seems the only way out, here's a suggestion.

            In the topic WYSIWYG mode, Select All, Copy, and then Paste into a basic text editor (Notepad, etc., but NOT MS WORD). Then Copy and paste selected blocks of content to over-write those blocks in the RH topic. Then, assign styles as needed from your style sheet.

            Not easy, but significantly quicker than a methodical slash&burn through the TrueCode!

            Good luck,
            • 3. Re: Clean up HTML source
              dsind Level 1
              Colum McAndrew and MergeThis, thanks for your prompt answers.MergeThis I think I'll do what you've suggested.

              BTW do you guys use the default WYSIWYG editor? I use EdItPlus, requires a lot of typing but does a very clean job.

              • 4. Re: Clean up HTML source
                RoboColum(n) Level 5
                Personally I use a combination of the WYSIWYG and the Truecode tabs depending on what I need to do. Others import files from elsewhere. It's horse for courses and whatever works for you.
                • 5. Re: Clean up HTML source
                  dsind Level 1
                  Hmm, the WYSIWYG does add a lot of junk code that tends to make the help file heavy. Don't you think so?
                  • 6. Re: Clean up HTML source
                    RoboColum(n) Level 5
                    Yes but it isn't a problem for me. Have you thought of creating your source files in Dreamweaver and importing in the HTML files? Some RH users adopt this method because of the bloated code issue.
                    • 7. Re: Clean up HTML source
                      dsind Level 1
                      I follow something quite similar. I create a HTML templates and CSS and use this template while adding new topics.I use EditPlus as the HTML editor.