diff --git a/wrp.go b/wrp.go
index d89788f..a7bcfc2 100644
--- a/wrp.go
+++ b/wrp.go
@@ -52,6 +52,7 @@ type geom struct {
c int64
}
+// WRP Request
type wrpReq struct {
U string // url
W int64 // width
@@ -67,6 +68,7 @@ type wrpReq struct {
r *http.Request
}
+// Parse HTML Form, Process Input Boxes, Etc.
func (w *wrpReq) parseForm() {
w.r.ParseForm()
w.U = w.r.FormValue("url")
@@ -96,6 +98,8 @@ func (w *wrpReq) parseForm() {
log.Printf("%s WrpReq from Form: %+v\n", w.r.RemoteAddr, w)
}
+// Display WP UI
+// TODO: make this in to an external template
func (w wrpReq) printPage(bgcolor string) {
var s string
w.o.Header().Set("Cache-Control", "max-age=0")
@@ -141,12 +145,14 @@ func (w wrpReq) printPage(bgcolor string) {
fmt.Fprintf(w.o, "
\n")
}
+// Status bar below captured image
func (w wrpReq) printFooter(h string, s string) {
fmt.Fprintf(w.o, "\n
"+ "Web Rendering Proxy Version %s | Shutdown WRP | "+ "Page Height: %s | Img Size: %s