Skip to content

Commit

Permalink
Rename JabRefCli to JabKit (JabRef#11983)
Browse files Browse the repository at this point in the history
  • Loading branch information
koppor authored Oct 16, 2024
1 parent 7a91f75 commit c32298e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
6 changes: 3 additions & 3 deletions src/main/java/org/jabref/Launcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import java.util.List;

import org.jabref.cli.JabRefCli;
import org.jabref.cli.JabKit;
import org.jabref.gui.JabRefGUI;
import org.jabref.gui.preferences.GuiPreferences;
import org.jabref.gui.preferences.JabRefGuiPreferences;
Expand All @@ -23,7 +23,7 @@
public class Launcher {

public static void main(String[] args) {
JabRefCli.initLogging(args);
JabKit.initLogging(args);

// Initialize preferences
final JabRefGuiPreferences preferences = JabRefGuiPreferences.getInstance();
Expand All @@ -33,7 +33,7 @@ public static void main(String[] args) {
DefaultFileUpdateMonitor fileUpdateMonitor = new DefaultFileUpdateMonitor();
HeadlessExecutorService.INSTANCE.executeInterruptableTask(fileUpdateMonitor, "FileUpdateMonitor");

List<UiCommand> uiCommands = JabRefCli.processArguments(args, preferences, fileUpdateMonitor);
List<UiCommand> uiCommands = JabKit.processArguments(args, preferences, fileUpdateMonitor);
// The method `processArguments` quites the whole JVM if no GUI is needed.

PreferencesMigrations.runMigrations(preferences);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,16 @@
import org.slf4j.bridge.SLF4JBridgeHandler;
import org.tinylog.configuration.Configuration;

/**
* Entrypoint for a command-line only version of JabRef.
*
* Does not do any preference migrations
*/
public class JabRefCli {
/// Entrypoint for a command-line only version of JabRef.
/// It does not open any dialogs, just parses the command line arguments and outputs text and creates/modifies files.
///
/// See [Command Line Interface Guidelines](https://clig.dev/) for general guidelines how to design a good CLI interface.
///
/// It does not open any GUI.
/// For the GUI application see {@link org.jabref.Launcher}.
///
/// Does not do any preference migrations.
public class JabKit {
private static Logger LOGGER;

public static void main(String[] args) {
Expand Down Expand Up @@ -144,7 +148,7 @@ public static void initLogging(String[] args) {
try {
Files.createDirectories(directory);
} catch (IOException e) {
LOGGER = LoggerFactory.getLogger(JabRefCli.class);
LOGGER = LoggerFactory.getLogger(JabKit.class);
LOGGER.error("Could not create log directory {}", directory, e);
return;
}
Expand All @@ -162,7 +166,7 @@ public static void initLogging(String[] args) {
"writerFile.backups", "30");
configuration.forEach(Configuration::set);

LOGGER = LoggerFactory.getLogger(JabRefCli.class);
LOGGER = LoggerFactory.getLogger(JabKit.class);
}

/**
Expand Down

0 comments on commit c32298e

Please sign in to comment.