From f9ec7d506d7648a2aa9ce0d4d9d79023e29a2b45 Mon Sep 17 00:00:00 2001 From: Martin Czygan Date: Wed, 28 Apr 2021 23:28:32 +0200 Subject: use shorter mapper names --- skate/cmd/skate-map/main.go | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/skate/cmd/skate-map/main.go b/skate/cmd/skate-map/main.go index 94cf606..5b69993 100644 --- a/skate/cmd/skate-map/main.go +++ b/skate/cmd/skate-map/main.go @@ -24,14 +24,17 @@ var ( func main() { flag.Parse() - // XXX: introduce prefixes + // TODO + // [ ] add prefixes and a way to derive multiple keys in one go + // [ ] how to store multiple keys, sorted? + // [ ] maybe wrap jq and parallel for arbitrary nested keys availableMappers := map[string]skate.Mapper{ - "id": skate.Identity, - "field": skate.WithPrefix(skate.CreateFixedMapper(*extraValue), "field"), - "title": skate.WithPrefix(skate.MapperTitle, "title"), - "tnorm": skate.WithPrefix(skate.MapperTitleNormalized, "tnorm"), - "tnysi": skate.WithPrefix(skate.MapperTitleNysiis, "tnysi"), - "tsand": skate.WithPrefix(skate.MapperTitleSandcrawler, "tsand"), + "id": skate.Identity, + "ff": skate.WithPrefix(skate.CreateFixedMapper(*extraValue), "ff"), + "ti": skate.WithPrefix(skate.MapperTitle, "ti"), + "tn": skate.WithPrefix(skate.MapperTitleNormalized, "tn"), + "ty": skate.WithPrefix(skate.MapperTitleNysiis, "ty"), + "ts": skate.WithPrefix(skate.MapperTitleSandcrawler, "ts"), } switch { case *mapperName != "": -- cgit v1.2.3