<commit_before>package main

import (
	"fmt"
	"io/ioutil"
	"os"
	"os/user"
	"path"

	"github.com/codegangsta/cli"
	"github.com/fatih/color"
)

/// chasm commands ///

func loadChasm(c *cli.Context) {
	CreateOrLoadChasmDir(chasmRoot)
}

func startChasm(c *cli.Context) {
	loadChasm(c)

	if preferences.NeedSetup() {
		color.Red("Warning: not enough services.")
		return
	}

	// start the watcher
	color.Green("Starting chasm. Listening on %s", preferences.root)
	StartWatching(preferences.root, preferences.DirMap)
}

func statusChasm(c *cli.Context) {
	loadChasm(c)

	color.Green("Cloud stores:")
	for i, cs := range preferences.AllCloudStores() {
		fmt.Println(color.GreenString("%v)", i+1), cs.Description())
	}
	if preferences.NeedSetup() {
		color.Red("Warning: not enough services.")
	}
}

func restoreChasm(c *cli.Context) {
	loadChasm(c)

	if preferences.NeedSetup() {
		color.Red("Warning: not enough services. Cannot Restore.")
		return
	}

	color.Green("Preparing to restore chasm to %s", preferences.root)
	Restore()
}

func removeChasm(c *cli.Context) {
	loadChasm(c)

	color.Green("Cloud stores:")
	for i, cs := range preferences.AllCloudStores() {
		fmt.Println(color.GreenString("%v)", i+1), cs.ShortDescription())
	}

	numStores := preferences.RegisteredServices()

	color.Blue("Enter the number of the store you would like to remove:")<commit_msg>change color to cyan lol<commit_after>package main

import (
	"fmt"
	"io/ioutil"
	"os"
	"os/user"
	"path"

	"github.com/codegangsta/cli"
	"github.com/fatih/color"
)

/// chasm commands ///

func loadChasm(c *cli.Context) {
	CreateOrLoadChasmDir(chasmRoot)
}

func startChasm(c *cli.Context) {
	loadChasm(c)

	if preferences.NeedSetup() {
		color.Red("Warning: not enough services.")
		return
	}

	// start the watcher
	color.Green("Starting chasm. Listening on %s", preferences.root)
	StartWatching(preferences.root, preferences.DirMap)
}

func statusChasm(c *cli.Context) {
	loadChasm(c)

	color.Green("Cloud stores:")
	for i, cs := range preferences.AllCloudStores() {
		fmt.Println(color.GreenString("%v)", i+1), cs.Description())
	}
	if preferences.NeedSetup() {
		color.Red("Warning: not enough services.")
	}
}

func restoreChasm(c *cli.Context) {
	loadChasm(c)

	if preferences.NeedSetup() {
		color.Red("Warning: not enough services. Cannot Restore.")
		return
	}

	color.Green("Preparing to restore chasm to %s", preferences.root)
	Restore()
}

func removeChasm(c *cli.Context) {
	loadChasm(c)

	color.Green("Cloud stores:")
	for i, cs := range preferences.AllCloudStores() {
		fmt.Println(color.GreenString("%v)", i+1), cs.ShortDescription())
	}

	numStores := preferences.RegisteredServices()

	color.Cyan("Enter the number of the store you would like to remove:")
{'fraction_non_alphanumeric': 0.15041986126323476, 'fraction_numerical': 0.0014603870025556773, 'mean_word_length': 4.580448065173116, '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': '990785', 'n_tokens_mistral': 1025, 'n_tokens_neox': 971, 'n_words': 217}