1 changed files with 0 additions and 36 deletions
@ -1,36 +0,0 @@ |
|||||
package com.example.datacollect.command; |
|
||||
|
|
||||
import org.slf4j.Logger; |
|
||||
import org.slf4j.LoggerFactory; |
|
||||
|
|
||||
import com.example.datacollect.repository.ArticleRepository; |
|
||||
import com.example.datacollect.view.ConsoleView; |
|
||||
|
|
||||
public class HelpCommand implements Command { |
|
||||
private static final Logger logger = LoggerFactory.getLogger(HelpCommand.class); |
|
||||
|
|
||||
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) { |
|
||||
logger.debug("Displaying help information"); |
|
||||
view.printInfo("Commands:"); |
|
||||
view.printInfo(" crawl <url> - Crawl articles from the specified URL"); |
|
||||
view.printInfo(" c <url> - Alias for crawl"); |
|
||||
view.printInfo(" list - List all crawled articles"); |
|
||||
view.printInfo(" save [file] - Save articles to file (default: articles.txt)"); |
|
||||
view.printInfo(" load [file] - Load articles from file (default: articles.txt)"); |
|
||||
view.printInfo(" history - Show command history"); |
|
||||
view.printInfo(" help - Show this help message"); |
|
||||
view.printInfo(" exit - Exit the application"); |
|
||||
} |
|
||||
} |
|
||||
Loading…
Reference in new issue