-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
65 lines (59 loc) · 1.93 KB
/
Copy pathProgram.cs
File metadata and controls
65 lines (59 loc) · 1.93 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
63
64
65
using System;
using System.Net;
using System.Collections.Generic;
using System.IO;
using System.Diagnostics;
namespace ArchiveMe
{
class Program
{
static void Main(string[] args)
{
string board;
string thread_id;
IOandErrorHandling.Menu();
string inp = Console.ReadLine();
if (inp == "1")
{
Console.Write("Set board (g,fit,diy,...): ");
board = Console.ReadLine();
Console.Write("Enter thread ID: ");
thread_id = Console.ReadLine();
if(IOandErrorHandling.CheckUrl(board, thread_id))
{
Console.WriteLine("Scrapping old posts...");
API api = new API();
api.Thread_scrapper(board, thread_id);
IOandErrorHandling.Quit();
api.Quit();
}
else
{
Console.WriteLine("Wrong board or thread ID.");
Console.ResetColor();
}
}
else if(inp == "2")
{
Database.GetAllDatabasesAndTables();
Console.Write("\nSelect board: ");
board = Console.ReadLine();
Console.Write("Select Thread ID: ");
thread_id = Console.ReadLine();
if (IOandErrorHandling.CheckIfDatabaseExist(board, thread_id) && IOandErrorHandling.CheckIfTableExist(board, thread_id))
{
Visualise visualise = new Visualise(board, thread_id);
}
else
{
Console.WriteLine("Wrong board or thread ID.");
}
}
else
{
Console.WriteLine("Wrong input.");
Console.ResetColor();
}
}
}
}