<commit_before>#!/usr/bin/env escript
%% -*- mode: erlang -*-
-export([main/1]).

%% External API

main([Name]) ->
    main([Name, "."]);
main([Name, Dest]) ->
    ensure(),
    DestDir = filename:absname(Dest),
    ok = webmachine_skel:skelcopy(DestDir, Name);
main(_) ->
    usage().

%% Internal API

ensure() ->
    code:add_patha(filename:join(filename:dirname(escript:script_name()),
                                 "../ebin")).

usage() ->
    io:format("usage: ~s name [destdir]~n",
              [filename:basename(escript:script_name())]),
    halt(1).

<commit_msg>Print usage when new_webmachine.erl is given a name that looks like a path<commit_after>#!/usr/bin/env escript
%% -*- mode: erlang -*-
-export([main/1]).

%% External API

main([Name]) ->
    case Name of
        "." ++ _Rest -> usage();
        "~" ++ _Rest -> usage();
        "/" ++ _Rest -> usage();
        _Any         -> main([Name, "."])
    end;
main([Name, Dest]) ->
    ensure(),
    DestDir = filename:absname(Dest),
    ok = webmachine_skel:skelcopy(DestDir, Name);
main(_) ->
    usage().

%% Internal API

ensure() ->
    code:add_patha(filename:join(filename:dirname(escript:script_name()),
                                 "../ebin")).

usage() ->
    io:format("usage: ~s name [destdir]~n",
              [filename:basename(escript:script_name())]),
    halt(1).


{'fraction_non_alphanumeric': 0.20235467255334805, 'fraction_numerical': 0.0029433406916850625, 'mean_word_length': 2.5142118863049094, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5365321', 'n_tokens_mistral': 457, 'n_tokens_neox': 450, 'n_words': 85}