apkdoc @ 33727db8bee991115906d3408145d5e0806a2455

 1{% import "git.sr.ht/~gabrielgio/apkdoc/parser" %}
 2{% import "strings" %}
 3
 4{% code 
 5func reduce(lines []string) string {
 6    return strings.Join(lines, " ")
 7}
 8%}
 9
10{% func MarkdownTemplate(entries []*parser.Entry) %}
11# Apks Alpine 3.18
12{% for _, e := range entries %}
13## {%s e.Name %}
14
15**Version**: {%s e.Version%}
16**Description**: {%s e.Description%}
17{% if e.Maintainer != nil %}**Maintainer**: {%s *e.Maintainer%}{% endif %}
18**Checksum**:{%s e.Checksum%}
19{% if e.Architecture != nil %}**Architecture**: {%s *e.Architecture%}{% endif %}
20**Size**: {%d e.PackageSize%}B
21**Installed size**: {%d e.InstalledSize%}
22**Url**: {%s e.Url%}
23**License**: {%s e.License%}
24{% if e.Origin != nil %}**Origin**: {%s *e.Origin%}{% endif %}
25{% if e.BuildTime != nil %}**Build time**: {%s e.BuildTime.String() %}{% endif %}
26{% if e.Commit != nil %}**Commit**: {%s *e.Commit %}{% endif %}
27{% if e.ProviderPriority != nil %}**Provider Priority**: {%d *e.ProviderPriority %}{% endif %}
28{% if len(e.Dependencies) > 0 %}**Dependencies:**: {%s reduce(e.Dependencies) %}{% endif %}
29{% if len(e.Provides) > 0 %}**Provides:**: {%s reduce(e.Provides) %}{% endif %}
30{% if len(e.InstallIf) > 0 %}**Install if:**: {%s reduce(e.InstallIf) %}{% endif %}
31{% endfor %}
32
33{% endfunc %}