Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/fmartingr/go-comicinfo

Golang implementation of the ComicInfo spec to write and read comicinfo.xml files.
https://github.com/fmartingr/go-comicinfo

cbz comicinfo

Last synced: 2 months ago
JSON representation

Golang implementation of the ComicInfo spec to write and read comicinfo.xml files.

Awesome Lists containing this project

README

        

# go-comicinfo

[![Go Reference](https://pkg.go.dev/badge/github.com/fmartingr/go-comicinfo/v2.svg)](https://pkg.go.dev/github.com/fmartingr/go-comicinfo/v2)
[![Go Report Card](https://goreportcard.com/badge/github.com/fmartingr/go-comicinfo/v2)](https://goreportcard.com/report/github.com/fmartingr/go-comicinfo/v2)
[![codecov](https://codecov.io/gh/fmartingr/go-comicinfo/graph/badge.svg?token=5C7SHMAETL)](https://codecov.io/gh/fmartingr/go-comicinfo)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

Golang implementation of the [ComicInfo.xml specification](https://anansi-project.github.io/docs/category/comicinfo) to read and write `comicinfo.xml` files.

## Contributing

Contributions are welcome, please open an issue or a pull request.

## Versioning

This project uses [Semantic Versioning](https://semver.org/) and will follow the major and minor versions of the [ComicInfo.xml specification](https://anansi-project.github.io/docs/category/comicinfo), while using the hotfix version for any changes to the library itself.

## Usage example

```go
package main

import "github.com/fmartingr/go-comicinfo/v2"

func main() {
ci := comicinfo.NewComicInfo()
ci.Series = "One Piece"
ci.Number = "3093"
ci.Summary = "Luffy and the Straw Hat Pirates return in an all-new Epic Voyage!"
ci.AgeRating = comicinfo.AgeRatingEveryone
ci.LanguageISO = "en"

for i := 1; i <= 17; i++ {
ci.Pages.Pages = append(ci.Pages.Pages, comicinfo.ComicPageInfo{
Image: i,
})
}

_ = comicinfo.Write(ci, "volume/comicinfo.xml")
}
```

Result

```xml

One Piece
3093
Luffy and the Straw Hat Pirates return in an all-new Epic Voyage!
en
Everyone


















```

## License

[MIT LICENSE](LICENSE)