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.
 
 
 

28 lines
937 B

package com.example.datacollect.command;
import com.example.datacollect.repository.ArticleRepository;
import com.example.datacollect.view.ConsoleView;
public class HelpCommand implements Command {
private final ConsoleView view;
public HelpCommand(ConsoleView view) {
this.view = view;
}
@Override
public String getName() {
return "help";
}
@Override
public void execute(String[] args, ArticleRepository repository) {
view.printInfo("Commands:");
view.printInfo(" crawl <url> - Crawl articles from URL and store");
view.printInfo(" analyze <url> - Analyze URL without storing");
view.printInfo(" list - List all stored articles");
view.printInfo(" history - Show command history");
view.printInfo(" help - Show this help");
view.printInfo(" exit - Exit the program");
}
}