Exemplo n.º 1
0
        private static void main(string[] args)
        {
            _kernel.Load <CoreModule>();
            _kernel.Load <DalModule>();
            _kernel.Load <UtilModule>();

            if (args.GetFlag("-notify"))
            {
                NewVersionNotifier.Notify();
                return;
            }

            string directory = args.GetParam("-sign");

            if (directory != null)
            {
                string setCodes = args.GetParam("-set");
                string output   = args.GetParam("-output") ?? AppDir.Root.Join("filelist.txt").Value;
                _kernel.Get <ImageDirectorySigner>().SignFiles(new FsPath(directory), new FsPath(output), setCodes);
                return;
            }

            printUsage();
        }
Exemplo n.º 2
0
        private static void main(string[] args)
        {
            _kernel.Load <CoreModule>();
            _kernel.Load <DalModule>();
            _kernel.Load <UtilModule>();

            if (args.GetFlag("-notify"))
            {
                NewVersionNotifier.Notify();
                return;
            }

            if (args.GetFlag("-update_help"))
            {
                Console.Write("Updating local help...");
                new HelpDownloader().UpdateLocalHelp();
                Console.WriteLine(" Done");
                return;
            }

            string directory = args.GetParam("-rename_artworks");

            if (directory != null)
            {
                ArtworkRenamer.RenameArtworks(directory);
                return;
            }

            directory = args.GetParam("-sign");
            if (directory != null)
            {
                var output = args.GetParam("-output") ?? AppDir.Root.AddPath("filelist.txt");
                sign(directory, output);
                return;
            }

            directory = args.GetParam("-export");
            if (directory != null)
            {
                bool   silent  = args.GetFlag("-silent");
                bool   small   = args.GetFlag("-small");
                bool   zoomed  = args.GetFlag("-zoomed");
                string setCode = args.GetParam("-set");

                string smallSubdir;
                string zoomedSubdir;

                if (small || zoomed)
                {
                    smallSubdir  = args.GetParam("-small");
                    zoomedSubdir = args.GetParam("-zoomed");
                }
                else
                {
                    printUsage();
                    return;
                }


                if (Directory.Exists(directory))
                {
                    exportImages(small, zoomed, setCode, directory, silent, smallSubdir, zoomedSubdir);
                }
                else
                {
                    printUsage();
                }

                return;
            }

            if (args.GetFlag("-forge"))
            {
                string setCode = args.GetParam("-set");
                replaceForgeImages(setCode);
            }
        }