<commit_before>package com.rarchives.ripme;

import java.awt.*;
import java.io.File;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileNotFoundException;

import java.net.MalformedURLException;
import java.net.URL;
import java.util.Arrays;
import java.util.List;

import javax.swing.SwingUtilities;

import org.apache.commons.cli.BasicParser;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.HelpFormatter;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;
import org.apache.commons.lang.SystemUtils;
import org.apache.log4j.Logger;

import com.rarchives.ripme.ripper.AbstractRipper;
import com.rarchives.ripme.ui.History;
import com.rarchives.ripme.ui.HistoryEntry;
import com.rarchives.ripme.ui.MainWindow;
import com.rarchives.ripme.ui.UpdateUtils;
import com.rarchives.ripme.utils.RipUtils;
import com.rarchives.ripme.utils.Utils;

/**
 * Entry point to application.
 * Decides to display UI or to run silently via command-line.
 */
public class App {

    public static final Logger logger = Logger.getLogger(App.class);
    private static final History HISTORY = new History();

    public static void main(String[] args) throws MalformedURLException {
        CommandLine cl = getArgs(args);

        if (args.length > 0 && cl.hasOption('v')){
            logger.info(UpdateUtils.getThisJarVersion());
            System.exit(0);
        }

        if (GraphicsEnvironment.isHeadless()) {
            handleArguments(args);
        } else {
            if (SystemUtils.IS_OS_MAC_OSX) {
                System.setProperty("apple.laf.useScreenMenuBar", "true");
                System.setProperty("com.apple.mrj.application.apple.menu.about.name", "RipMe");
            }
<commit_msg>Fix usage of command-line on non-headless systems<commit_after>package com.rarchives.ripme;

import java.awt.*;
import java.io.File;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileNotFoundException;

import java.net.MalformedURLException;
import java.net.URL;
import java.util.Arrays;
import java.util.List;

import javax.swing.SwingUtilities;

import org.apache.commons.cli.BasicParser;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.HelpFormatter;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;
import org.apache.commons.lang.SystemUtils;
import org.apache.log4j.Logger;

import com.rarchives.ripme.ripper.AbstractRipper;
import com.rarchives.ripme.ui.History;
import com.rarchives.ripme.ui.HistoryEntry;
import com.rarchives.ripme.ui.MainWindow;
import com.rarchives.ripme.ui.UpdateUtils;
import com.rarchives.ripme.utils.RipUtils;
import com.rarchives.ripme.utils.Utils;

/**
 * Entry point to application.
 * Decides to display UI or to run silently via command-line.
 */
public class App {

    public static final Logger logger = Logger.getLogger(App.class);
    private static final History HISTORY = new History();

    public static void main(String[] args) throws MalformedURLException {
        CommandLine cl = getArgs(args);

        if (args.length > 0 && cl.hasOption('v')){
            logger.info(UpdateUtils.getThisJarVersion());
            System.exit(0);
        }

        if (GraphicsEnvironment.isHeadless() || args.length > 0) {
            handleArguments(args);
        } else {
            if (SystemUtils.IS_OS_MAC_OSX) {
                System.setProperty("apple.laf.useScreenMenuBar", "true");
                System.setProperty("com.apple.mrj.application.apple.menu.about.name", "RipMe");
            }

{'fraction_non_alphanumeric': 0.11417645452062278, 'fraction_numerical': 0.0019120458891013384, 'mean_word_length': 3.659033078880407, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4246706', 'n_tokens_mistral': 1134, 'n_tokens_neox': 1122, 'n_words': 224}