diff --git a/Gopkg.lock b/Gopkg.lock index 0281eb12..c3f4ee22 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -17,7 +17,7 @@ branch = "master" name = "github.com/mikkeloscar/aur" packages = ["."] - revision = "837b260b8e90895c45737e2e72313fe5bce6f2c4" + revision = "2980c04ca5c926b2cb7c4ac3ac8dc0b7f70d29ba" [solve-meta] analyzer-name = "dep" diff --git a/print.go b/print.go index 3f571a27..2f2f27c7 100644 --- a/print.go +++ b/print.go @@ -268,6 +268,10 @@ func printDownloads(repoName string, length int, packages string) { } func printInfoValue(str, value string) { + if value == "" { + value = "None" + } + fmt.Printf(bold("%-16s%s")+" %s\n", str, ":", value) } @@ -275,9 +279,12 @@ func printInfoValue(str, value string) { func PrintInfo(a *rpc.Pkg) { printInfoValue("Repository", "aur") printInfoValue("Name", a.Name) + printInfoValue("Keywords", strings.Join(a.Keywords, " ")) printInfoValue("Version", a.Version) printInfoValue("Description", a.Description) printInfoValue("URL", a.URL) + printInfoValue("AUR URL", baseURL+"/packages/"+a.Name) + printInfoValue("Groups", strings.Join(a.Groups, " ")) printInfoValue("Licenses", strings.Join(a.License, " ")) printInfoValue("Provides", strings.Join(a.Provides, " ")) printInfoValue("Depends On", strings.Join(a.Depends, " ")) @@ -288,12 +295,22 @@ func PrintInfo(a *rpc.Pkg) { printInfoValue("Maintainer", a.Maintainer) printInfoValue("Votes", fmt.Sprintf("%d", a.NumVotes)) printInfoValue("Popularity", fmt.Sprintf("%f", a.Popularity)) + printInfoValue("First Submitted", formatTime(a.FirstSubmitted)) + printInfoValue("Last Modified", formatTime(a.LastModified)) + if a.OutOfDate != 0 { printInfoValue("Out-of-date", "Yes ["+formatTime(a.OutOfDate)+"]") } else { printInfoValue("Out-of-date", "No") } + if cmdArgs.existsDouble("i") { + printInfoValue("ID", fmt.Sprintf("%d", a.ID)) + printInfoValue("Package Base ID", fmt.Sprintf("%d", a.PackageBaseID)) + printInfoValue("Package Base", a.PackageBase) + printInfoValue("Snapshot URL", baseURL+a.URLPath) + } + fmt.Println() } diff --git a/vendor/github.com/mikkeloscar/aur/aur.go b/vendor/github.com/mikkeloscar/aur/aur.go index 6e0a804a..778ea1e1 100644 --- a/vendor/github.com/mikkeloscar/aur/aur.go +++ b/vendor/github.com/mikkeloscar/aur/aur.go @@ -41,6 +41,7 @@ type Pkg struct { Provides []string `json:"Provides"` Replaces []string `json:"Replaces"` OptDepends []string `json:"OptDepends"` + Groups []string `json:"Groups"` License []string `json:"License"` Keywords []string `json:"Keywords"` }