aboutsummaryrefslogtreecommitdiffstats
path: root/skate/cmd
diff options
context:
space:
mode:
authorMartin Czygan <martin.czygan@gmail.com>2021-04-28 23:28:32 +0200
committerMartin Czygan <martin.czygan@gmail.com>2021-04-28 23:28:32 +0200
commitf9ec7d506d7648a2aa9ce0d4d9d79023e29a2b45 (patch)
treea9e01aa8c1c61d2a40f27f31a75e97b7ef68d0ab /skate/cmd
parent81a6b83cb4a7d0ece97070cf45645cc2c7f11fd2 (diff)
downloadrefcat-f9ec7d506d7648a2aa9ce0d4d9d79023e29a2b45.tar.gz
refcat-f9ec7d506d7648a2aa9ce0d4d9d79023e29a2b45.zip
use shorter mapper names
Diffstat (limited to 'skate/cmd')
-rw-r--r--skate/cmd/skate-map/main.go17
1 files 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 != "":