Skip to content
autobrrPublic
forked from moistari/rls

About

rls is an advanced release name parser for p2p/scene/misc

Topics

Resources

Stars

13 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

121 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rls

This is a fork of moistari/rls

rls is a package to parse release names. see go doc.

Usage example

package main

import (
	"fmt"

	"github.com/autobrr/rls"
)

func main() {
	const title = "The_Velvet_Underground-The_Complete_Matrix_Tapes-Reissue_Limited_Edition_Boxset-8LP-2019-NOiR"
	r := rls.ParseString(title)
	fmt.Printf("%q:\n", r)
	fmt.Printf("  type: %s\n", r.Type)
	fmt.Printf("  artist: %s\n", r.Artist)
	fmt.Printf("  title: %s\n", r.Title)
	fmt.Printf("  year: %d\n", r.Year)
	fmt.Printf("  disc: %s\n", r.Disc)
	fmt.Printf("  source: %s\n", r.Source)
	fmt.Printf("  edition: %q\n", r.Edition)
	fmt.Printf("  other: %q\n", r.Other)
	fmt.Printf("  group: %s\n", r.Group)
	// Output:
	// "The_Velvet_Underground-The_Complete_Matrix_Tapes-Reissue_Limited_Edition_Boxset-8LP-2019-NOiR":
	//   type: music
	//   artist: The Velvet Underground
	//   title: The Complete Matrix Tapes
	//   year: 2019
	//   disc: 8x
	//   source: LP
	//   edition: ["Limited.Edition"]
	//   other: ["REISSUE" "BOXSET"]
	//   group: NOiR
}

Command line

rls parse parses release names and writes each result to standard output as a JSON object on its own line (JSON Lines). Names are read from the arguments or, when there are none, from standard input, one per line.

Prebuilt binaries for Linux, macOS, Windows and FreeBSD are attached to each release.

$ rls parse The.Matrix.1999.1080p.BluRay.x264-GROUP
$ rls parse < names.txt
$ rls version
Get-Content names.txt | rls.exe parse | ConvertFrom-Json

Windows PowerShell 5.1 sends ASCII to native commands by default, which turns non-ASCII characters into ?. Run $OutputEncoding = [Console]::OutputEncoding = [Text.UTF8Encoding]::new($false) first, or use PowerShell 7.

About

rls is an advanced release name parser for p2p/scene/misc

Topics

Resources

Stars

13 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages