All Projects → tregusti → episode-parser

tregusti / episode-parser

Licence: other
A javascript utility for parsing file names in a format that sometimes is used for tv shows.

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects

Projects that are alternatives of or similar to episode-parser

dpar
Neural network transition-based dependency parser (in Rust)
Stars: ✭ 41 (+70.83%)
Mutual labels:  parsing
text2tab
TAB-delimited text parser for ABAP
Stars: ✭ 16 (-33.33%)
Mutual labels:  parsing
GreynirPackage
The Greynir NLP parser for Icelandic, packaged for PyPI
Stars: ✭ 49 (+104.17%)
Mutual labels:  parsing
comby-rust
Rust refactoring templates for comby, the structural find-and-replace tool.
Stars: ✭ 23 (-4.17%)
Mutual labels:  parsing
tree-hugger
A light-weight, extendable, high level, universal code parser built on top of tree-sitter
Stars: ✭ 96 (+300%)
Mutual labels:  parsing
TeamReference
Team reference for Competitive Programming. Algorithms implementations very used in the ACM-ICPC contests. Latex template to build your own team reference.
Stars: ✭ 29 (+20.83%)
Mutual labels:  parsing
left-recursion
Quick explanation of eliminating left recursion in Haskell parsers
Stars: ✭ 36 (+50%)
Mutual labels:  parsing
WatchSomething
Project that uses an API to list movies and tv shows that are latest, popular, top rated & on air.
Stars: ✭ 11 (-54.17%)
Mutual labels:  tv-shows
cppcombinator
parser combinator and AST generator in c++17
Stars: ✭ 20 (-16.67%)
Mutual labels:  parsing
Plotty
C language compiler from scratch for a custom architecture, with virtual machine and all
Stars: ✭ 33 (+37.5%)
Mutual labels:  parsing
sledgehammer
🔨 📶 WiFi-Jammer/DoS toolset
Stars: ✭ 34 (+41.67%)
Mutual labels:  parsing
StatementParser
Idea behind the StatementParser is, that it would be nice to be able to process financial data from different kind of statements in automatized way. This is often pretty hard as brokers are giving these data only in form of xls/xlst/pdf or other format which is not directly processable and here comes StatmentParser.
Stars: ✭ 21 (-12.5%)
Mutual labels:  parsing
libvcs
⚙️ Lite, typed, pythonic utilities for git, svn, mercurial, etc.
Stars: ✭ 43 (+79.17%)
Mutual labels:  parsing
markright
A customizable markdown parser in Elixir: pure pattern matching.
Stars: ✭ 14 (-41.67%)
Mutual labels:  parsing
slash-command
Simple slash command parsing.
Stars: ✭ 15 (-37.5%)
Mutual labels:  parsing
docx2csv
Extracts tables from .docx files and saves them as .csv or .xls files
Stars: ✭ 42 (+75%)
Mutual labels:  parsing
Deep-NLP-Resources
Curated list of all NLP Resources
Stars: ✭ 65 (+170.83%)
Mutual labels:  parsing
SwiftTreeSitter
Swift wrappers for the tree-sitter incremental parsing system
Stars: ✭ 116 (+383.33%)
Mutual labels:  parsing
kaliningraph
🕸️ Graphs, finite fields and discrete dynamical systems in Kotlin
Stars: ✭ 62 (+158.33%)
Mutual labels:  parsing
angel.co-companies-list-scraping
No description or website provided.
Stars: ✭ 54 (+125%)
Mutual labels:  parsing

episode-parser

CircleCI NPM release License

A javascript utility for parsing file names in a format that sometimes is used for tv shows.

It parses a file name like this Fake.Blood.2013.S07E06.Karma.Sucks.PROPER.720p.HDTV.x264-STALKERS.srt into an object with the following possible properties:

  • show, string: The name of the show, 'Fake Blood'.
  • year, integer: The release year, 2013.
  • season, integer: The season number, 7.
  • episode, integer: The episode number, 6.
  • episodeCount, integer: The count of episodes this file name includes, 1.
  • name, string: The name of the episode, 'Karma Sucks'.
  • quality, integer: The quality taken from 720p or 1080p. In this case 720.
  • source, string: Available values are 'hdtv', 'webdl', In this case 'hdtv'.
  • codec, string: Codec used, 'x264'.
  • group, string: Release group, 'STALKERS'.
  • ext, string: File extension, 'srt'.

Supported formats

Take a look in the tests for examples of what file name formats are supported.

Usage

Simply require the module and you get a parsing function that you invoke with the file name to parse:

var parser = require('episode-parser')
var filename = 'Fake Blood 2x06 I Need Blood.srt'
var result = parser(filename)
console.log(result.show) //= 'Fake Blood'
console.log(result.year) //= undefined
console.log(result.season) //= 2
console.log(result.codec) //= undefined

If the parser can't parse the file name, null will be returned. If the parser can't parse out a specific details, the property for that detail will be missing from the result.

Installation

npm install episode-parser

Versioning

This package uses semver.

Contributing

If you feel something is missing, which is highly probable since I made this for my personal needs, please create a pull request, with tests covering your case. If you feel somewhat lazy, create an issue instead and I might look into it.

Thank you

Flattr

Building good software and tools takes time. Please do support a future for this project if you are using it. Thank you!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].