<commit_before>package main

import (
	"flag"
	"fmt"
	"os"
	"strings"

	"github.com/Sirupsen/logrus"
	"github.com/meatballhat/artifacts/upload"
)

var (
	// VersionString contains the compiled-in version number
	VersionString = ""
	// RevisionString contains the compiled-in git rev
	RevisionString = ""

	versionFlag   = flag.Bool("v", false, "Show version and exit")
	logFormatFlag = flag.String("f", "text", "Log output format (text or json)")

	log = logrus.New()
)

func main() {
	flag.Usage = usage
	if len(os.Args) < 2 {
		flag.PrintDefaults()
		os.Exit(1)
	}

	flag.Parse()
	if *versionFlag {
		fmt.Printf("artifacts version=%v rev=%v\n", VersionString, RevisionString)
		os.Exit(0)
	}

	log.Formatter = &logrus.TextFormatter{}
	if *logFormatFlag == "json" || os.Getenv("ARTIFACTS_LOG_FORMAT") == "json" {
		log.Formatter = &logrus.JSONFormatter{}
	}

	cmd := flag.Arg(0)
<commit_msg>Setting defaults for version and rev<commit_after>package main

import (
	"flag"
	"fmt"
	"os"
	"strings"

	"github.com/Sirupsen/logrus"
	"github.com/meatballhat/artifacts/upload"
)

var (
	// VersionString contains the compiled-in version number
	VersionString = "?"
	// RevisionString contains the compiled-in git rev
	RevisionString = "?"

	versionFlag   = flag.Bool("v", false, "Show version and exit")
	logFormatFlag = flag.String("f", "text", "Log output format (text or json)")

	log = logrus.New()
)

func main() {
	flag.Usage = usage
	if len(os.Args) < 2 {
		flag.PrintDefaults()
		os.Exit(1)
	}

	flag.Parse()
	if *versionFlag {
		fmt.Printf("artifacts version=%v rev=%v\n", VersionString, RevisionString)
		os.Exit(0)
	}

	log.Formatter = &logrus.TextFormatter{}
	if *logFormatFlag == "json" || os.Getenv("ARTIFACTS_LOG_FORMAT") == "json" {
		log.Formatter = &logrus.JSONFormatter{}
	}

	cmd := flag.Arg(0)

{'fraction_non_alphanumeric': 0.15478164731896074, 'fraction_numerical': 0.004422332780541736, 'mean_word_length': 4.142045454545454, 'pattern_counts': {'":': 0, '<': 5, '<?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': '6905296', 'n_tokens_mistral': 690, 'n_tokens_neox': 661, 'n_words': 147}