aboutsummaryrefslogtreecommitdiffstats
path: root/skate/cmd
diff options
context:
space:
mode:
authorMartin Czygan <martin.czygan@gmail.com>2021-05-24 21:42:22 +0200
committerMartin Czygan <martin.czygan@gmail.com>2021-05-24 21:42:22 +0200
commit7dba9e88abe328e59da73d475b17d627cd190901 (patch)
tree360f58d77976f6752af8f1ff7b6caea6f07cf909 /skate/cmd
parent8b18e4311aceae98f730dc655c24ba72494dc9ae (diff)
downloadrefcat-7dba9e88abe328e59da73d475b17d627cd190901.tar.gz
refcat-7dba9e88abe328e59da73d475b17d627cd190901.zip
add two new mappers; OL related
Diffstat (limited to 'skate/cmd')
-rw-r--r--skate/cmd/skate-map/main.go19
1 files changed, 11 insertions, 8 deletions
diff --git a/skate/cmd/skate-map/main.go b/skate/cmd/skate-map/main.go
index 6f3acb9..132d4ab 100644
--- a/skate/cmd/skate-map/main.go
+++ b/skate/cmd/skate-map/main.go
@@ -65,14 +65,17 @@ var (
func main() {
flag.Parse()
availableMappers := map[string]skate.Mapper{
- // Add new mapper functions here. TODO: add more docs.
- "id": skate.Identity,
- "ff": skate.CreateFixedMapper(*extraValue),
- "ti": skate.MapperTitle,
- "tn": skate.MapperTitleNormalized,
- "ty": skate.MapperTitleNysiis,
- "ts": skate.MapperTitleSandcrawler,
- "ru": skate.MapperURLFromRef,
+ // Add new mapper functions here. TODO: add more docs, and improve
+ // composability, e.g. like middleware.
+ "id": skate.Identity,
+ "ff": skate.CreateFixedMapper(*extraValue),
+ "ti": skate.MapperTitle,
+ "tn": skate.MapperTitleNormalized,
+ "ty": skate.MapperTitleNysiis,
+ "ts": skate.MapperTitleSandcrawler,
+ "ru": skate.MapperURLFromRef,
+ "cti": skate.MapperContainerTitle,
+ "cts": skate.MapperContainerTitleSandcrawler,
}
if *logFile != "" {
f, err := os.OpenFile(*logFile, os.O_CREATE|os.O_APPEND, 0644)