{"id":15766956,"url":"https://github.com/tregusti/episode-parser","last_synced_at":"2025-05-05T20:53:24.915Z","repository":{"id":1082007,"uuid":"39407388","full_name":"tregusti/episode-parser","owner":"tregusti","description":"A javascript utility for parsing file names in a format that sometimes is used for tv shows.","archived":false,"fork":false,"pushed_at":"2023-04-16T16:13:48.000Z","size":800,"stargazers_count":27,"open_issues_count":7,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-20T07:22:29.666Z","etag":null,"topics":["javascript","javascript-utility","parsing","tv-shows"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tregusti.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2015-07-20T20:41:19.000Z","updated_at":"2025-01-15T14:14:58.000Z","dependencies_parsed_at":"2023-07-05T18:17:39.313Z","dependency_job_id":null,"html_url":"https://github.com/tregusti/episode-parser","commit_stats":{"total_commits":61,"total_committers":6,"mean_commits":"10.166666666666666","dds":0.360655737704918,"last_synced_commit":"6603e4cd75e1d13bc2831f5290bd45137914805c"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tregusti%2Fepisode-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tregusti%2Fepisode-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tregusti%2Fepisode-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tregusti%2Fepisode-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tregusti","download_url":"https://codeload.github.com/tregusti/episode-parser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252576722,"owners_count":21770718,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript","javascript-utility","parsing","tv-shows"],"created_at":"2024-10-04T13:04:10.828Z","updated_at":"2025-05-05T20:53:24.895Z","avatar_url":"https://github.com/tregusti.png","language":"JavaScript","readme":"# episode-parser\n\n[![CircleCI](https://img.shields.io/circleci/project/tregusti/episode-parser/master.svg)][circleci]\n[![NPM release](https://img.shields.io/npm/v/episode-parser.svg)][npm-module]\n[![License](https://img.shields.io/npm/l/episode-parser.svg)][license]\n\n  [circleci]: https://circleci.com/gh/tregusti/episode-parser\n  [npm-module]: https://www.npmjs.com/package/episode-parser\n  [license]: http://tregusti.mit-license.org/\n\nA javascript utility for parsing file names in a format that sometimes is used\nfor tv shows.\n\nIt parses a file name like this `Fake.Blood.2013.S07E06.Karma.Sucks.PROPER.720p.HDTV.x264-STALKERS.srt`\ninto an object with the following possible properties:\n\n  - `show`, string: The name of the show, `'Fake Blood'`.\n  - `year`, integer: The release year, `2013`.\n  - `season`, integer: The season number, `7`.\n  - `episode`, integer: The episode number, `6`.\n  - `episodeCount`, integer: The count of episodes this file name includes, `1`.\n  - `name`, string: The name of the episode, `'Karma Sucks'`.\n  - `quality`, integer: The quality taken from `720p` or `1080p`. In this case `720`.\n  - `source`, string: Available values are `'hdtv'`, `'webdl'`, In this case `'hdtv'`.\n  - `codec`, string: Codec used, `'x264'`.\n  - `group`, string: Release group, `'STALKERS'`.\n  - `ext`, string: File extension, `'srt'`.\n\n## Supported formats\n\nTake a look in [the tests][examples] for examples of what file name formats are\nsupported.\n\n  [examples]: https://github.com/tregusti/episode-parser/blob/master/test/parser.test.js\n\n## Usage\n\nSimply require the module and you get a parsing function that you invoke with\nthe file name to parse:\n\n```js\nvar parser = require('episode-parser')\nvar filename = 'Fake Blood 2x06 I Need Blood.srt'\nvar result = parser(filename)\nconsole.log(result.show) //= 'Fake Blood'\nconsole.log(result.year) //= undefined\nconsole.log(result.season) //= 2\nconsole.log(result.codec) //= undefined\n```\n\nIf the parser can't parse the file name, `null` will be returned. If the parser\ncan't parse out a specific details, the property for that detail will be missing\nfrom the result.\n\n## Installation\n\n```sh\nnpm install episode-parser\n```\n\n## Versioning\n\nThis package uses [semver](http://semver.org/spec/v2.0.0.html).\n\n## Contributing\n\nIf you feel something is missing, which is highly probable since I made this for\nmy personal needs, please create a [pull request][pr-help], with tests covering\nyour case. If you feel somewhat lazy, create an issue instead and I might look\ninto it.\n\n  [pr-help]: https://help.github.com/articles/using-pull-requests/\n\n## Thank you\n\n[![Flattr](http://img.shields.io/badge/flattr-donate-brightgreen.svg)](https://flattr.com/profile/tregusti)\n\nBuilding good software and tools takes time. Please do support a future for this project if you are\nusing it. Thank you!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftregusti%2Fepisode-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftregusti%2Fepisode-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftregusti%2Fepisode-parser/lists"}