Verified Owner
Top Description Fields Constructors Methods
org.jabref.toolkit

public Class JabKitLauncher

extends Object
Class Inheritance
Imports
java.io.File, .IOException, java.net.Authenticator, java.nio.file.Files, .Path, java.util.Arrays, .List, .Map, .Set, java.util.stream.Collectors, javafx.util.Pair, org.jabref.logic.importer.SearchBasedFetcher, .WebFetcher, .WebFetchers, org.jabref.logic.journals.JournalAbbreviationLoader, .JournalAbbreviationRepository, org.jabref.logic.l10n.Localization, org.jabref.logic.net.ProxyAuthenticator, .ProxyPreferences, .ProxyRegisterer, org.jabref.logic.net.ssl.SSLPreferences, .TrustStoreManager, org.jabref.logic.preferences.CliPreferences, .JabRefCliPreferences, org.jabref.logic.protectedterms.ProtectedTermsLoader, org.jabref.logic.util.BuildInfo, .Directories, org.jabref.logic.util.strings.StringUtil, org.jabref.model.entry.BibEntryTypesManager, org.jabref.model.util.DummyFileUpdateMonitor, .FileUpdateMonitor, org.jabref.toolkit.commands.JabKit, org.jabref.toolkit.exception.CliExceptionHandler, org.jabref.toolkit.service.ExportService, .ImportService, com.airhacks.afterburner.injection.Injector, org.slf4j.Logger, .LoggerFactory, org.slf4j.bridge.SLF4JBridgeHandler, org.tinylog.Level, org.tinylog.configuration.Configuration, picocli.CommandLine

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 for general guidelines how to design a good CLI interface.

It does not open any GUI. For the GUI application see org.jabref.Launcher.

Does not do any preference migrations.

Field Summary

Modifier and TypeField and Description
private static final String
private static Logger

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static void
applyUsageFooters(CommandLine commandLine, List<Pair<String, String>> inputFormats, List<Pair<String, String>> outputFormats, Set<SearchBasedFetcher> fetchers)

Applies appropriate usage footers to each subcommand based on their supported options.

private static void
configureProxy(ProxyPreferences proxyPreferences)

private static void
configureSSL(SSLPreferences sslPreferences)

private static boolean
public static void
initLogging(String[] args)

This needs to be called as early as possible.

public static void
main(String[] args)

Note

To test with gradle, use jabkit -> Tasks -> application -> run Use --args="..." as parameters to "Run"

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

JABKIT_BRANDback to summary
private static final String JABKIT_BRAND
LOGGERback to summary
private static Logger LOGGER

Constructor Detail

JabKitLauncherback to summary
public JabKitLauncher()

Method Detail

applyUsageFootersback to summary
private static void applyUsageFooters(CommandLine commandLine, List<Pair<String, String>> inputFormats, List<Pair<String, String>> outputFormats, Set<SearchBasedFetcher> fetchers)

Applies appropriate usage footers to each subcommand based on their supported options. Distinguishes between input formats, output formats, and export formats.

configureProxyback to summary
private static void configureProxy(ProxyPreferences proxyPreferences)
configureSSLback to summary
private static void configureSSL(SSLPreferences sslPreferences)
hasCommandOptionback to summary
private static boolean hasCommandOption(CommandLine.Model.CommandSpec commandSpec, String optionName)
initLoggingback to summary
public static void initLogging(String[] args)

This needs to be called as early as possible. After the first log writing, it is not possible to alter the log configuration programmatically anymore.

mainback to summary
public static void main(String[] args)

Note

To test with gradle, use jabkit -> Tasks -> application -> run Use --args="..." as parameters to "Run"

Implementation Note

method needs to be public, because JabKitLauncher calls it.