Compare commits
1 commit
cc4e91295e
...
0e26b65a54
Author | SHA1 | Date | |
---|---|---|---|
0e26b65a54 |
2 changed files with 13 additions and 1 deletions
|
@ -39,6 +39,7 @@ type Printer struct {
|
||||||
failureSymbol string
|
failureSymbol string
|
||||||
dateFormat string
|
dateFormat string
|
||||||
dateTimeFormat string
|
dateTimeFormat string
|
||||||
|
imageIcon string
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewPrinter(
|
func NewPrinter(
|
||||||
|
@ -62,6 +63,7 @@ func NewPrinter(
|
||||||
}
|
}
|
||||||
|
|
||||||
return &Printer{
|
return &Printer{
|
||||||
|
theme: theme,
|
||||||
noColor: noColor,
|
noColor: noColor,
|
||||||
maxTerminalWidth: maxTerminalWidth,
|
maxTerminalWidth: maxTerminalWidth,
|
||||||
pager: pager,
|
pager: pager,
|
||||||
|
@ -72,7 +74,7 @@ func NewPrinter(
|
||||||
failureSymbol: "\u2717",
|
failureSymbol: "\u2717",
|
||||||
dateFormat: "02 Jan 2006",
|
dateFormat: "02 Jan 2006",
|
||||||
dateTimeFormat: "02 Jan 2006, 15:04 (MST)",
|
dateTimeFormat: "02 Jan 2006, 15:04 (MST)",
|
||||||
theme: theme,
|
imageIcon: "\uf03e",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -79,6 +79,16 @@ func (p Printer) PrintStatusList(list model.StatusList) {
|
||||||
builder.WriteString(p.pollOptions(*status.Poll))
|
builder.WriteString(p.pollOptions(*status.Poll))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for _, media := range status.MediaAttachments {
|
||||||
|
builder.WriteString("\n\n" + p.imageIcon + " Media (" + media.ID + ")" + "\n ")
|
||||||
|
|
||||||
|
if media.Description == "" {
|
||||||
|
builder.WriteString("This media has no description.")
|
||||||
|
} else {
|
||||||
|
builder.WriteString(utilities.WrapLines(media.Description, "\n ", p.maxTerminalWidth-3))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
builder.WriteString(
|
builder.WriteString(
|
||||||
"\n\n" +
|
"\n\n" +
|
||||||
p.fieldFormat("Status ID:") + " " + statusID + "\t" +
|
p.fieldFormat("Status ID:") + " " + statusID + "\t" +
|
||||||
|
|
Loading…
Reference in a new issue