<commit_before>configo
=======

Simple configuration files _AND_ command line parsing for Go.

The same API provided by the flag package, extended for use with configuration
files.  Use a single function to setup a command line flag and configuration
file option simultaneously.  Create default configuration files automatically.

Get the source

    $ go get githib.com/quincy/configo

Usage
-----

    // file: example.go
    package main
    
    import (
        "fmt"
        "github.com/quincy/configo"
    )
    
    var species = configo.String("species", "gopher", "the species we are studying", true, true)
    //                                                                                 ^     ^
    //                                This option can be set from the command line ----+     |
    //                                                                                       |
    //                        This option can be set from the configuration file ------------+

    configo.SetDelimiter(":")  // Default is "="
    configo.Parse()
    
    fmt.Printf("Value of species is %s\n", species)

The first time your program is run a default config file will be created with
all options set to defaults, commented with the usage text.

    $ go run example.go
    Value of species is gopher
    $ cat ~/.examplerc
    # Default config file for example
    # Written on 07 Aug 13 20:15 -0600
    
    # the species we are studying
    species:gopher
    
The command line arguments override those found in the config file.

    $ go run example.go -species=mole
    Value of species is mole

See example/example.go for more complicated examples.<commit_msg>Updated readme to reflect correct usage.<commit_after>configo
=======

Simple configuration files _AND_ command line parsing for Go.

The same API provided by the flag package, extended for use with configuration
files.  Use a single function to setup a command line flag and configuration
file option simultaneously.  Create default configuration files automatically.

Get the source

    $ go get githib.com/quincy/configo

Usage
-----

    // file: example.go
    package main
    
    import (
        "fmt"
        "github.com/quincy/configo"
    )
    
    var species = configo.String("species", "gopher", "the species we are studying")

    configo.SetDelimiter(":")  // Default is "="
    configo.Parse()
    
    fmt.Printf("Value of species is %s\n", species)

The first time your program is run a default config file will be created with
all options set to defaults, commented with the usage text.

    $ go run example.go
    Value of species is gopher
    $ cat ~/.examplerc
    # Default config file for example
    # Written on 07 Aug 13 20:15 -0600
    
    # the species we are studying
    species:gopher
    
The command line arguments override those found in the config file.

    $ go run example.go -species=mole
    Value of species is mole

See example/example.go for more complicated examples.
{'fraction_non_alphanumeric': 0.07292707292707293, 'fraction_numerical': 0.007992007992007992, 'mean_word_length': 2.093717816683831, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4451578', 'n_tokens_mistral': 788, 'n_tokens_neox': 744, 'n_words': 336}