Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cytec/releaseparser
A package to parse scene release names
https://github.com/cytec/releaseparser
file-info golang golang-package nameparser nameparsing
Last synced: about 1 month ago
JSON representation
A package to parse scene release names
- Host: GitHub
- URL: https://github.com/cytec/releaseparser
- Owner: cytec
- Created: 2017-10-22T19:54:29.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2020-07-06T15:59:22.000Z (over 4 years ago)
- Last Synced: 2024-06-20T19:26:06.427Z (5 months ago)
- Topics: file-info, golang, golang-package, nameparser, nameparsing
- Language: Go
- Size: 22.5 KB
- Stars: 9
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
releaseparser
===============A package used to parse scene release names
[![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg?style=flat)](https://godoc.org/github.com/cytec/releaseparser)
[![License MIT](https://img.shields.io/badge/license-MIT-lightgrey.svg?style=flat)](https://github.com/cytec/releaseparser#license-mit)## Installation
```bash
go get -u github.com/cytec/releaseparser/...
```## Examples
### titles.go
```go
package mainimport (
"fmt"
"io/ioutil"
"sort""github.com/cytec/releaseparser"
)func main() {
files, err := ioutil.ReadDir("./")
if err != nil {
panic(err)
}titles := []string{}
for _, f := range files {
if f.IsDir() {
r := releaseparser.Parse(f.Name())
if r.Title != "" {
titles = append(titles, r.Title)
}
}
}sort.Strings(titles)
for _, title := range titles {
fmt.Println(title)
}
}
```## License (MIT)
*Copyright (C) 2017 [cytec](http://cytec.us/)*
> Permission is hereby granted, free of charge, to any person obtaining
> a copy of this software and associated documentation files (the "Software"),
> to deal in the Software without restriction, including without limitation
> the rights to use, copy, modify, merge, publish, distribute, sublicense,
> and/or sell copies of the Software, and to permit persons to whom the
> Software is furnished to do so, subject to the following conditions:
>
> The above copyright notice and this permission notice shall be included
> in all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
> OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
> IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
> DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
> OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.