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.
18 lines
694 B
18 lines
694 B
import java.util.List;
|
|
|
|
public class HelpCommand implements Command {
|
|
private final ConsoleView view;
|
|
public HelpCommand(ConsoleView v) { this.view = v; }
|
|
|
|
@Override public String getName() { return "help"; }
|
|
|
|
@Override
|
|
public void execute(String[] args, List<Article> articles) {
|
|
view.printInfo("可用命令:");
|
|
view.printInfo(" crawl <url> 抓取指定 URL 的文章 (别名: c)");
|
|
view.printInfo(" list 列出所有已抓取的文章");
|
|
view.printInfo(" history 显示历史命令记录");
|
|
view.printInfo(" help 显示帮助信息");
|
|
view.printInfo(" exit 退出程序");
|
|
}
|
|
}
|
|
|