Skip to content
The scan tracker used by Sega Retro; might be useful to you too
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
etc
COPYING
README
config.go
frontpage.go
getconsoles.go
getscans.go
getscanstate.go
issues
main.go
newsbcode.zip
pagehead.go
report.go
run.go
specials.go
sql.go
stats.go

README

http://andlabs.sonicretro.org/scans/
documentation needs to be made
CONTRIBUTING: post on the forum or file an issue here

TODO this is where I mark points where I still have hard-coded configuration
- filter form method (still says /scans)
- http.ListenAndServe call (still has 127.0.0.1:6060)
- http.Handler() uses /scans - trying to use http.StripPrefix to fix this fails miserably...

MORE TODO
- change error handling so that stack traces and other things are printed to standard error
- return HTTP 404 on category not found, not 500 (should de-confuse w3af)

kwikidata schema


CREATE SCHEMA `sega_scandata`;

CREATE TABLE `sega_scandata`.`Scanbox` (
  `__key` int NOT NULL AUTO_INCREMENT,
  `_page` varchar(255) COLLATE utf8_bin NOT NULL,
  `_timestamp` int NOT NULL,
  `console` varchar(255),
  `region` varchar(255),
  `cover` varchar(255),
  `front` varchar(255),
  `back` varchar(255),
  `spine` varchar(255),
  `spinemissing` varchar(255),
  `square` varchar(255),
  `spinecard` varchar(255),
  `cart` varchar(255),
  `disc` varchar(255),
  `disk` varchar(255),
  `manual` varchar(255),
  `jewelcase` varchar(255),
  `jewelcasefront` varchar(255),
  `jewelcaseback` varchar(255),
  `jewelcasespine` varchar(255),
  `jewelcasespinemissing` varchar(255),
  `item1` varchar(255),
  `item2` varchar(255),
  `item3` varchar(255),
  `item4` varchar(255),
  `item5` varchar(255),
  `item6` varchar(255),
  `item7` varchar(255),
  `item8` varchar(255),
  `item1name` varchar(255),
  `item2name` varchar(255),
  `item3name` varchar(255),
  `item4name` varchar(255),
  `item5name` varchar(255),
  `item6name` varchar(255),
  `item7name` varchar(255),
  `item8name` varchar(255),
  `spine2` varchar(255),
  `top` varchar(255),
  `bottom` varchar(255),
  `topbottomwidth` varchar(255),
  `topmarginleft` varchar(255),
  `bottommarginleft` varchar(255),
  PRIMARY KEY (`__key`),
  INDEX (`_page`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `sega_scandata`.`NoScans` (
  `__key` int NOT NULL AUTO_INCREMENT,
  `_page` varchar(255) COLLATE utf8_bin NOT NULL,
  `_timestamp` int NOT NULL,
  `console` varchar(255),
  PRIMARY KEY (`__key`),
  INDEX (`_page`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

thanks to Metal_Man88 for help




Kradorex suggested I use CSS progressbars
<!--
good percent: 26.016597510373447
bad percent:  61.28630705394191
inc percent:   0.4564315352697096
-->
<div class="pbar">
<span class="pbar_good"
    style="width: 26.016597510373447%;"></span><span class="pbar_inc"
    style="width: 0.4564315352697096%;"></span><span class="pbar_bad"
    style="width: 61.28630705394191%;"></span>
</div>
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATAAAAAYCAIAAADyETZLAAAAeklEQVR4nOzVsQ2AMBAEQYQoyf1X4KIQEiExv8FM4vQDr+48gAxBQsj1vnv0ih/tNX0BfXugh7Wer2khIUSQECJICBEkhAgSQgQJIYKEEEFCiCAhRJAQIkgIESSECBJCBAkhgoQQQUKIICFEkBAiSAD4YiEh5A4AAP//HDUEMc9CwsYAAAAASUVORK5C">

body {
  font-family: Ubuntu, sans-serif;
  padding: 100px;
  font-size: 13px;
}

div.pbar {
//  min-width: 300px;
  width: 300px;
  height: 20px;
  border: 2px solid black;
  background-color: #CCCCCC;
  // ...
}

span.pbar_good {
  display: inline-block;
  height: 100%;
  background-color: #00CC00;
}

span.pbar_inc {
  display: inline-block;
  height: 100%;
  background-color: #CCCC00;
}

span.pbar_bad {
  display: inline-block;
  height: 100%;
  background-color: #CC0000;
}

http://cssdesk.com/AUBBt
top is CSS, bottom is the image generated by the server now

loosely based on http://css-tricks.com/css3-progress-bars/
You can’t perform that action at this time.