mirror of https://github.com/muesli/mastotool
Add time and URL to search output (#6)
This commit is contained in:
parent
8adb027f55
commit
f92cefd853
|
@ -5,6 +5,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"math"
|
"math"
|
||||||
"strings"
|
"strings"
|
||||||
|
"time"
|
||||||
|
|
||||||
mastodon "github.com/mattn/go-mastodon"
|
mastodon "github.com/mattn/go-mastodon"
|
||||||
"github.com/muesli/goprogressbar"
|
"github.com/muesli/goprogressbar"
|
||||||
|
@ -49,6 +50,8 @@ func search(token string) error {
|
||||||
for _, s := range statuses {
|
for _, s := range statuses {
|
||||||
if strings.Contains(strings.ToLower(cleanupContent(s.Content)), token) {
|
if strings.Contains(strings.ToLower(cleanupContent(s.Content)), token) {
|
||||||
fmt.Println("\nFound toot:", cleanupContent(s.Content))
|
fmt.Println("\nFound toot:", cleanupContent(s.Content))
|
||||||
|
fmt.Println("Date:", s.CreatedAt.Format(time.RFC822))
|
||||||
|
fmt.Println("URL:", s.URL)
|
||||||
fmt.Println()
|
fmt.Println()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue