<commit_before>package main

import (
	"fmt"
	"io/ioutil"
	"log"
	"os"

	"github.com/codegangsta/cli"
)

func main() {
	app := cli.NewApp()
	app.Name = "ccat"
	app.Usage = "Concatenate FILE(s), or standard input, to standard output with colorized output."
	app.Version = Version
	app.Author = ""
	app.Email = ""
	app.HideHelp = true
	app.HideVersion = true
	app.Flags = []cli.Flag{
		cli.StringFlag{
			Name:  "bg",
			Value: "light",
			Usage: `Set to "light" or "dark" depending on the terminal's background.`,
		},
	}
	app.Action = func(c *cli.Context) {
		if len(c.Args()) != 1 {
			log.Fatal("Must specify exactly 1 filename argument.")
		}

		var colorDefs ColorDefs
		if c.String("bg") == "dark" {
			colorDefs = DarkColorDefs
		} else {
			colorDefs = LightColorDefs
		}

		input, err := ioutil.ReadFile(c.Args().Get(0))
		if err != nil {
			log.Fatal(err)
		}

		content, err := AsCCat(input, colorDefs)
		if err != nil {
			log.Fatal(err)
		}

		fmt.Printf("%s", content)<commit_msg>`ccat` multiple files<commit_after>package main

import (
	"fmt"
	"io/ioutil"
	"log"
	"os"

	"github.com/codegangsta/cli"
)

func main() {
	app := cli.NewApp()
	app.Name = "ccat"
	app.Usage = "Concatenate FILE(s), or standard input, to standard output with colorized output."
	app.Version = Version
	app.Author = ""
	app.Email = ""
	app.HideHelp = true
	app.HideVersion = true
	app.Flags = []cli.Flag{
		cli.StringFlag{
			Name:  "bg",
			Value: "light",
			Usage: `Set to "light" or "dark" depending on the terminal's background.`,
		},
	}
	app.Action = func(c *cli.Context) {
		var colorDefs ColorDefs
		if c.String("bg") == "dark" {
			colorDefs = DarkColorDefs
		} else {
			colorDefs = LightColorDefs
		}

		for _, file := range c.Args() {
			input, err := ioutil.ReadFile(file)
			if err != nil {
				log.Fatal(err)
			}

			content, err := AsCCat(input, colorDefs)
			if err != nil {
				log.Fatal(err)
			}

			fmt.Printf("%s", content)
		}
{'fraction_non_alphanumeric': 0.15816589386913962, 'fraction_numerical': 0.0015455950540958269, 'mean_word_length': 3.1495726495726495, 'pattern_counts': {'":': 0, '<': 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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5137656', 'n_tokens_mistral': 836, 'n_tokens_neox': 748, 'n_words': 180}