Skip to content

Commit

Permalink
Merge pull request #115 from metafates/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
metafates authored Oct 25, 2022
2 parents 3d23a34 + ce65baf commit 7b7c9fb
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com), and this project adheres to
[Semantic Versioning](https://semver.org).

## 3.14.2

- Do not put an invalid value for dates #114
- Set `metadata.series_json` to `true` by default.
See `mangal config info -k metadata.series_json` for more info

## 3.14.1

- Mark flags as required for `inline anilist` commands
Expand Down
2 changes: 1 addition & 1 deletion config/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ It will also cache the results to not spam the API`,
},
{
constant.MetadataSeriesJSON,
false,
true,
`Generate series.json file for each manga`,
},
{
Expand Down
2 changes: 1 addition & 1 deletion constant/meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ package constant

const (
Mangal = "mangal"
Version = "3.14.1"
Version = "3.14.2"
UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36"
)
9 changes: 5 additions & 4 deletions source/chapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,11 @@ func (c *Chapter) ComicInfoXML() *bytes.Buffer {
<PageCount>{{ len .Pages }}</PageCount>
<Summary>{{ escape .Manga.Metadata.Summary }}</Summary>
<Count>{{ len .Manga.Chapters }}</Count>
<Writer>{{ .Manga.Metadata.Author }}</Writer>
<Writer>{{ escape .Manga.Metadata.Author }}</Writer>
<Characters>{{ join .Manga.Metadata.Characters "," }}</Characters>
<Year>{{ .Manga.Metadata.StartDate.Year }}</Year>
<Month>{{ .Manga.Metadata.StartDate.Month }}</Month>
<Day>{{ .Manga.Metadata.StartDate.Day }}</Day>
{{ if geq .Manga.Metadata.StartDate.Year 1 }}<Year>{{ .Manga.Metadata.StartDate.Year }}</Year>{{ end }}
{{ if geq .Manga.Metadata.StartDate.Month 1 }}<Month>{{ .Manga.Metadata.StartDate.Month }}</Month>{{ end }}
{{ if geq .Manga.Metadata.StartDate.Day 1 }}<Day>{{ .Manga.Metadata.StartDate.Day }}</Day>{{ end }}
<Tags>{{ join .Manga.Metadata.Tags "," }}</Tags>
<Notes>Downloaded with Mangal. https://github.com/metafates/mangal</Notes>
<Manga>YesAndRightToLeft</Manga>
Expand All @@ -171,6 +171,7 @@ func (c *Chapter) ComicInfoXML() *bytes.Buffer {
funcs := template.FuncMap{
"join": strings.Join,
"escape": html.EscapeString,
"geq": func(a, b int) bool { return a >= b },
}

parsed := lo.Must(template.New("ComicInfo").Funcs(funcs).Parse(t))
Expand Down

0 comments on commit 7b7c9fb

Please sign in to comment.