103
static string GetChapter(int chapterNum, ParsedLine parsedLine, ParsedLine ParsedLineNext) => $@"# Chapter {chapterNum} - {parsedLine.Title}
1
using System;
2
using System.Collections.Generic;
3
using System.IO;
4
using System.Linq;
5
using System.Text;
6
using System.Text.RegularExpressions;
7
8
namespace FfmpegChapterTool
9
{
10
class Program
11
{
12
// Config
13
static readonly TimeSpan _videoLength = new TimeSpan(0, 6, 0);
14
static readonly string _example = @"
15
00:00:00 - Intro
16
00:02:30 - The Middle
17
00:04:45 - Outro
18
";
19
20
static readonly Regex _regex = new Regex(@"((\d{2}):(\d{2}):(\d{2}))\s+-\s+(.*)", RegexOptions.Compiled);
21
22
record ParsedLine(string Title, TimeSpan Timestamp, string RawTimeStampValue);
23
24
static bool TryParseLine(string input, out ParsedLine result)
Cached Result