aboutsummaryrefslogtreecommitdiff
path: root/templates/index.md.qtpl
diff options
context:
space:
mode:
authorGabriel Arakaki Giovanini <mail@gabrielgio.me>2023-09-03 14:55:23 +0200
committerGabriel Arakaki Giovanini <mail@gabrielgio.me>2023-09-03 14:55:23 +0200
commit3b21449468a1b20b3ff706fe00a04556a804e627 (patch)
tree8054ddc0f47f5731aa89ecb65b962da75a56bdaa /templates/index.md.qtpl
parent1507d12b6398448c53bdffe18a32018a3ef627e7 (diff)
downloadapkdoc-3b21449468a1b20b3ff706fe00a04556a804e627.tar.gz
apkdoc-3b21449468a1b20b3ff706fe00a04556a804e627.tar.bz2
apkdoc-3b21449468a1b20b3ff706fe00a04556a804e627.zip
ref: Remove quicktemplate
This is done in preparation to use text-html/template. This will allow the user to input their own template file
Diffstat (limited to 'templates/index.md.qtpl')
-rw-r--r--templates/index.md.qtpl39
1 files changed, 0 insertions, 39 deletions
diff --git a/templates/index.md.qtpl b/templates/index.md.qtpl
deleted file mode 100644
index 434d640..0000000
--- a/templates/index.md.qtpl
+++ /dev/null
@@ -1,39 +0,0 @@
-{% import "fmt" %}
-{% import "strings" %}
-{% import "git.sr.ht/~gabrielgio/apkdoc/parser" %}
-
-{% code
-func reduce(lines []string) string {
- return strings.Join(lines, " ")
-}
-
-func formatLink(e *parser.Entry, format string) string {
- c := strings.Replace(*e.Commit, "-dirty", "", -1)
- return fmt.Sprintf(format, c, *e.Origin)
-}
-%}
-
-{% func MarkdownTemplate(entries []*parser.Entry, format string) %}
-# Apks Alpine 3.18
-{% for _, e := range entries %}
-## {%s e.Name %}
-
-- **Version**: {%s e.Version%}
-- **Description**: {%s e.Description%}{% if e.Maintainer != nil %}
-- **Maintainer**: {%s *e.Maintainer%}{% endif %}
-- **Checksum**:{%s e.Checksum%}{% if e.Architecture != nil %}
-- **Architecture**: {%s *e.Architecture%}{% endif %}
-- **Size**: {%d e.PackageSize%}B
-- **Installed size**: {%d e.InstalledSize%}
-- **Url**: {%s e.Url%}
-- **License**: {%s e.License%}{% if e.Origin != nil %}
-- **Origin**: {%s *e.Origin%}{% endif %}{% if e.BuildTime != nil %}
-- **Build time**: {%s e.BuildTime.String() %}{% endif %}{% if e.Commit != nil %}
-- **Commit**: [{%s *e.Commit %}]({%s formatLink(e, format) %}){% endif %}{% if e.ProviderPriority != nil %}
-- **Provider Priority**: {%d *e.ProviderPriority %}{% endif %}{% if len(e.Dependencies) > 0 %}
-- **Dependencies:**: {%s reduce(e.Dependencies) %}{% endif %}{% if len(e.Provides) > 0 %}
-- **Provides:**: {%s reduce(e.Provides) %}{% endif %}{% if len(e.InstallIf) > 0 %}
-- **Install if:**: {%s reduce(e.InstallIf) %}{% endif %}
-{% endfor %}
-
-{% endfunc %}