You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
794 B
23 lines
794 B
package com.example.datacollect;
|
|
|
|
import com.example.datacollect.controller.CrawlerController;
|
|
import com.example.datacollect.model.Article;
|
|
import com.example.datacollect.repository.ArticleRepository;
|
|
import com.example.datacollect.view.ConsoleView;
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
|
|
public class Main {
|
|
|
|
public static void main(String[] args) {
|
|
ConsoleView view = new ConsoleView();
|
|
List<Article> articles = new ArrayList<>();
|
|
ArticleRepository repository = new ArticleRepository();
|
|
CrawlerController controller = new CrawlerController(view, articles, repository);
|
|
|
|
view.printSuccess("Welcome to CLI Crawler (w11)! Type help for commands.");
|
|
while (true) {
|
|
controller.handle(view.readLine());
|
|
}
|
|
}
|
|
}
|