static void Main(string[] args) { XmlConfigurator.Configure(new System.IO.FileInfo("LattesExtractor.log4net")); var config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); LattesModule lm = LattesModule.GetInstance(); lm.TempDirectory = config.AppSettings.Settings["TempDir"].Value; lm.LattesCurriculumVitaeODBCConnection = config.AppSettings.Settings["LattesCurriculumVitaeODBCConnection"].Value; lm.LattesCurriculumVitaeQuery = config.AppSettings.Settings["LattesCurriculumVitaeQuery"].Value; if (config.AppSettings.Settings["IgnorePedingLastExecution"] != null) { lm.IgnorePendingLastExecution = config.AppSettings.Settings["IgnorePedingLastExecution"].Value.Equals("true"); } if (config.AppSettings.Settings["ImportFolder"] != null) { lm.ImportFolder = config.AppSettings.Settings["ImportFolder"].Value; } var options = new Options(); if (CommandLine.Parser.Default.ParseArguments(args, options)) { if (options.InputQualisFile != null && options.InputQualisFile != "") { // Values are available here if (options.Verbose) { Console.WriteLine("Arquivo Qualis: {0}", options.InputQualisFile); } lm.UpdateQualisDataBase(options.InputQualisFile); return; } if (options.InputJCRFile != null && options.InputJCRFile != "") { // Values are available here if (options.Verbose) { Console.WriteLine("Arquivo JCR Impact Factor: {0}", options.InputJCRFile); } lm.UpdateJCRImpactFactorDataBase(options.InputJCRFile); return; } if (options.IgnorePendingLastExecution) { lm.IgnorePendingLastExecution = options.IgnorePendingLastExecution; } if (options.FromFolder != null) { lm.ImportFolder = options.FromFolder; } lm.Extract(); } }
public static LattesModule GetInstance() { if (_instance == null) { _instance = new LattesModule(); } return(_instance); }