<commit_before>package main

import (
	"fmt"
	"log"
	"os"
	"os/exec"
	"path/filepath"
	"strings"
	"syscall"

	flag "github.com/dotcloud/docker/pkg/mflag"
)

func main() {

	var (
		flVersion = flag.Bool([]string{"v", "-version"}, false, "Print version information and quit")
		flHelp    = flag.Bool([]string{"h", "-help"}, false, "Print this message")
		flDebug   = flag.Bool([]string{"-debug"}, false, "Run as DEBUG mode")
		flEditor  = flag.Bool([]string{"e", "-editor"}, false, "Use Editor by default")
		flForce   = flag.Bool([]string{"f", "-force"}, false, "Create README file without prompting")
		flCommand = flag.String([]string{"c", "-command"}, "", "Set Command to open README")
	)

	flag.Parse()

	if *flDebug {
		os.Setenv("DEBUG", "1")
	}

	if *flVersion {
		showVersion()
		os.Exit(0)
	}

	if *flHelp {
		flag.Usage()
		os.Exit(0)
	}

	cmd := retrieveCmd()

	if *flCommand != "" {
		cmd = *flCommand
	}

	if *flEditor {
		cmd = os.Getenv("EDITOR")
	}

	debug("cmd:", cmd)

	path := "."
	if len(os.Args) > 1 {
		path = flag.Arg(0)
	}
	debug("path:", path)

	absPath, err := filepath.Abs(path)
	if err != nil {
		panic(err)
	}
	debug("url:", absPath)

	if _, err := os.Stat(absPath); os.IsNotExist(err) {
		fmt.Printf("no such file or directory: %s\n", absPath)
		os.Exit(1)
	}

	os.Chdir(absPath)

	url := retrieveURL()
	if cmd == "" && url != "" {
		openByBrowser(url)<commit_msg>Add option to use browser forcely<commit_after>package main

import (
	"fmt"
	"log"
	"os"
	"os/exec"
	"path/filepath"
	"strings"
	"syscall"

	flag "github.com/dotcloud/docker/pkg/mflag"
)

func main() {

	var (
		flVersion = flag.Bool([]string{"v", "-version"}, false, "Print version information and quit")
		flHelp    = flag.Bool([]string{"h", "-help"}, false, "Print this message")
		flDebug   = flag.Bool([]string{"-debug"}, false, "Run as DEBUG mode")
		flEditor  = flag.Bool([]string{"e", "-editor"}, false, "Use Editor by default")
		flBrowser = flag.Bool([]string{"b", "-browser"}, false, "Use only browser")
		flForce   = flag.Bool([]string{"f", "-force"}, false, "Create README file without prompting")
		flCommand = flag.String([]string{"c", "-command"}, "", "Set Command to open README")
	)

	flag.Parse()

	if *flDebug {
		os.Setenv("DEBUG", "1")
	}

	if *flVersion {
		showVersion()
		os.Exit(0)
	}

	if *flHelp {
		flag.Usage()
		os.Exit(0)
	}

	cmd := retrieveCmd()

	if *flCommand != "" {
		cmd = *flCommand
	}

	if *flEditor {
		cmd = os.Getenv("EDITOR")
	}

	if *flBrowser {
		cmd = ""
	}

	debug("cmd:", cmd)

	path := "."
	if len(os.Args) > 1 {
		path = flag.Arg(0)
	}
	debug("path:", path)

	absPath, err := filepath.Abs(path)
	if err != nil {
		panic(err)
	}
	debug("url:", absPath)

	if _, err := os.Stat(absPath); os.IsNotExist(err) {
		fmt.Printf("no such file or directory: %s\n", absPath)
		os.Exit(1)
	}

	os.Chdir(absPath)

	url := retrieveURL()
	if cmd == "" && url != "" {
		openByBrowser(url)
{'fraction_non_alphanumeric': 0.20150788211103496, 'fraction_numerical': 0.00411240575736806, 'mean_word_length': 3.589622641509434, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '1471646', 'n_tokens_mistral': 1195, 'n_tokens_neox': 1114, 'n_words': 262}