<commit_before>#include <iostream>
#include <cstdlib>
#include <cassert>
#include <string>
#include "ListCmd.h"
#include "VtkList.h"
#include "StringUtils.h"

using namespace std;

// ---------------------------------------------------------------------------

cigma::ListCmd::ListCmd()
{
    name = "list";
}

cigma::ListCmd::~ListCmd()
{
}

// ---------------------------------------------------------------------------


void cigma::ListCmd::setupOptions(AnyOption *opt)
{
    //cout << "Calling cigma::ListCmd::setupOptions()" << endl;

    assert(opt != 0);

    /* setup usage */
    opt->addUsage("Usage:");
    opt->addUsage("   cigma list FILE");

    /* setup flags and options */
    opt->setFlag("help", 'h');

    return;
}


void cigma::ListCmd::configure(AnyOption *opt)
{
    //cout << "Calling cigma::ListCmd::configure()" << endl;

    assert(opt != 0);
    char *in = 0;

    int argc = opt->getArgc();
    if (argc > 0)
    {
        in = opt->getArgv(0);
        filename = in;
    }

    return;
}


int cigma::ListCmd::run()
{
    //cout << "Calling cigma::ListCmd::run()" << endl;

    if (filename == "")
    {
        return 1;
    }

    string fileroot;
    string extension;<commit_msg>Updated usage string for ListCmd<commit_after>#include <iostream>
#include <cstdlib>
#include <cassert>
#include <string>
#include "ListCmd.h"
#include "VtkList.h"
#include "StringUtils.h"

using namespace std;

// ---------------------------------------------------------------------------

cigma::ListCmd::ListCmd()
{
    name = "list";
}

cigma::ListCmd::~ListCmd()
{
}

// ---------------------------------------------------------------------------


void cigma::ListCmd::setupOptions(AnyOption *opt)
{
    //cout << "Calling cigma::ListCmd::setupOptions()" << endl;

    assert(opt != 0);

    /* setup usage */
    opt->addUsage("Usage:");
    opt->addUsage("   cigma list <file>.h5");
    opt->addUsage("   cigma list <file>.vtk");

    /* setup flags and options */
    opt->setFlag("help", 'h');

    return;
}


void cigma::ListCmd::configure(AnyOption *opt)
{
    //cout << "Calling cigma::ListCmd::configure()" << endl;

    assert(opt != 0);
    char *in = 0;

    int argc = opt->getArgc();
    if (argc > 0)
    {
        in = opt->getArgv(0);
        filename = in;
    }

    if (filename == "")
    {
        opt->printUsage();
    }
    return;
}


int cigma::ListCmd::run()
{
    //cout << "Calling cigma::ListCmd::run()" << endl;

    if (filename == "")
    {
        return 1;
    }

    string fileroot;
    string extension;
{'fraction_non_alphanumeric': 0.2839313572542902, 'fraction_numerical': 0.005070202808112325, 'mean_word_length': 1.85, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 27, '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': '298065', 'n_tokens_mistral': 847, 'n_tokens_neox': 807, 'n_words': 172}