<commit_before>package settings

import (
	"flag"
	"strings"
)

// Customize settings by passing proper parameters. See ./upendo -h for details.
var (
	// can be set to change application starting directory
	StartDir string

	// determines on which port upendo will run
	ServicePort string

	// if set to yes all templates will be reloaded on each request
	ReloadTemplates bool

	// should sessions be stored in file when terminating upendo
	ArchiveSessions bool

	// should sessions be restored from file when launching upendo
	RestoreSessions bool

	// limits chain of routing calls to specified value
	RoutingChainMax int
)

func init() {
	flag.StringVar(&StartDir, "start-dir", "", "app start directory, defaults to \".\"")
	flag.StringVar(&ServicePort, "port", "8080", "port for service to listen on")
	flag.BoolVar(&ReloadTemplates, "reload-templates", false, "if \"true\" then on each request page templates are reloaded")
	flag.BoolVar(&ArchiveSessions, "archive-sessions", true, "if \"true\" upon closing active sessions are archived to file")
	flag.BoolVar(&RestoreSessions, "restore-sessions", true, "if \"true\" restores previously active sessions")
	flag.IntVar(&RoutingChainMax, "routing-chain-max", 4, "limits maximum routing calls to specified value")
	flag.Parse()
	if len(StartDir) > 0 && strings.HasSuffix(StartDir, "/") == false {
		StartDir = StartDir + "/"
	}
}<commit_msg>'map' files are now ignored by default<commit_after>package settings

import (
	"flag"
	"strings"
)

// Customize settings by passing proper parameters. See ./upendo -h for details.
var (
	// can be set to change application starting directory
	StartDir string

	// determines on which port upendo will run
	ServicePort string

	// if set to yes all templates will be reloaded on each request
	ReloadTemplates bool

	// should sessions be stored in file when terminating upendo
	ArchiveSessions bool

	// should sessions be restored from file when launching upendo
	RestoreSessions bool

	// limits chain of routing calls to specified value
	RoutingChainMax int

	// if map files are ignored (js.map, css.map)
	IgnoreMapFiles bool
)

func init() {
	flag.StringVar(&StartDir, "start-dir", "", "app start directory, defaults to \".\"")
	flag.StringVar(&ServicePort, "port", "8080", "port for service to listen on")
	flag.BoolVar(&ReloadTemplates, "reload-templates", false, "if \"true\" then on each request page templates are reloaded")
	flag.BoolVar(&ArchiveSessions, "archive-sessions", true, "if \"true\" upon closing active sessions are archived to file")
	flag.BoolVar(&RestoreSessions, "restore-sessions", true, "if \"true\" restores previously active sessions")
	flag.BoolVar(&IgnoreMapFiles, "ignore-map-files", true, "if \"true\" \"file not found\" errors for .map files will be ignored")
	flag.IntVar(&RoutingChainMax, "routing-chain-max", 4, "limits maximum routing calls to specified value")
	flag.Parse()
	if len(StartDir) > 0 && strings.HasSuffix(StartDir, "/") == false {
		StartDir = StartDir + "/"
	}
}
{'fraction_non_alphanumeric': 0.11118486558247594, 'fraction_numerical': 0.003982741453700631, 'mean_word_length': 4.44043321299639, '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': '2601375', 'n_tokens_mistral': 891, 'n_tokens_neox': 860, 'n_words': 336}