# HG changeset patch # User Mikael Berthe # Date 1508605931 -7200 # Node ID 0d651f0703195cc658659315a17c61c56f7d0095 # Parent 611c211534d0d4760146fdcb0a1fe895dcafdea1 Update types to reflect Mastodon 2.0.0 API changes This patch requires madon v2.0.0(-dev). (Fixes issue #9) diff -r 611c211534d0 -r 0d651f070319 printer/plainprinter.go --- a/printer/plainprinter.go Sat Oct 21 19:06:26 2017 +0200 +++ b/printer/plainprinter.go Sat Oct 21 19:12:11 2017 +0200 @@ -295,8 +295,8 @@ } indentedPrint(w, indent, false, false, "Contents", "%s", html2string(s.Content)) - if s.InReplyToID > 0 { - indentedPrint(w, indent, false, false, "In-Reply-To", "%d", s.InReplyToID) + if s.InReplyToID != nil && *s.InReplyToID > 0 { + indentedPrint(w, indent, false, false, "In-Reply-To", "%d", *s.InReplyToID) } if s.Reblogged { indentedPrint(w, indent, false, false, "Reblogged", "%v", s.Reblogged) diff -r 611c211534d0 -r 0d651f070319 templates/ansi-account.tmpl --- a/templates/ansi-account.tmpl Sat Oct 21 19:06:26 2017 +0200 +++ b/templates/ansi-account.tmpl Sat Oct 21 19:12:11 2017 +0200 @@ -1,12 +1,1 @@ -- Account ID: {{color "red"}}{{printf "%.0f" .id}}{{color "reset"}} {{color "magenta"}}@{{.username}}{{color "reset"}} - UID: {{color "red"}}{{.acct}}{{color "reset"}} - Display name: {{color "white,,bold"}}{{.display_name}}{{color "reset"}} - Date: {{.created_at | tolocal}} - URL: {{color "cyan"}}{{.url}}{{color "reset"}} - Statuses: {{.statuses_count}} - Followers: {{.followers_count}} - Following: {{.following_count}} -{{- with .note}}{{if ne . "

"}} - Note: {{color "yellow"}}{{. | fromhtml | wrap " " 79 | trim}}{{color "reset"}}{{end}}{{end}} -{{- if eq .locked true}} - Locked: true{{end}} +themes/ansi/account.tmpl \ No newline at end of file diff -r 611c211534d0 -r 0d651f070319 templates/ansi-notification.tmpl --- a/templates/ansi-notification.tmpl Sat Oct 21 19:06:26 2017 +0200 +++ b/templates/ansi-notification.tmpl Sat Oct 21 19:12:11 2017 +0200 @@ -1,38 +1,1 @@ -- Notification ID: {{color "red"}}{{printf "%.0f" .id}}{{color "reset"}} - Type: {{color ",,bold"}}{{.type}}{{color "reset"}} - Timestamp: {{.created_at | tolocal}} -{{- with .url}} - URL: {{.url}}{{end}} -{{- with .account}} - - Account: ({{printf "%.0f" .id}}) {{color "magenta"}}@{{.acct}}{{color "reset"}}{{if .display_name}} - {{color "white,,bold"}}{{.display_name}}{{color "reset"}}{{end}}{{end}} -{{- with .status}} - - Status ID: {{color "red"}}{{printf "%.0f" .id}}{{color "reset"}} {{color "magenta"}}@{{.account.acct}}{{color "reset"}} - Name: {{color ",,bold"}}{{.account.display_name}}{{color "reset"}} - Visibility: {{.visibility}} - Date: {{.created_at | tolocal}} - URL: {{.url}} -{{- if .reblog }}{{with .reblog}} - {{color ",,bold"}}Reblogged from: {{color "magenta"}}@{{.account.acct}}{{color "reset"}} - ID: {{printf "%.0f" .id}} - Name: {{color ",,bold"}}{{.account.display_name}}{{color "reset"}} - Date: {{.created_at | tolocal}} -{{- if gt .in_reply_to_id 0.0}} - Replying to: {{printf "%.0f" .in_reply_to_id}}{{end}} -{{- if .sensitive}} - Sensitive: true{{end}} -{{- with .spoiler_text}} - Spoiler: {{.}}{{end}} - Message: {{color "blue"}}{{.content | fromhtml | wrap " " 79 | trim}}{{color "reset"}}{{end}}{{else}} -{{- if gt .in_reply_to_id 0.0}} - Replying to: {{printf "%.0f" .in_reply_to_id}}{{end}} -{{- if .sensitive}} - Sensitive: true{{end}} -{{- with .spoiler_text}} - Spoiler: {{.}}{{end}} - Message: {{color "blue"}}{{.content | fromhtml | wrap " " 79 | trim}}{{color "reset"}} -{{- range .media_attachments}} - - Attachment ID: {{printf "%.0f" .id}} -{{- if .text_url}} - Text URL: {{.text_url}}{{else if .url}} - URL: {{.url}}{{else if .remote_url}} - Remote URL: {{.remote_url}}{{end}}{{end}}{{end}}{{end}} +themes/ansi/notification.tmpl \ No newline at end of file diff -r 611c211534d0 -r 0d651f070319 templates/ansi-status.tmpl --- a/templates/ansi-status.tmpl Sat Oct 21 19:06:26 2017 +0200 +++ b/templates/ansi-status.tmpl Sat Oct 21 19:12:11 2017 +0200 @@ -1,38 +1,1 @@ -- Status ID: {{color "red"}}{{printf "%.0f" .id}}{{color "reset"}} {{color "magenta"}}@{{.account.acct}}{{color "reset"}} - Name: {{color ",,bold"}}{{.account.display_name}}{{color "reset"}} - Visibility: {{.visibility}} - Date: {{.created_at | tolocal}} - URL: {{.url}} -{{- if .reblog }}{{with .reblog}} - {{color ",,bold"}}Reblogged from: {{color "magenta"}}@{{.account.acct}}{{color "reset"}} - ID: {{printf "%.0f" .id}} - Name: {{color ",,bold"}}{{.account.display_name}}{{color "reset"}} - Date: {{.created_at | tolocal}} -{{- if gt .in_reply_to_id 0.0}} - Replying to: {{printf "%.0f" .in_reply_to_id}}{{end}} -{{- if .sensitive}} - Sensitive: true{{end}} -{{- with .spoiler_text}} - Spoiler: {{.}}{{end}} - Message: {{color "blue"}}{{.content | fromhtml | wrap " " 79 | trim}}{{color "reset"}} -{{- range .media_attachments}} - - Attachment ID: {{printf "%.0f" .id}} -{{- if .text_url}} - Text URL: {{.text_url}}{{else if .url}} - URL: {{.url}}{{else if .remote_url}} - Remote URL: {{.remote_url}}{{end}}{{end}} -{{end}}{{else}} -{{- if gt .in_reply_to_id 0.0}} - Replying to: {{printf "%.0f" .in_reply_to_id}}{{end}} -{{- if .sensitive}} - Sensitive: true{{end}} -{{- with .spoiler_text}} - Spoiler: {{.}}{{end}} - Message: {{color "blue"}}{{.content | fromhtml | wrap " " 79 | trim}}{{color "reset"}} -{{- range .media_attachments}} - - Attachment ID: {{printf "%.0f" .id}} -{{- if .text_url}} - Text URL: {{.text_url}}{{else if .url}} - URL: {{.url}}{{else if .remote_url}} - Remote URL: {{.remote_url}}{{end}}{{end}} -{{end -}} +themes/ansi/status.tmpl \ No newline at end of file diff -r 611c211534d0 -r 0d651f070319 templates/themes/ansi-dark/account.tmpl --- a/templates/themes/ansi-dark/account.tmpl Sat Oct 21 19:06:26 2017 +0200 +++ b/templates/themes/ansi-dark/account.tmpl Sat Oct 21 19:12:11 2017 +0200 @@ -1,4 +1,4 @@ -- Account ID: {{color "red"}}{{printf "%.0f" .id}}{{color "reset"}} {{color "magenta"}}@{{.username}}{{color "reset"}} +- Account ID: {{color "red"}}{{.id}}{{color "reset"}} {{color "magenta"}}@{{.username}}{{color "reset"}} UID: {{color "red"}}{{.acct}}{{color "reset"}} Display name: {{color "white,,bold"}}{{.display_name}}{{color "reset"}} Date: {{.created_at | tolocal}} diff -r 611c211534d0 -r 0d651f070319 templates/themes/ansi-dark/context.tmpl --- a/templates/themes/ansi-dark/context.tmpl Sat Oct 21 19:06:26 2017 +0200 +++ b/templates/themes/ansi-dark/context.tmpl Sat Oct 21 19:12:11 2017 +0200 @@ -1,7 +1,7 @@ - Context: Ancestors: {{- range .ancestors}} - - Status ID: {{color "red"}}{{printf "%.0f" .id}}{{color "reset"}} {{color "magenta"}}@{{.account.acct}}{{color "reset"}} + - Status ID: {{color "red"}}{{.id}}{{color "reset"}} {{color "magenta"}}@{{.account.acct}}{{color "reset"}} Name: {{color ",,bold"}}{{.account.display_name}}{{color "reset"}} Date: {{.created_at}} URL: {{.url}} @@ -11,14 +11,14 @@ Spoiler: {{.}}{{end}} Message: {{color "blue"}}{{.content | fromhtml | wrap " " 80 | trim}}{{color "reset"}} {{- range .media_attachments}} - - Attachment ID: {{printf "%.0f" .id}} + - Attachment ID: {{.id}} {{- if .text_url}} Text URL: {{.text_url}}{{else if .url}} URL: {{.url}}{{else if .remote_url}} Remote URL: {{.remote_url}}{{end}}{{end}}{{end}} Descendants: {{- range .descendants}} - - Status ID: {{color "red"}}{{printf "%.0f" .id}}{{color "reset"}} {{color "magenta"}}@{{.account.acct}}{{color "reset"}} + - Status ID: {{color "red"}}{{.id}}{{color "reset"}} {{color "magenta"}}@{{.account.acct}}{{color "reset"}} Name: {{color ",,bold"}}{{.account.display_name}}{{color "reset"}} Date: {{.created_at}} URL: {{.url}} @@ -28,7 +28,7 @@ Spoiler: {{.}}{{end}} Message: {{color "blue"}}{{.content | fromhtml | wrap " " 80 | trim}}{{color "reset"}} {{- range .media_attachments}} - - Attachment ID: {{printf "%.0f" .id}} + - Attachment ID: {{.id}} {{- if .text_url}} Text URL: {{.text_url}}{{else if .url}} URL: {{.url}}{{else if .remote_url}} diff -r 611c211534d0 -r 0d651f070319 templates/themes/ansi-dark/notification.tmpl --- a/templates/themes/ansi-dark/notification.tmpl Sat Oct 21 19:06:26 2017 +0200 +++ b/templates/themes/ansi-dark/notification.tmpl Sat Oct 21 19:12:11 2017 +0200 @@ -1,37 +1,37 @@ -- Notification ID: {{color "red"}}{{printf "%.0f" .id}}{{color "reset"}} +- Notification ID: {{color "red"}}{{.id}}{{color "reset"}} Type: {{color ",,bold"}}{{.type}}{{color "reset"}} Timestamp: {{.created_at | tolocal}} {{- with .url}} URL: {{.url}}{{end}} {{- with .account}} - - Account: ({{printf "%.0f" .id}}) {{color "magenta"}}@{{.acct}}{{color "reset"}}{{if .display_name}} - {{color "white,,bold"}}{{.display_name}}{{color "reset"}}{{end}}{{end}} + - Account: ({{.id}}) {{color "magenta"}}@{{.acct}}{{color "reset"}}{{if .display_name}} - {{color "white,,bold"}}{{.display_name}}{{color "reset"}}{{end}}{{end}} {{- with .status}} - - Status ID: {{color "red"}}{{printf "%.0f" .id}}{{color "reset"}} {{color "magenta"}}@{{.account.acct}}{{color "reset"}} + - Status ID: {{color "red"}}{{.id}}{{color "reset"}} {{color "magenta"}}@{{.account.acct}}{{color "reset"}} Name: {{color ",,bold"}}{{.account.display_name}}{{color "reset"}} Visibility: {{.visibility}} Date: {{.created_at | tolocal}} URL: {{.url}} {{- if .reblog }}{{with .reblog}} {{color ",,bold"}}Reblogged from: {{color "magenta"}}@{{.account.acct}}{{color "reset"}} - ID: {{printf "%.0f" .id}} + ID: {{.id}} Name: {{color ",,bold"}}{{.account.display_name}}{{color "reset"}} Date: {{.created_at | tolocal}} -{{- if gt .in_reply_to_id 0.0}} - Replying to: {{printf "%.0f" .in_reply_to_id}}{{end}} +{{- if .in_reply_to_id}} + Replying to: {{.in_reply_to_id}}{{end}} {{- if .sensitive}} Sensitive: true{{end}} {{- with .spoiler_text}} Spoiler: {{.}}{{end}} Message: {{color "green"}}{{.content | fromhtml | wrap " " 79 | trim}}{{color "reset"}}{{end}}{{else}} -{{- if gt .in_reply_to_id 0.0}} - Replying to: {{printf "%.0f" .in_reply_to_id}}{{end}} +{{- if .in_reply_to_id}} + Replying to: {{.in_reply_to_id}}{{end}} {{- if .sensitive}} Sensitive: true{{end}} {{- with .spoiler_text}} Spoiler: {{.}}{{end}} Message: {{color "green"}}{{.content | fromhtml | wrap " " 79 | trim}}{{color "reset"}} {{- range .media_attachments}} - - Attachment ID: {{printf "%.0f" .id}} + - Attachment ID: {{.id}} {{- if .text_url}} Text URL: {{.text_url}}{{else if .url}} URL: {{.url}}{{else if .remote_url}} diff -r 611c211534d0 -r 0d651f070319 templates/themes/ansi-dark/relationship.tmpl --- a/templates/themes/ansi-dark/relationship.tmpl Sat Oct 21 19:06:26 2017 +0200 +++ b/templates/themes/ansi-dark/relationship.tmpl Sat Oct 21 19:12:11 2017 +0200 @@ -1,4 +1,4 @@ -- Account ID: {{color "red"}}{{printf "%.0f" .id}}{{color "reset"}} +- Account ID: {{color "red"}}{{.id}}{{color "reset"}} Following: {{.following}} Followed-by: {{.followed_by}} Blocking: {{.blocking}} diff -r 611c211534d0 -r 0d651f070319 templates/themes/ansi-dark/report.tmpl --- a/templates/themes/ansi-dark/report.tmpl Sat Oct 21 19:06:26 2017 +0200 +++ b/templates/themes/ansi-dark/report.tmpl Sat Oct 21 19:12:11 2017 +0200 @@ -1,2 +1,2 @@ -- Report ID: {{color "red"}}{{printf "%.0f" .id}}{{color "reset"}} +- Report ID: {{color "red"}}{{.id}}{{color "reset"}} Action taken: {{.action_taken}} diff -r 611c211534d0 -r 0d651f070319 templates/themes/ansi-dark/results.tmpl --- a/templates/themes/ansi-dark/results.tmpl Sat Oct 21 19:06:26 2017 +0200 +++ b/templates/themes/ansi-dark/results.tmpl Sat Oct 21 19:12:11 2017 +0200 @@ -1,7 +1,7 @@ {{with .accounts}} {{- color ",,bold"}}Accounts:{{color "reset"}} {{- range .}} - - Account ID: {{color "red"}}{{printf "%.0f" .id}}{{color "reset"}} {{color "magenta"}}@{{.username}}{{color "reset"}} + - Account ID: {{color "red"}}{{.id}}{{color "reset"}} {{color "magenta"}}@{{.username}}{{color "reset"}} UID: {{color "red"}}{{.acct}}{{color "reset"}} Display name: {{color "white,,bold"}}{{.display_name}}{{color "reset"}} Date: {{.created_at}} @@ -16,7 +16,7 @@ {{end}}{{/* of accounts */}} {{- with .statuses}}{{color ",,bold"}}Statuses:{{color "reset"}} {{- range .}} - - Status ID: {{color "red"}}{{printf "%.0f" .id}}{{color "reset"}} {{color "magenta"}}@{{.account.acct}}{{color "reset"}} + - Status ID: {{color "red"}}{{.id}}{{color "reset"}} {{color "magenta"}}@{{.account.acct}}{{color "reset"}} Name: {{color ",,bold"}}{{.account.display_name}}{{color "reset"}} Date: {{.created_at}} URL: {{.url}} @@ -26,7 +26,7 @@ Spoiler: {{.}}{{end}} Message: {{color "blue"}}{{.content | fromhtml | wrap " " 80 | trim}}{{color "reset"}} {{- range .media_attachments}} - - Attachment ID: {{printf "%.0f" .id}} + - Attachment ID: {{.id}} {{- if .text_url}} Text URL: {{.text_url}}{{else if .url}} URL: {{.url}}{{else if .remote_url}} diff -r 611c211534d0 -r 0d651f070319 templates/themes/ansi-dark/status.tmpl --- a/templates/themes/ansi-dark/status.tmpl Sat Oct 21 19:06:26 2017 +0200 +++ b/templates/themes/ansi-dark/status.tmpl Sat Oct 21 19:12:11 2017 +0200 @@ -1,36 +1,36 @@ -- Status ID: {{color "red"}}{{printf "%.0f" .id}}{{color "reset"}} {{color "magenta"}}@{{.account.acct}}{{color "reset"}} +- Status ID: {{color "red"}}{{.id}}{{color "reset"}} {{color "magenta"}}@{{.account.acct}}{{color "reset"}} Name: {{color ",,bold"}}{{.account.display_name}}{{color "reset"}} Visibility: {{.visibility}} Date: {{.created_at | tolocal}} URL: {{.url}} {{- if .reblog }}{{with .reblog}} {{color ",,bold"}}Reblogged from: {{color "magenta"}}@{{.account.acct}}{{color "reset"}} - ID: {{printf "%.0f" .id}} + ID: {{.id}} Name: {{color ",,bold"}}{{.account.display_name}}{{color "reset"}} Date: {{.created_at | tolocal}} -{{- if gt .in_reply_to_id 0.0}} - Replying to: {{printf "%.0f" .in_reply_to_id}}{{end}} +{{- if .in_reply_to_id}} + Replying to: {{.in_reply_to_id}}{{end}} {{- if .sensitive}} Sensitive: true{{end}} {{- with .spoiler_text}} Spoiler: {{.}}{{end}} Message: {{color "green"}}{{.content | fromhtml | wrap " " 79 | trim}}{{color "reset"}} {{- range .media_attachments}} - - Attachment ID: {{printf "%.0f" .id}} + - Attachment ID: {{.id}} {{- if .text_url}} Text URL: {{.text_url}}{{else if .url}} URL: {{.url}}{{else if .remote_url}} Remote URL: {{.remote_url}}{{end}}{{end}} {{end}}{{else}} -{{- if gt .in_reply_to_id 0.0}} - Replying to: {{printf "%.0f" .in_reply_to_id}}{{end}} +{{- if .in_reply_to_id}} + Replying to: {{.in_reply_to_id}}{{end}} {{- if .sensitive}} Sensitive: true{{end}} {{- with .spoiler_text}} Spoiler: {{.}}{{end}} Message: {{color "green"}}{{.content | fromhtml | wrap " " 79 | trim}}{{color "reset"}} {{- range .media_attachments}} - - Attachment ID: {{printf "%.0f" .id}} + - Attachment ID: {{.id}} {{- if .text_url}} Text URL: {{.text_url}}{{else if .url}} URL: {{.url}}{{else if .remote_url}} diff -r 611c211534d0 -r 0d651f070319 templates/themes/ansi/account.tmpl --- a/templates/themes/ansi/account.tmpl Sat Oct 21 19:06:26 2017 +0200 +++ b/templates/themes/ansi/account.tmpl Sat Oct 21 19:12:11 2017 +0200 @@ -1,4 +1,4 @@ -- Account ID: {{color "red"}}{{printf "%.0f" .id}}{{color "reset"}} {{color "magenta"}}@{{.username}}{{color "reset"}} +- Account ID: {{color "red"}}{{.id}}{{color "reset"}} {{color "magenta"}}@{{.username}}{{color "reset"}} UID: {{color "red"}}{{.acct}}{{color "reset"}} Display name: {{color "white,,bold"}}{{.display_name}}{{color "reset"}} Date: {{.created_at | tolocal}} diff -r 611c211534d0 -r 0d651f070319 templates/themes/ansi/context.tmpl --- a/templates/themes/ansi/context.tmpl Sat Oct 21 19:06:26 2017 +0200 +++ b/templates/themes/ansi/context.tmpl Sat Oct 21 19:12:11 2017 +0200 @@ -1,7 +1,7 @@ - Context: Ancestors: {{- range .ancestors}} - - Status ID: {{color "red"}}{{printf "%.0f" .id}}{{color "reset"}} {{color "magenta"}}@{{.account.acct}}{{color "reset"}} + - Status ID: {{color "red"}}{{.id}}{{color "reset"}} {{color "magenta"}}@{{.account.acct}}{{color "reset"}} Name: {{color ",,bold"}}{{.account.display_name}}{{color "reset"}} Date: {{.created_at}} URL: {{.url}} @@ -11,14 +11,14 @@ Spoiler: {{.}}{{end}} Message: {{color "blue"}}{{.content | fromhtml | wrap " " 80 | trim}}{{color "reset"}} {{- range .media_attachments}} - - Attachment ID: {{printf "%.0f" .id}} + - Attachment ID: {{.id}} {{- if .text_url}} Text URL: {{.text_url}}{{else if .url}} URL: {{.url}}{{else if .remote_url}} Remote URL: {{.remote_url}}{{end}}{{end}}{{end}} Descendants: {{- range .descendants}} - - Status ID: {{color "red"}}{{printf "%.0f" .id}}{{color "reset"}} {{color "magenta"}}@{{.account.acct}}{{color "reset"}} + - Status ID: {{color "red"}}{{.id}}{{color "reset"}} {{color "magenta"}}@{{.account.acct}}{{color "reset"}} Name: {{color ",,bold"}}{{.account.display_name}}{{color "reset"}} Date: {{.created_at}} URL: {{.url}} @@ -28,7 +28,7 @@ Spoiler: {{.}}{{end}} Message: {{color "blue"}}{{.content | fromhtml | wrap " " 80 | trim}}{{color "reset"}} {{- range .media_attachments}} - - Attachment ID: {{printf "%.0f" .id}} + - Attachment ID: {{.id}} {{- if .text_url}} Text URL: {{.text_url}}{{else if .url}} URL: {{.url}}{{else if .remote_url}} diff -r 611c211534d0 -r 0d651f070319 templates/themes/ansi/notification.tmpl --- a/templates/themes/ansi/notification.tmpl Sat Oct 21 19:06:26 2017 +0200 +++ b/templates/themes/ansi/notification.tmpl Sat Oct 21 19:12:11 2017 +0200 @@ -1,37 +1,37 @@ -- Notification ID: {{color "red"}}{{printf "%.0f" .id}}{{color "reset"}} +- Notification ID: {{color "red"}}{{.id}}{{color "reset"}} Type: {{color ",,bold"}}{{.type}}{{color "reset"}} Timestamp: {{.created_at | tolocal}} {{- with .url}} URL: {{.url}}{{end}} {{- with .account}} - - Account: ({{printf "%.0f" .id}}) {{color "magenta"}}@{{.acct}}{{color "reset"}}{{if .display_name}} - {{color "white,,bold"}}{{.display_name}}{{color "reset"}}{{end}}{{end}} + - Account: ({{.id}}) {{color "magenta"}}@{{.acct}}{{color "reset"}}{{if .display_name}} - {{color "white,,bold"}}{{.display_name}}{{color "reset"}}{{end}}{{end}} {{- with .status}} - - Status ID: {{color "red"}}{{printf "%.0f" .id}}{{color "reset"}} {{color "magenta"}}@{{.account.acct}}{{color "reset"}} + - Status ID: {{color "red"}}{{.id}}{{color "reset"}} {{color "magenta"}}@{{.account.acct}}{{color "reset"}} Name: {{color ",,bold"}}{{.account.display_name}}{{color "reset"}} Visibility: {{.visibility}} Date: {{.created_at | tolocal}} URL: {{.url}} {{- if .reblog }}{{with .reblog}} {{color ",,bold"}}Reblogged from: {{color "magenta"}}@{{.account.acct}}{{color "reset"}} - ID: {{printf "%.0f" .id}} + ID: {{.id}} Name: {{color ",,bold"}}{{.account.display_name}}{{color "reset"}} Date: {{.created_at | tolocal}} -{{- if gt .in_reply_to_id 0.0}} - Replying to: {{printf "%.0f" .in_reply_to_id}}{{end}} +{{- if .in_reply_to_id}} + Replying to: {{.in_reply_to_id}}{{end}} {{- if .sensitive}} Sensitive: true{{end}} {{- with .spoiler_text}} Spoiler: {{.}}{{end}} Message: {{color "blue"}}{{.content | fromhtml | wrap " " 79 | trim}}{{color "reset"}}{{end}}{{else}} -{{- if gt .in_reply_to_id 0.0}} - Replying to: {{printf "%.0f" .in_reply_to_id}}{{end}} +{{- if .in_reply_to_id}} + Replying to: {{.in_reply_to_id}}{{end}} {{- if .sensitive}} Sensitive: true{{end}} {{- with .spoiler_text}} Spoiler: {{.}}{{end}} Message: {{color "blue"}}{{.content | fromhtml | wrap " " 79 | trim}}{{color "reset"}} {{- range .media_attachments}} - - Attachment ID: {{printf "%.0f" .id}} + - Attachment ID: {{.id}} {{- if .text_url}} Text URL: {{.text_url}}{{else if .url}} URL: {{.url}}{{else if .remote_url}} diff -r 611c211534d0 -r 0d651f070319 templates/themes/ansi/relationship.tmpl --- a/templates/themes/ansi/relationship.tmpl Sat Oct 21 19:06:26 2017 +0200 +++ b/templates/themes/ansi/relationship.tmpl Sat Oct 21 19:12:11 2017 +0200 @@ -1,4 +1,4 @@ -- Account ID: {{color "red"}}{{printf "%.0f" .id}}{{color "reset"}} +- Account ID: {{color "red"}}{{.id}}{{color "reset"}} Following: {{.following}} Followed-by: {{.followed_by}} Blocking: {{.blocking}} diff -r 611c211534d0 -r 0d651f070319 templates/themes/ansi/report.tmpl --- a/templates/themes/ansi/report.tmpl Sat Oct 21 19:06:26 2017 +0200 +++ b/templates/themes/ansi/report.tmpl Sat Oct 21 19:12:11 2017 +0200 @@ -1,2 +1,2 @@ -- Report ID: {{color "red"}}{{printf "%.0f" .id}}{{color "reset"}} +- Report ID: {{color "red"}}{{.id}}{{color "reset"}} Action taken: {{.action_taken}} diff -r 611c211534d0 -r 0d651f070319 templates/themes/ansi/results.tmpl --- a/templates/themes/ansi/results.tmpl Sat Oct 21 19:06:26 2017 +0200 +++ b/templates/themes/ansi/results.tmpl Sat Oct 21 19:12:11 2017 +0200 @@ -1,7 +1,7 @@ {{with .accounts}} {{- color ",,bold"}}Accounts:{{color "reset"}} {{- range .}} - - Account ID: {{color "red"}}{{printf "%.0f" .id}}{{color "reset"}} {{color "magenta"}}@{{.username}}{{color "reset"}} + - Account ID: {{color "red"}}{{.id}}{{color "reset"}} {{color "magenta"}}@{{.username}}{{color "reset"}} UID: {{color "red"}}{{.acct}}{{color "reset"}} Display name: {{color "white,,bold"}}{{.display_name}}{{color "reset"}} Date: {{.created_at}} @@ -16,7 +16,7 @@ {{end}}{{/* of accounts */}} {{- with .statuses}}{{color ",,bold"}}Statuses:{{color "reset"}} {{- range .}} - - Status ID: {{color "red"}}{{printf "%.0f" .id}}{{color "reset"}} {{color "magenta"}}@{{.account.acct}}{{color "reset"}} + - Status ID: {{color "red"}}{{.id}}{{color "reset"}} {{color "magenta"}}@{{.account.acct}}{{color "reset"}} Name: {{color ",,bold"}}{{.account.display_name}}{{color "reset"}} Date: {{.created_at}} URL: {{.url}} @@ -26,7 +26,7 @@ Spoiler: {{.}}{{end}} Message: {{color "blue"}}{{.content | fromhtml | wrap " " 80 | trim}}{{color "reset"}} {{- range .media_attachments}} - - Attachment ID: {{printf "%.0f" .id}} + - Attachment ID: {{.id}} {{- if .text_url}} Text URL: {{.text_url}}{{else if .url}} URL: {{.url}}{{else if .remote_url}} diff -r 611c211534d0 -r 0d651f070319 templates/themes/ansi/status.tmpl --- a/templates/themes/ansi/status.tmpl Sat Oct 21 19:06:26 2017 +0200 +++ b/templates/themes/ansi/status.tmpl Sat Oct 21 19:12:11 2017 +0200 @@ -1,36 +1,36 @@ -- Status ID: {{color "red"}}{{printf "%.0f" .id}}{{color "reset"}} {{color "magenta"}}@{{.account.acct}}{{color "reset"}} +- Status ID: {{color "red"}}{{.id}}{{color "reset"}} {{color "magenta"}}@{{.account.acct}}{{color "reset"}} Name: {{color ",,bold"}}{{.account.display_name}}{{color "reset"}} Visibility: {{.visibility}} Date: {{.created_at | tolocal}} URL: {{.url}} {{- if .reblog }}{{with .reblog}} {{color ",,bold"}}Reblogged from: {{color "magenta"}}@{{.account.acct}}{{color "reset"}} - ID: {{printf "%.0f" .id}} + ID: {{.id}} Name: {{color ",,bold"}}{{.account.display_name}}{{color "reset"}} Date: {{.created_at | tolocal}} -{{- if gt .in_reply_to_id 0.0}} - Replying to: {{printf "%.0f" .in_reply_to_id}}{{end}} +{{- if .in_reply_to_id}} + Replying to: {{.in_reply_to_id}}{{end}} {{- if .sensitive}} Sensitive: true{{end}} {{- with .spoiler_text}} Spoiler: {{.}}{{end}} Message: {{color "blue"}}{{.content | fromhtml | wrap " " 79 | trim}}{{color "reset"}} {{- range .media_attachments}} - - Attachment ID: {{printf "%.0f" .id}} + - Attachment ID: {{.id}} {{- if .text_url}} Text URL: {{.text_url}}{{else if .url}} URL: {{.url}}{{else if .remote_url}} Remote URL: {{.remote_url}}{{end}}{{end}} {{end}}{{else}} -{{- if gt .in_reply_to_id 0.0}} - Replying to: {{printf "%.0f" .in_reply_to_id}}{{end}} +{{- if .in_reply_to_id}} + Replying to: {{.in_reply_to_id}}{{end}} {{- if .sensitive}} Sensitive: true{{end}} {{- with .spoiler_text}} Spoiler: {{.}}{{end}} Message: {{color "blue"}}{{.content | fromhtml | wrap " " 79 | trim}}{{color "reset"}} {{- range .media_attachments}} - - Attachment ID: {{printf "%.0f" .id}} + - Attachment ID: {{.id}} {{- if .text_url}} Text URL: {{.text_url}}{{else if .url}} URL: {{.url}}{{else if .remote_url}}