<commit_before>// 22 august 2012
package main

import (
	"fmt"
	"net/http"
	"time"
)

var top = `<html>
<head>
	<title>Sega Retro Scan Information: %s</title>
	<style type="text/css">
	.Bad {
		background-color: #888800;
	}
	.Missing {
		background-color: #880000;
	}
	.Incomplete {
		background-color: #888800;
	}
	.Good {
		background-color: #008800;
	}
	.Error {
		background-color: #000000;
		text-color: #FFFFFF;
	}
	</style>
</head>
<body>
	<h1>Sega Retro Scan Information: %s</h1>
	<table>
		<tr>
			<th colspan=2>Game</th>
			<th>Box</th>
			<th>Cart/Disc</th>
		</tr>
`

var gameEntry = `
		<tr>
			<td>%s</td>
			<td>%s</td>
			<td class=%v>%v</td>
			<td class=%v>%v</td>
		</tr>
`

var gameError = `
		<tr>
			<td colspan=2>%s</td>
			<td colspan=2 class=Error>Error: %v</td>
		</tr>
`

var bottom = `
	</table>
	<p>Page generated in %v.</p>
</body>
</html>
`

func getConsoleInfo(w http.ResponseWriter, r *http.Request) {
	console := r.URL.Path[1:]
	if console == "" {
		fmt.Fprintln(w, "Server up. Specify the console in the URL.")
		return
	}
	startTime := time.Now()
	games, err := GetGameList(console)
	if err != nil {
		fmt.Fprintf(w, "Error getting %s game list: %v\n", console, err)<commit_msg>Fixed Error style to show text in white properly.<commit_after>// 22 august 2012
package main

import (
	"fmt"
	"net/http"
	"time"
)

var top = `<html>
<head>
	<title>Sega Retro Scan Information: %s</title>
	<style type="text/css">
	.Bad {
		background-color: #888800;
	}
	.Missing {
		background-color: #880000;
	}
	.Incomplete {
		background-color: #888800;
	}
	.Good {
		background-color: #008800;
	}
	.Error {
		background-color: #000000;
		color: #FFFFFF;
	}
	</style>
</head>
<body>
	<h1>Sega Retro Scan Information: %s</h1>
	<table>
		<tr>
			<th colspan=2>Game</th>
			<th>Box</th>
			<th>Cart/Disc</th>
		</tr>
`

var gameEntry = `
		<tr>
			<td>%s</td>
			<td>%s</td>
			<td class=%v>%v</td>
			<td class=%v>%v</td>
		</tr>
`

var gameError = `
		<tr>
			<td>%s</td>
			<td colspan=3 class=Error>Error: %v</td>
		</tr>
`

var bottom = `
	</table>
	<p>Page generated in %v.</p>
</body>
</html>
`

func getConsoleInfo(w http.ResponseWriter, r *http.Request) {
	console := r.URL.Path[1:]
	if console == "" {
		fmt.Fprintln(w, "Server up. Specify the console in the URL.")
		return
	}
	startTime := time.Now()
	games, err := GetGameList(console)
	if err != nil {
		fmt.Fprintf(w, "Error getting %s game list: %v\n", console, err)
{'fraction_non_alphanumeric': 0.19885667619436503, 'fraction_numerical': 0.03389138423846468, 'mean_word_length': 3.2241379310344827, 'pattern_counts': {'":': 0, '<': 83, '<?xml version=': 0, '>': 83, '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': '3880157', 'n_tokens_mistral': 1185, 'n_tokens_neox': 1066, 'n_words': 242}