-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
62 lines (52 loc) · 1.74 KB
/
Program.cs
File metadata and controls
62 lines (52 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
using System;
using System.IO;
using System.Collections.Generic;
namespace QuickTimeParser
{
class Program
{
static void Main(string[] args)
{
var arguments = ParseArguments(args);
if (arguments.Count == 0 || arguments.Contains("--help"))
{
PrintHelp();
return;
}
var filePath = arguments[0];
if (!File.Exists(filePath))
{
PrintHelp();
return;
}
bool deepScan = arguments.Contains("--deep-scan");
bool showData = arguments.Contains("--show-data");
var parser = new Parser(deepScan, showData);
parser.ParseFile(filePath);
}
static List<string> ParseArguments(string[] args)
{
var arguments = new List<string>();
foreach (var arg in args)
{
arguments.Add(arg);
}
return arguments;
}
static void PrintHelp()
{
Console.WriteLine("QuickTimeParser");
Console.WriteLine("https://github.com/xmatekaj/QuickTimeParser");
Console.WriteLine("");
Console.WriteLine("Help:");
Console.WriteLine("------");
Console.WriteLine("Usage: QuickTimeParser FILE [options]");
Console.WriteLine();
Console.WriteLine("Options:");
Console.WriteLine(" --help Display this help message");
Console.WriteLine(" --deep-scan Scans file for hidden video/audio");
Console.WriteLine(" --show-data Show some additional data about atoms");
Console.ReadKey();
}
}
}