예제 #1
0
        static int Main(string[] args)
        {
            Arguments A;

            try {
                A = new Arguments(args);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                return(1);
            }
            try
            {
                Scrape(A);
                //_elements.CompileUniqueTerms(Path.Combine(A.InputDirectory, "Terms"), _terms);
                _elements.CreateTable(Path.Combine(A.InputDirectory, "Terms"));
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
                return(-1);
            }
            return(0);
        }
예제 #2
0
        static int Main(string[] args)
        {
            if (args.Length == 0)
            {
                WriteError("Please enter the path to the table.");
                return(1);
            }
            string tblSrc = args[0];

            if (!File.Exists(tblSrc))
            {
                WriteError("Source table '{0}' not found.", tblSrc);
                return(2);
            }
            try
            {
                ElementList els = new ElementList();
                els.ReadTable(tblSrc);
                els.CreateTable(Path.GetDirectoryName(tblSrc), TBL);
                WriteSuccess("Table {0} created.", TBL);
            }
            catch (Exception ex)
            {
                WriteError(ex);
                return(3);
            }
            return(0);
        }