Click here to Skip to main content
15,897,226 members
Articles / Programming Languages / C#

CHM Snatcher

Rate me:
Please Sign up or sign in to vote.
4.33/5 (5 votes)
12 Feb 2008CPOL7 min read 59.4K   1.1K   36  
A way of mass-converting online content to CHM files for effectively delivering user help&manual, sharing company knowledge base and distributing any sort of documentation.
#region License grant
//Licensed under The Code Project Open License (CPOL) 1.0
//by Tomasz Szatkowski, 2008
//See the http://www.codeproject.com/info/cpol10.aspx for the full license text
#endregion
using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;

namespace CHMSnatcher
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("CHM Snatcher");
            Console.WriteLine("Licensed under The Code Project Open License (CPOL) 1.0");
            Console.WriteLine("by Tomasz Szatkowski, 2008");
            if (args.Length < 2)
            {
                Console.WriteLine("");
                Console.WriteLine("Possible commands:");
                Console.WriteLine("CHMSnatcher.exe preProcess [path to XML configuration file]");
                Console.WriteLine("CHMSnatcher.exe postProcess [path to XML configuration file]");
                return;
            }

            XmlDocument xmlDocument = new XmlDocument();
            xmlDocument.Load(args[1]);

            string command = args[0];
            switch (command)
            {
                case "preProcess":
                    PreProcessor preProcessorSnatcher = new PreProcessor();
                    preProcessorSnatcher.Generate(xmlDocument);
                    break;
                case "postProcess":
                    PostProcessor postProcessor = new PostProcessor();
                    postProcessor.PostProcess(xmlDocument);
                    break;
            }
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Web Developer
Poland Poland
Tomasz Szatkowski is a software developer working in the city of Gdynia, Tricity, northern Poland.

He is interested in pursuing ever evolving technology and applying it to everyday problems.

His most recent interest focus on Flex GUI interfaces, Microsoft WCF, middleware, SaaS model in software delivery.

Comments and Discussions