A shepherd for your Appimages.
0

Configure Feed

Select the types of activity you want to include in your feed.

move ToSource from config -> source

Aly Raffauf (Jun 19, 2026, 3:49 AM EDT) 5a304cf1 96bdba96

+26 -25
-25
internal/appherder/config.go
··· 27 27 URL string `toml:"url"` 28 28 } 29 29 30 - func (sc SourceConfig) ToSource() (Source, error) { 31 - switch sc.Type { 32 - case "github": 33 - return githubReleaseSource{ 34 - owner: sc.Owner, 35 - repo: sc.Repo, 36 - tag: sc.Tag, 37 - pattern: sc.Pattern, 38 - }, nil 39 - case "gitlab": 40 - return gitlabReleaseSource{ 41 - host: sc.Host, 42 - project: sc.Project, 43 - tag: sc.Tag, 44 - pattern: sc.Pattern, 45 - }, nil 46 - case "zsync": 47 - return zsyncURLSource{url: sc.URL}, nil 48 - case "static": 49 - return staticURLSource{url: sc.URL}, nil 50 - default: 51 - return nil, fmt.Errorf("unknown source type %q (expected github, gitlab, zsync, or static)", sc.Type) 52 - } 53 - } 54 - 55 30 func configPath() string { 56 31 return filepath.Join(xdg.ConfigHome, "appherder", "config.toml") 57 32 }
+26
internal/appherder/source.go
··· 82 82 Kind() string 83 83 } 84 84 85 + // ToSource constructs a Source from a config entry. 86 + func (sc SourceConfig) ToSource() (Source, error) { 87 + switch sc.Type { 88 + case "github": 89 + return githubReleaseSource{ 90 + owner: sc.Owner, 91 + repo: sc.Repo, 92 + tag: sc.Tag, 93 + pattern: sc.Pattern, 94 + }, nil 95 + case "gitlab": 96 + return gitlabReleaseSource{ 97 + host: sc.Host, 98 + project: sc.Project, 99 + tag: sc.Tag, 100 + pattern: sc.Pattern, 101 + }, nil 102 + case "zsync": 103 + return zsyncURLSource{url: sc.URL}, nil 104 + case "static": 105 + return staticURLSource{url: sc.URL}, nil 106 + default: 107 + return nil, fmt.Errorf("unknown source type %q (expected github, gitlab, zsync, or static)", sc.Type) 108 + } 109 + } 110 + 85 111 // ReadUpdateInfo returns the AppImage's embedded update-information string from 86 112 // its .upd_info ELF section, or "" when absent or empty. 87 113 func ReadUpdateInfo(path string) (string, error) {