From 6a97f945c72e3d7b6f34b906d9ae84f97dab5762 Mon Sep 17 00:00:00 2001 From: Gabriel Arakaki Giovanini Date: Mon, 28 Aug 2023 13:12:45 +0200 Subject: ref: Update markdown template --- templates/index.md.qtpl | 32 ++++++++--------- templates/index.md.qtpl.go | 86 ++++++++++++++++++---------------------------- 2 files changed, 50 insertions(+), 68 deletions(-) (limited to 'templates') diff --git a/templates/index.md.qtpl b/templates/index.md.qtpl index 879795a..80439c9 100644 --- a/templates/index.md.qtpl +++ b/templates/index.md.qtpl @@ -12,22 +12,22 @@ func reduce(lines []string) string { {% 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 %}{% 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 %} +- **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 %}{% 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 %} diff --git a/templates/index.md.qtpl.go b/templates/index.md.qtpl.go index af3d34a..9229465 100644 --- a/templates/index.md.qtpl.go +++ b/templates/index.md.qtpl.go @@ -44,134 +44,116 @@ func StreamMarkdownTemplate(qw422016 *qt422016.Writer, entries []*parser.Entry) //line index.md.qtpl:13 qw422016.N().S(` -**Version**: `) +- **Version**: `) //line index.md.qtpl:15 qw422016.E().S(e.Version) //line index.md.qtpl:15 qw422016.N().S(` -**Description**: `) +- **Description**: `) //line index.md.qtpl:16 qw422016.E().S(e.Description) //line index.md.qtpl:16 - qw422016.N().S(` -`) -//line index.md.qtpl:17 if e.Maintainer != nil { -//line index.md.qtpl:17 - qw422016.N().S(`**Maintainer**: `) +//line index.md.qtpl:16 + qw422016.N().S(` +- **Maintainer**: `) //line index.md.qtpl:17 qw422016.E().S(*e.Maintainer) //line index.md.qtpl:17 } //line index.md.qtpl:17 qw422016.N().S(` -**Checksum**:`) +- **Checksum**:`) //line index.md.qtpl:18 qw422016.E().S(e.Checksum) //line index.md.qtpl:18 - qw422016.N().S(` -`) -//line index.md.qtpl:19 if e.Architecture != nil { -//line index.md.qtpl:19 - qw422016.N().S(`**Architecture**: `) +//line index.md.qtpl:18 + qw422016.N().S(` +- **Architecture**: `) //line index.md.qtpl:19 qw422016.E().S(*e.Architecture) //line index.md.qtpl:19 } //line index.md.qtpl:19 qw422016.N().S(` -**Size**: `) +- **Size**: `) //line index.md.qtpl:20 qw422016.N().D(e.PackageSize) //line index.md.qtpl:20 qw422016.N().S(`B -**Installed size**: `) +- **Installed size**: `) //line index.md.qtpl:21 qw422016.N().D(e.InstalledSize) //line index.md.qtpl:21 qw422016.N().S(` -**Url**: `) +- **Url**: `) //line index.md.qtpl:22 qw422016.E().S(e.Url) //line index.md.qtpl:22 qw422016.N().S(` -**License**: `) +- **License**: `) //line index.md.qtpl:23 qw422016.E().S(e.License) //line index.md.qtpl:23 - qw422016.N().S(` -`) -//line index.md.qtpl:24 if e.Origin != nil { -//line index.md.qtpl:24 - qw422016.N().S(`**Origin**: `) +//line index.md.qtpl:23 + qw422016.N().S(` +- **Origin**: `) //line index.md.qtpl:24 qw422016.E().S(*e.Origin) //line index.md.qtpl:24 } //line index.md.qtpl:24 - qw422016.N().S(` -`) -//line index.md.qtpl:25 if e.BuildTime != nil { -//line index.md.qtpl:25 - qw422016.N().S(`**Build time**: `) +//line index.md.qtpl:24 + qw422016.N().S(` +- **Build time**: `) //line index.md.qtpl:25 qw422016.E().S(e.BuildTime.String()) //line index.md.qtpl:25 } //line index.md.qtpl:25 - qw422016.N().S(` -`) -//line index.md.qtpl:26 if e.Commit != nil { -//line index.md.qtpl:26 - qw422016.N().S(`**Commit**: `) +//line index.md.qtpl:25 + qw422016.N().S(` +- **Commit**: `) //line index.md.qtpl:26 qw422016.E().S(*e.Commit) //line index.md.qtpl:26 } //line index.md.qtpl:26 - qw422016.N().S(` -`) -//line index.md.qtpl:27 if e.ProviderPriority != nil { -//line index.md.qtpl:27 - qw422016.N().S(`**Provider Priority**: `) +//line index.md.qtpl:26 + qw422016.N().S(` +- **Provider Priority**: `) //line index.md.qtpl:27 qw422016.N().D(*e.ProviderPriority) //line index.md.qtpl:27 } //line index.md.qtpl:27 - qw422016.N().S(` -`) -//line index.md.qtpl:28 if len(e.Dependencies) > 0 { -//line index.md.qtpl:28 - qw422016.N().S(`**Dependencies:**: `) +//line index.md.qtpl:27 + qw422016.N().S(` +- **Dependencies:**: `) //line index.md.qtpl:28 qw422016.E().S(reduce(e.Dependencies)) //line index.md.qtpl:28 } //line index.md.qtpl:28 - qw422016.N().S(` -`) -//line index.md.qtpl:29 if len(e.Provides) > 0 { -//line index.md.qtpl:29 - qw422016.N().S(`**Provides:**: `) +//line index.md.qtpl:28 + qw422016.N().S(` +- **Provides:**: `) //line index.md.qtpl:29 qw422016.E().S(reduce(e.Provides)) //line index.md.qtpl:29 } //line index.md.qtpl:29 - qw422016.N().S(` -`) -//line index.md.qtpl:30 if len(e.InstallIf) > 0 { -//line index.md.qtpl:30 - qw422016.N().S(`**Install if:**: `) +//line index.md.qtpl:29 + qw422016.N().S(` +- **Install if:**: `) //line index.md.qtpl:30 qw422016.E().S(reduce(e.InstallIf)) //line index.md.qtpl:30 -- cgit v1.2.3