mirror of
https://github.com/Jguer/yay
synced 2024-10-31 04:12:51 +00:00
Merge pull request #582 from Morganamilo/aururl
Add extra fields to -Si[i]
This commit is contained in:
commit
f567abe386
3 changed files with 19 additions and 1 deletions
2
Gopkg.lock
generated
2
Gopkg.lock
generated
|
@ -17,7 +17,7 @@
|
|||
branch = "master"
|
||||
name = "github.com/mikkeloscar/aur"
|
||||
packages = ["."]
|
||||
revision = "837b260b8e90895c45737e2e72313fe5bce6f2c4"
|
||||
revision = "2980c04ca5c926b2cb7c4ac3ac8dc0b7f70d29ba"
|
||||
|
||||
[solve-meta]
|
||||
analyzer-name = "dep"
|
||||
|
|
17
print.go
17
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()
|
||||
}
|
||||
|
||||
|
|
1
vendor/github.com/mikkeloscar/aur/aur.go
generated
vendored
1
vendor/github.com/mikkeloscar/aur/aur.go
generated
vendored
|
@ -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"`
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue