Пример #1
0
 public void PrintOptions(undeafLogger.MessageType messageType, undeafLogger logger)
 {
     Language.Print(messageType, logger);
     Subtitles.Print(messageType, logger);
     Input.Print(messageType, logger);
     Output.Print(messageType, logger);
 }
Пример #2
0
            public void Print(undeafLogger.MessageType messageType, undeafLogger logger)
            {
                string s = "InputOptions:[";

                s += "AvidemuxPy:(" + AvidemuxPy + ") ";
                s += "OverrideSrtFile:(" + OverrideSrtFile + ") ";
                s += "]";
                logger.Log(messageType, s);
            }
Пример #3
0
            public void Print(undeafLogger.MessageType messageType, undeafLogger logger)
            {
                string s = "Language Options:[";

                s += "ChapterNameFormat:(" + ChapterNameFormat + ") ";
                s += "UseLanguage:(" + UseLanguage + ") ";
                s += "]";
                logger.Log(messageType, s);
            }
Пример #4
0
 public void PrintWarnings(undeafLogger.MessageType messageType, undeafLogger logger)
 {
     if (string.IsNullOrWhiteSpace(Output.OverrideOutputDirectory))
     {
         logger.Log(messageType, "No output directory specified, will attempt to use SRT path");
     }
     if (string.IsNullOrWhiteSpace(Input.OverrideSrtFile))
     {
         logger.Log(messageType, "No SRT file specified, will attempt to resolve from program map");
     }
 }
Пример #5
0
            public void Print(undeafLogger.MessageType messageType, undeafLogger logger)
            {
                string s = "OutputOptions:[";

                s += "OverrideOutputDirectory:(" + OverrideOutputDirectory + ") ";
                s += "AlsoExportAllUnmodified:(" + AlsoExportAllUnmodified.ToString() + ") ";
                s += "AlsoExportAllUnmodifiedName:(" + AlsoExportAllUnmodifiedName + ") ";
                s += "GenerateChapterFile:(" + GenerateChapterFile.ToString() + ") ";
                s += "]";
                logger.Log(messageType, s);
            }
Пример #6
0
            public void Print(undeafLogger.MessageType messageType, undeafLogger logger)
            {
                string s = "SubtitleOptions:[";

                s += "SentenceCase:(" + SentenceCase.ToString() + ") ";
                s += "ReplaceUnknownUnicode:(" + ReplaceUnknownWithNote.ToString() + ") ";
                s += "RemoveBracketedText:(" + RemoveBracketedText.ToString() + ") ";
                s += "RemoveEmptyLines:(" + RemoveEmptyLines.ToString() + ") ";
                s += "RemoveUnicodeSymbols:(" + RemoveUnicodeSymbols.ToString() + ") ";
                s += "Delay:(" + Delay + "ms) ";
                s += "]";
                logger.Log(messageType, s);
            }
Пример #7
0
        public bool PrintErrors(undeafLogger.MessageType messageType, undeafLogger logger)
        {
            bool error = false;

            if (!string.IsNullOrWhiteSpace(Input.AvidemuxPy))
            {
                if (!System.IO.File.Exists(Input.AvidemuxPy))
                {
                    logger.Log(messageType, "Program map: File not found (" + Input.AvidemuxPy + ")");
                    error = true;
                }
            }
            else
            {
                logger.Log(messageType, "Program map: Input file not specified.");
                error = true;
            }
            return(error);
        }
Пример #8
0
 public void PrintHelp(undeafLogger.MessageType messageType, undeafLogger logger)
 {
     logger.Log(messageType, "General:  -help               Displays this help.");
     logger.Log(messageType, "Language: -lang:lang <str>    Sets the language, default \"en\"");
     logger.Log(messageType, "          -lang:chpfmt <str>  Displays this help, default \"Chapter {0:0}\"");
     logger.Log(messageType, "Subtitle: -subs:sentcase      Forces sentence case to all incoming subs");
     logger.Log(messageType, "          -subs:rmbrkt        Remove all content between brackets");
     logger.Log(messageType, "          -subs:rmlf          Remove empty lines");
     logger.Log(messageType, "          -subs:swpsym        Swaps unknown symbols with note symbol");
     logger.Log(messageType, "          -subs:rmsym         Removes all unknown unicode symbols");
     logger.Log(messageType, "          -subs:default       Equivelent to specifying: -rmlf -swpsym");
     logger.Log(messageType, "          -subs:delay <num>   Delays incoming subs by, in ms, default 0");
     logger.Log(messageType, "Input:    -in:py <str>        Input program map as an Avidemux save file");
     logger.Log(messageType, "          -in:srt <str>       Input SRT to use");
     logger.Log(messageType, "Output :  -out:dir <str>      Directory for output files");
     logger.Log(messageType, "          -out:dump           Save an extra copy of unmodified subs");
     logger.Log(messageType, "          -out:dumpname <str> Unmodified subs filename suffix, default \"-sdh\"");
     logger.Log(messageType, "          -out:genchp         Generate chapter file based on program map");
 }
Пример #9
0
 public bool ValidateOptions(undeafLogger.MessageType warn, undeafLogger.MessageType error, undeafLogger logger)
 {
     PrintWarnings(warn, logger);
     return(!PrintErrors(error, logger));
 }