diff options
author | Martin Czygan <martin.czygan@gmail.com> | 2021-05-27 23:23:53 +0200 |
---|---|---|
committer | Martin Czygan <martin.czygan@gmail.com> | 2021-05-27 23:23:53 +0200 |
commit | 687e6d6a46aeb01c230e2183f465ae0ec074aff7 (patch) | |
tree | db687451f7095a51c97f15178e43d65162fd18f2 /skate | |
parent | 56390b40ce4d5a7e4d0f17a935cf6a9c3d950be6 (diff) | |
download | refcat-687e6d6a46aeb01c230e2183f465ae0ec074aff7.tar.gz refcat-687e6d6a46aeb01c230e2183f465ae0ec074aff7.zip |
update notes
Diffstat (limited to 'skate')
-rw-r--r-- | skate/map.go | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/skate/map.go b/skate/map.go index 1584acd..316b8ee 100644 --- a/skate/map.go +++ b/skate/map.go @@ -197,21 +197,21 @@ func MapperTitleSandcrawler(p []byte) (fields [][]byte, err error) { return fields, nil } -// MapperContainerName extracts (container_title, doc). +// MapperContainerName extracts (container_name, doc). func MapperContainerName(p []byte) ([][]byte, error) { var ( - doc ContainerNameDoc + doc PartialDoc key []byte ) if err := json.Unmarshal(p, &doc); err != nil { return nil, err } else { - key = []byte(wsReplacer.Replace(strings.TrimSpace(doc.Biblio.ContainerName))) + key = []byte(wsReplacer.Replace(strings.TrimSpace(doc.ContainerName))) } return [][]byte{key, p}, nil } -// MapperContainerNameSandcrawler extracts (container_title, doc). +// MapperContainerNameSandcrawler extracts (container_name, doc). func MapperContainerNameSandcrawler(p []byte) (fields [][]byte, err error) { if fields, err = MapperContainerName(p); err != nil { return nil, err @@ -242,7 +242,5 @@ func MapperURLFromRef(p []byte) (fields [][]byte, err error) { // MapperPartial works on partial documents. func MapperPartial(p []byte) (fields [][]byte, err error) { - // TODO: slugify authors, how to compare two author strings? How do these - // things look like? return nil, nil } |