Store the ISBN
This commit is contained in:
parent
d994d6b91f
commit
64375b6de5
4 changed files with 10 additions and 0 deletions
7
store.go
7
store.go
|
@ -39,6 +39,13 @@ func ParseFile(path string) (string, error) {
|
|||
book["lang"] = data
|
||||
case "title", "contributor", "publisher":
|
||||
book[m] = cleanStr(strings.Join(data, ", "))
|
||||
case "identifier":
|
||||
attr, _ := e.MetadataAttr(m)
|
||||
for i, d := range data {
|
||||
if attr[i]["scheme"] == "ISBN" {
|
||||
book["isbn"] = d
|
||||
}
|
||||
}
|
||||
default:
|
||||
book[m] = strings.Join(data, ", ")
|
||||
}
|
||||
|
|
Reference in a new issue