<commit_before>#!/usr/bin/env node
var connect = require("connect"),
    http = require("http"),
    Thing = require("nature").Thing,
    wodge = require("wodge");

var usage = "usage: ws [--directory|-d <directory>] [--port|-p <port>] [--log-format|-f dev|default|short|tiny]";

function halt(message){
    console.log(wodge.red("Error ") + message);
    console.log(usage);
    process.exit(1);
}

var options = new Thing()
    .define({ name: "port", alias: "p", type: "number", defaultOption: true, value: 8000 })
    .define({ name: "log-format", alias: "f", type: "string", value: "dev" })
    .define({ name: "help", alias: "h", type: "boolean" })
    .define({ name: "directory", alias: "d", type: "string", defaultOption: true, value: process.cwd()})
    .on("error", function(err){
        halt(err.message);
    })
    .set(process.argv);
<commit_msg>only one defaultOption should be defined<commit_after>#!/usr/bin/env node
var connect = require("connect"),
    http = require("http"),
    Thing = require("nature").Thing,
    wodge = require("wodge");

var usage = "usage: ws [--directory|-d <directory>] [--port|-p <port>] [--log-format|-f dev|default|short|tiny]";

function halt(message){
    console.log(wodge.red("Error ") + message);
    console.log(usage);
    process.exit(1);
}

var options = new Thing()
    .define({ name: "port", alias: "p", type: "number", defaultOption: true, value: 8000 })
    .define({ name: "log-format", alias: "f", type: "string", value: "dev" })
    .define({ name: "help", alias: "h", type: "boolean" })
    .define({ name: "directory", alias: "d", type: "string", value: process.cwd() })
    .on("error", function(err){
        halt(err.message);
    })
    .set(process.argv);

{'fraction_non_alphanumeric': 0.21606008087810513, 'fraction_numerical': 0.005777007510109763, 'mean_word_length': 3.8245125348189415, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '7157167', 'n_tokens_mistral': 602, 'n_tokens_neox': 575, 'n_words': 149}