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 2 months 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 (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-07-06T15:59:22.000Z (almost 5 years ago)
- Last Synced: 2025-04-14T02:08:10.900Z (about 2 months ago)
- Topics: file-info, golang, golang-package, nameparser, nameparsing
- Language: Go
- Size: 22.5 KB
- Stars: 9
- Watchers: 1
- 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
[](https://godoc.org/github.com/cytec/releaseparser)
[](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.