diff --git a/fdroid/index.go b/fdroid/index.go index b94a229..b654233 100644 --- a/fdroid/index.go +++ b/fdroid/index.go @@ -53,6 +53,7 @@ type App struct { FlattrID string `json:"flattrID"` SugVersName string `json:"suggestedVersionName"` SugVersCode int `json:"suggestedVersionCode,string"` + FdroidRepo string `json:"-"` Localized map[string]Localization `json:"localized"` diff --git a/show.go b/show.go index b31cb04..6cc9809 100644 --- a/show.go +++ b/show.go @@ -89,40 +89,41 @@ func findApps(ids []string) ([]fdroid.App, error) { } func printAppDetailed(app fdroid.App) { - fmt.Printf("Package : %s\n", app.PackageName) - fmt.Printf("Name : %s\n", app.Name) - fmt.Printf("Summary : %s\n", app.Summary) - fmt.Printf("Added : %s\n", app.Added.String()) - fmt.Printf("Last Updated : %s\n", app.Updated.String()) - fmt.Printf("Version : %s (%d)\n", app.SugVersName, app.SugVersCode) - fmt.Printf("License : %s\n", app.License) + fmt.Printf("Package : %s\n", app.PackageName) + fmt.Printf("Name : %s\n", app.Name) + fmt.Printf("Summary : %s\n", app.Summary) + fmt.Printf("Added : %s\n", app.Added.String()) + fmt.Printf("Last Updated : %s\n", app.Updated.String()) + fmt.Printf("Version : %s (%d)\n", app.SugVersName, app.SugVersCode) + fmt.Printf("License : %s\n", app.License) if app.Categories != nil { - fmt.Printf("Categories : %s\n", strings.Join(app.Categories, ", ")) + fmt.Printf("Categories : %s\n", strings.Join(app.Categories, ", ")) } if app.Website != "" { - fmt.Printf("Website : %s\n", app.Website) + fmt.Printf("Website : %s\n", app.Website) } if app.SourceCode != "" { - fmt.Printf("Source Code : %s\n", app.SourceCode) + fmt.Printf("Source Code : %s\n", app.SourceCode) } if app.IssueTracker != "" { - fmt.Printf("Issue Tracker : %s\n", app.IssueTracker) + fmt.Printf("Issue Tracker : %s\n", app.IssueTracker) } if app.Changelog != "" { - fmt.Printf("Changelog : %s\n", app.Changelog) + fmt.Printf("Changelog : %s\n", app.Changelog) } if app.Donate != "" { - fmt.Printf("Donate : %s\n", app.Donate) + fmt.Printf("Donate : %s\n", app.Donate) } if app.Bitcoin != "" { - fmt.Printf("Bitcoin : bitcoin:%s\n", app.Bitcoin) + fmt.Printf("Bitcoin : bitcoin:%s\n", app.Bitcoin) } if app.Litecoin != "" { - fmt.Printf("Litecoin : litecoin:%s\n", app.Litecoin) + fmt.Printf("Litecoin : litecoin:%s\n", app.Litecoin) } if app.FlattrID != "" { - fmt.Printf("Flattr : https://flattr.com/thing/%s\n", app.FlattrID) + fmt.Printf("Flattr : https://flattr.com/thing/%s\n", app.FlattrID) } + fmt.Printf("F-Droid Repository : %s\n", app.FdroidRepo) fmt.Println() fmt.Println("Description :") fmt.Println() diff --git a/update.go b/update.go index b174fe1..73ea30a 100644 --- a/update.go +++ b/update.go @@ -187,6 +187,7 @@ func loadIndexes() ([]fdroid.App, error) { } for i := range index.Apps { app := index.Apps[i] + app.FdroidRepo = r.URL orig, e := m[app.PackageName] if !e { m[app.PackageName] = &app