--- a/printer/plain.go Mon May 01 12:33:55 2017 +0000
+++ b/printer/plain.go Mon May 01 20:46:14 2017 +0200
@@ -278,6 +278,18 @@
indentedPrint(w, indent, false, false, "Reblogged", "%v", s.Reblogged)
}
indentedPrint(w, indent, false, false, "URL", "%s", s.URL)
+ // Display minimum details of attachments
+ //return p.PrintObj(s.MediaAttachments, w, indent+p.Indent)
+ for _, a := range s.MediaAttachments {
+ indentedPrint(w, indent+p.Indent, true, false, "Attachment ID", "%d", a.ID)
+ if a.TextURL != "" {
+ indentedPrint(w, indent+p.Indent, true, false, "Text URL", "%s", a.TextURL)
+ } else if a.URL != "" {
+ indentedPrint(w, indent+p.Indent, false, false, "URL", "%s", a.URL)
+ } else {
+ indentedPrint(w, indent+p.Indent, false, false, "Remote URL", "%s", a.RemoteURL)
+ }
+ }
return nil
}