Documentation ¶
Index ¶
- Constants
- Variables
- func BuildAnimatedGif(filenames []string, delay time.Duration, converter ImageConverter, ...) (failures int)
- func Crop(img image.Image, margins []int) image.Image
- func DieIf(err error, args ...interface{})
- func EveryNSeconds(key string, n uint, fn func())
- func Fetch(grabbers_url string, spool string)
- func FetchEveryNSeconds(n uint, grabbers_url string, spool string)
- func Get(t Target, spool string) (filename string, status int, err error)
- func ReadCsvLinesWithN(r *csv.Reader, n int) ([][]string, error)
- func ReadImage(filename string) image.Image
- func StartWeb(bind string, spool string)
- func ThinStrings(a []string) []string
- func WriteJpegImage(img image.Image, filename string)
- type CropMargins
- type ImageConverter
- type OriginalDim
- type Products
- type SubImager
- type Survey
- func (o *Survey) Build1Giffy(inputs []string, tmpgif, gifname, meanname string) (ok bool)
- func (o *Survey) BuildMovies(prefix string)
- func (o *Survey) CollectGarbage()
- func (o *Survey) ConvertToModest(img image.Image, filename string) image.Image
- func (o *Survey) DumpProducts(w io.Writer)
- func (o *Survey) SortedWebTags() []string
- func (o *Survey) SortedWebTagsForDay(daysAgo int) []string
- func (o *Survey) Walk()
- func (o *Survey) WalkFunc(filename string, info os.FileInfo, err error) error
- func (o *Survey) WriteWebPageForDay(w io.Writer, daysAgo int)
- type SurveyRec
- type TagDaySurvey
- type TagSurvey
- type Target
Constants ¶
View Source
const BUFSIZ = 128 << 10 // For reading and writing images to/from files.
View Source
const GC_GRACE_HOURS = 2
View Source
const HEI = 500
View Source
const MAX_GIF = 200 // Problems with Out Of Memory.
View Source
const NS = 5 // How many to stack
View Source
const TS_FORMAT = "2006-01-02-150405"
View Source
const VerboseCrop = true
View Source
const WHOM = "W6REK"
View Source
const WID = 800
A modest size for video frames.
Variables ¶
View Source
var Crops = map[OriginalDim]CropMargins{ MakeOriginalDim(1152, 702): []int{0, 80, 0, 80}, MakeOriginalDim(1000, 696): []int{12, 96, 88, 40}, MakeOriginalDim(1235, 686): []int{3, 130, 5, 5}, MakeOriginalDim(1226, 721): []int{4, 172, 4, 4}, MakeOriginalDim(1187, 812): []int{3, 262, 3, 3}, }
Map original (width, height) to (left, right, top, bottom) margins. So far, each different type of image has a different size. We will use that, as long as it works.
View Source
var ETag = make(map[string]string)
View Source
var GREEN = image.NewUniform(color.NRGBA{20, 200, 20, 255})
View Source
var JpegOpts = &jpeg.Options{Quality: *QUALITY}
View Source
var LastModified = make(map[string]string)
Map URL to Date String
View Source
var QUALITY = flag.Int("quality", 90, "Jpeg output quality, typically 90 to 95.")
View Source
var Targets = []Target{
{"w4hbk", "http://www.qsl.net/w4hbk/hf1.jpg", ""},
{"w4hbk_8h", "http://www.qsl.net/w4hbk/hf2.jpg", ""},
{"wa5djj_40", "http://qsl.net/wa5djj/hf2.jpg", ""},
{"wa5djj_30", "http://qsl.net/wa5djj/hf3.jpg", ""},
{"wa5djj_20", "http://qsl.net/wa5djj/hf4.jpg", ""},
{"wa5djj_80", "http://qsl.net/wa5djj/mf3.jpg", ""},
{"wa5djj_17", "http://qsl.net/wa5djj/hf5.jpg", ""},
{"wa5djj_15", "http://qsl.net/wa5djj/hf6.jpg", ""},
{"wa5djj_12", "http://qsl.net/wa5djj/hf7.jpg", ""},
{"wa5djj_10", "http://qsl.net/wa5djj/hf8.jpg", ""},
{"wd4elg_20", "https://dl.dropboxusercontent.com/s/gba72cz0au66032/WD4ELG%2020M%20grabber%20%28REFRESH%20for%20latest%20grab%29.jpg", ""},
{"wd4elg_30", "https://dl.dropboxusercontent.com/s/7djby65cbfh6hv7/WD4ELG%2030M%20grabber%20%28REFRESH%20for%20latest%20grab%29.jpg", ""},
{"wd4elg_40", "https://dl.dropboxusercontent.com/s/ajhc4t640k7k67u/WD4ELG%2040M%20grabber%20%28REFRESH%20for%20latest%20grab%29.jpg", ""},
{"wd4elg_80", "https://dl.dropboxusercontent.com/s/59ktcp48iie5i1m/WD4ELG%2080M%20grabber%20%28REFRESH%20for%20latest%20grab%29.jpg", ""},
{"ve1vdm", "http://users.eastlink.ca/~ve1vdm/argocaptures/argo.jpg", ""},
{"zl2ik", "http://zl2ik.com/Argo.jpg", ""},
{"kl7l", "http://kl7l.com/Alaska00000.jpg", ""},
{"tg6ajr", "http://qsl.net/tg9ajr/argo/mf1.gif", ""},
{"g3vyz_1", "http://www.holywell44.com/qrss/qrss_.jpg", ""},
{"g3vyz_2", "http://www.holywell44.com/qrss/qrss_2.jpg", ""},
{"g3vyz_3", "http://www.holywell44.com/qrss/qrss_3.jpg", ""},
{"g3vyz_4", "http://www.holywell44.com/qrss/qrss_4.jpg", ""},
{"g3vyz_5", "http://www.holywell44.com/qrss/qrss_5.jpg", ""},
{"ea8bvp", "http://www.qsl.net/ea8bvp/hf1.jpg", ""},
{"ea8bvp_4h", "http://www.qsl.net/ea8bvp/hf2.jpg", ""},
{"la5goa", "http://la5goa.manglet.net/grabber/lopshot1.jpg", ""},
{"n2nxz", "http://www.qsl.net/n2nxz/hf1.jpg", ""},
{"wd4ah", "http://www.qsl.net/wd4ah/hf1.jpg", ""},
{"ok1fcx", "http://qsl.net/ok1fcx/hf1.jpg", ""},
{"aa7us", "http://www.qsl.net/aa7us/hf3.jpg", ""},
}
View Source
var YELLOW = image.NewUniform(color.NRGBA{200, 200, 20, 255})
Functions ¶
func BuildAnimatedGif ¶
func EveryNSeconds ¶
func FetchEveryNSeconds ¶
func WriteJpegImage ¶
Types ¶
type CropMargins ¶
type CropMargins []int
type OriginalDim ¶
type OriginalDim int // encodes (width<<16 + height)
func MakeOriginalDim ¶
func MakeOriginalDim(width, height int) OriginalDim
type Survey ¶
type Survey struct { Spool string TagDayHash map[string]*TagSurvey SeenOther map[string]bool // Seen for mark-and-sweep UsedOther map[string]bool // Marked for mark-and-sweep }
For all tags on all days, this is everything.
func (*Survey) Build1Giffy ¶
func (*Survey) BuildMovies ¶
func (*Survey) CollectGarbage ¶
func (o *Survey) CollectGarbage()
func (*Survey) ConvertToModest ¶
func (*Survey) DumpProducts ¶
func (*Survey) SortedWebTags ¶
func (*Survey) SortedWebTagsForDay ¶
func (*Survey) Walk ¶
func (o *Survey) Walk()
Survey uses simple shell scripts, so don't have Spaces or Newlines or Exploits or web-user-provided data in the file paths.
type SurveyRec ¶
type SurveyRec struct { Filename string Filesize int64 Tag string TimeString string ShapeString string Time time.Time Width int Height int }
func ParseFilenameForPrimary ¶
Originals filenames always end in `.jpg` (regardless of their image type).
Click to show internal directories.
Click to hide internal directories.