Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            var logger   = new Logger();
            var songlist = new Songlist(logger);

            logger.WriteLine("Hello World!");

            var songRepositoryFolder = args[0];

            logger.WriteLine($"Program will generate list of songs from {songRepositoryFolder}");

            var outputPath = args[1];

            logger.WriteLine($"Zip file with full songbook including new main and master files would be saved at {outputPath}");

            var workingCopyOfSongRepository = Path.Combine(Path.GetDirectoryName(outputPath), "!workingSongRepo");

            logger.WriteLine($"Program will use copy located in {workingCopyOfSongRepository}");
            Utilities.CopyAll(new DirectoryInfo(songRepositoryFolder), new DirectoryInfo(workingCopyOfSongRepository));

            var folders = Directory.GetDirectories(workingCopyOfSongRepository);

            songlist.CreateListOfChapters(folders);
            songlist.CreateListOfSongs();
            songlist.Initialize();
            songlist.WrapCarets();
            songlist.CreateOutputFile(workingCopyOfSongRepository, outputPath);
        }
Ejemplo n.º 2
0
 public void Generate()
 {
     songlist.WrapCarets();
     songlist.ConsolidateChapters(this.MinimumAllowedChapterSize);
     songlist.ReplaceMainMasters(this.workingDirectory);
 }