~n0mn0m/archivist

archivist/CommandLineInterface/Program.cs -rw-r--r-- 665 bytes
fd0058b7n0mn0m Clean up namespaces. 8 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
using System;
using System.IO;
using System.Linq;
using Extractor;

namespace CommandLineInterface
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Please provide the location of the PDF to load.");
            var inputPdf = Console.ReadLine();
            if (File.Exists(inputPdf))
            {
                Console.WriteLine($"Loading {inputPdf}");
                var result = new PdfExtractor(inputPdf).ExtractText();
                Console.WriteLine(string.Join("\t", result));
            } else {
                Console.WriteLine($"{inputPdf} not found.");
            } 
        }
    }
}