From 2b67719462a8135fa0fded9580393579a2dd5b07 Mon Sep 17 00:00:00 2001 From: Marcell Mars Date: Sat, 7 May 2022 16:40:53 +0200 Subject: [PATCH] path and mimetype are now comprehensible to handle --- cmd/build.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/build.go b/cmd/build.go index bf13960..c0771e9 100644 --- a/cmd/build.go +++ b/cmd/build.go @@ -23,7 +23,7 @@ type ZoteroItem struct { XMLName xml.Name `xml:"zoteroItem"` Attachments struct { Attachment []struct { - Text string `xml:",chardata"` + Path string `xml:",chardata"` MimeType string `xml:"mimeType,attr"` } `xml:"attachment"` } `xml:"attachments"` @@ -211,6 +211,9 @@ should be enough for the next successful build).`, log.Fatalln(err) } + for _, a := range zoteroItem.Attachments.Attachment { + fmt.Println(a.Path, a.MimeType) + } zi, _ := xml.MarshalIndent(zoteroItem, " ", " ") _ = zi // os.Stdout.Write(zi)