private static void ReadGimmick(Options options) { using (var xb2Fs = new Xb2Fs(options.Xb2Dir)) { if (options.Xb2Dir == null) { throw new NullReferenceException("Must specify XB2 Directory."); } if (options.Output == null) { throw new NullReferenceException("No output path was specified."); } if (!Directory.Exists(options.Xb2Dir)) { throw new DirectoryNotFoundException($"{options.Xb2Dir} is not a valid directory."); } BdatCollection tables = GetBdatCollection(xb2Fs, false); MapInfo[] gimmicks = ReadGmk.ReadAll(xb2Fs, tables); ExportMap.ExportCsv(gimmicks, options.Output); ExportMap.Export(xb2Fs, gimmicks, options.Output); } }
private static void GenerateSite(Options options) { if (options.Xb2Dir == null) { throw new NullReferenceException("Must specify XB2 Directory."); } if (options.Output == null) { throw new NullReferenceException("No output path was specified."); } if (!Directory.Exists(options.Xb2Dir)) { throw new DirectoryNotFoundException($"{options.Xb2Dir} is not a valid directory."); } options.Progress.LogMessage("Reading XB2 directories"); using (var xb2Fs = new Xb2Fs(options.Xb2Dir)) { Website.Generate.GenerateSite(xb2Fs, options.Output, options.Progress); } }