Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-guessit for openSUSE:Factory checked in at 2021-02-04 20:24:17 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-guessit (Old) and /work/SRC/openSUSE:Factory/.python-guessit.new.28504 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-guessit" Thu Feb 4 20:24:17 2021 rev:12 rq:869104 version:3.3.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-guessit/python-guessit.changes 2020-12-24 19:39:07.199061366 +0100 +++ /work/SRC/openSUSE:Factory/.python-guessit.new.28504/python-guessit.changes 2021-02-04 20:24:51.354897673 +0100 @@ -1,0 +2,17 @@ +Thu Feb 4 05:51:52 UTC 2021 - Luigi Baldoni <aloi...@gmx.com> + +- Update to verison 3.3.0 + Feature: + * Add --output-input-string option + * streaming_service: Add Showtime, HBO and AppleTV + * other: Add Hybrid support + Fix: + * options: Avoid appending None values to list when merging + options + * streaming_service: Add iT keyword support for iTunes + * streaming_service: Fix regex patterns declared with re: + prefix + Documentation: + * readme: Avoid mixed-content in github pages + +------------------------------------------------------------------- Old: ---- guessit-3.2.0.tar.gz New: ---- guessit-3.3.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-guessit.spec ++++++ --- /var/tmp/diff_new_pack.wzFTRT/_old 2021-02-04 20:24:51.982898629 +0100 +++ /var/tmp/diff_new_pack.wzFTRT/_new 2021-02-04 20:24:51.982898629 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-guessit # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ %define skip_python2 1 Name: python-guessit -Version: 3.2.0 +Version: 3.3.0 Release: 0 Summary: A library for guessing information from video files License: LGPL-3.0-only @@ -38,7 +38,7 @@ Requires: python-python-dateutil Requires: python-rebulk >= 2.0.0 Requires(post): update-alternatives -Requires(postun): update-alternatives +Requires(postun):update-alternatives BuildArch: noarch %python_subpackages ++++++ guessit-3.2.0.tar.gz -> guessit-3.3.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guessit-3.2.0/.dockerignore new/guessit-3.3.0/.dockerignore --- old/guessit-3.2.0/.dockerignore 1970-01-01 01:00:00.000000000 +0100 +++ new/guessit-3.3.0/.dockerignore 2021-02-03 23:36:36.000000000 +0100 @@ -0,0 +1,15 @@ +__pycache__/ +*.py[cod] +**/__pycache__/ +**/*.py[cod] +.benchmarks/ +.cache/ +.eggs/ +*.egg-info/ +*.egg +.tox/ +.coverage +.python-version +doc/ +*.log +*.iml \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guessit-3.2.0/.github/workflows/ci.yml new/guessit-3.3.0/.github/workflows/ci.yml --- old/guessit-3.2.0/.github/workflows/ci.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/guessit-3.3.0/.github/workflows/ci.yml 2021-02-03 23:36:36.000000000 +0100 @@ -0,0 +1,116 @@ +name: ci +on: + push: ~ + pull_request: ~ +jobs: + build: + if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + python-version: [ 3.5, 3.6, 3.7, 3.8, 3.9, pypy-3.6, pypy-3.7 ] + regex: [ "0", "1" ] + exclude: + # regex module doesn't play well with pypy and unicode. + - python-version: pypy-3.6 + regex: "1" + - python-version: pypy-3.7 + regex: "1" + + steps: + - name: Setup python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Checkout + uses: actions/checkout@v2 + + - name: Git User config + run: | + git config --global user.email "act...@github.com" + git config --global user.name "github-actions" + + - name: Install Dependencies + run: | + pip install -e .[dev,test] + pip install coveralls + + - name: Install regex + run: | + pip install regex + if: ${{ matrix.regex == '1' }} + + - run: pylint guessit + if: matrix.python-version != '3.9' + + - run: coverage run --source=guessit setup.py test + env: + REBULK_REGEX_ENABLED: ${{ matrix.regex }} + + - run: python setup.py build + + - name: Coveralls + run: coveralls + env: + COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} + + commitlint: + if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: wagoid/commitlint-github-action@v2 + + release: + if: ${{ github.ref == 'refs/heads/master' && github.event_name == 'push' }} + needs: build + + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + python-version: [ 3.8 ] + + steps: + - name: Setup python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Git User config + run: | + git config --global user.email "act...@github.com" + git config --global user.name "github-actions" + + - name: Install Dependencies + run: pip install -e .[test] + + - name: Install python-semantic-release + run: pip install python-semantic-release + + - name: Publish release + run: semantic-release -v DEBUG publish + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} + + - name: Merge master to develop + uses: robotology/gh-action-nightly-merge@v1.3.2 + with: + stable_branch: 'master' + development_branch: 'develop' + allow_ff: true + user_name: github-actions + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guessit-3.2.0/.github/workflows/mkdocs.yml new/guessit-3.3.0/.github/workflows/mkdocs.yml --- old/guessit-3.2.0/.github/workflows/mkdocs.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/guessit-3.3.0/.github/workflows/mkdocs.yml 2021-02-03 23:36:36.000000000 +0100 @@ -0,0 +1,25 @@ +name: mkdocs +on: + push: + branches: + - master +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: 3.x + + - run: pip install mkdocs mkdocs-material + - run: mkdocs build + + - name: Deploy ???? + uses: JamesIves/github-pages-deploy-action@3.7.1 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BRANCH: gh-pages + FOLDER: site + CLEAN: true + SINGLE_COMMIT: true diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guessit-3.2.0/.gitignore new/guessit-3.3.0/.gitignore --- old/guessit-3.2.0/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ new/guessit-3.3.0/.gitignore 2021-02-03 23:36:36.000000000 +0100 @@ -0,0 +1,30 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +dist/ + +# Python dist +*.egg-info/ +.eggs/ +build/ + +# Coverage +.coverage + +# PyEnv +.python-version + +# Tox +.tox/ + +# py.test +lastfailed +.pytest_cache/ + +# Jetbrain +*.iml +.idea/ + +# docs +docs/_build/ + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guessit-3.2.0/CHANGELOG.md new/guessit-3.3.0/CHANGELOG.md --- old/guessit-3.2.0/CHANGELOG.md 2020-12-24 00:08:38.000000000 +0100 +++ new/guessit-3.3.0/CHANGELOG.md 2021-02-03 23:36:53.000000000 +0100 @@ -3,6 +3,20 @@ <!--next-version-placeholder--> +## v3.3.0 (2021-02-03) +### Feature +* Add `--output-input-string` option ([#665](https://github.com/guessit-io/guessit/issues/665)) ([`bac6143`](https://github.com/guessit-io/guessit/commit/bac6143559d437edc34e2fde0b77172567e4451d)) +* **streaming_service:** Add `Showtime`, `HBO` and `AppleTV` ([#661](https://github.com/guessit-io/guessit/issues/661)) ([`dc55eaa`](https://github.com/guessit-io/guessit/commit/dc55eaa6d0cdf9d5552c4dbaaa29c8df8365691c)) +* **other:** Add `Hybrid` support ([#669](https://github.com/guessit-io/guessit/issues/669)) ([`522af53`](https://github.com/guessit-io/guessit/commit/522af5371cac467dd1f03abb08df9cbf5b409126)) + +### Fix +* **options:** Avoid appending `None` values to list when merging options ([#658](https://github.com/guessit-io/guessit/issues/658)) ([`42978c9`](https://github.com/guessit-io/guessit/commit/42978c909c4e5ebb2cc95b94583f80d73759f29a)) +* **streaming_service:** Add iT keyword support for iTunes ([#669](https://github.com/guessit-io/guessit/issues/669)) ([`51e0021`](https://github.com/guessit-io/guessit/commit/51e00217947d8b993bcfb091b012da803245f698)) +* **streaming_service:** Fix regex patterns declared with `re:` prefix ([`e02323f`](https://github.com/guessit-io/guessit/commit/e02323f6c1d1e74ef32dfbcfb3ab69e367d11a00)) + +### Documentation +* **readme:** Avoid mixed-content in github pages ([`2e1f29c`](https://github.com/guessit-io/guessit/commit/2e1f29ca47f8586930ca092b31f2431a1f3df52f)) + ## v3.2.0 (2020-12-23) ### Feature * Add python 3.9 support, drop python 2.7 support ([`2c8b25e`](https://github.com/guessit-io/guessit/commit/2c8b25e77fb424d63f9f73318e85dd96cef865e0)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guessit-3.2.0/Dockerfile new/guessit-3.3.0/Dockerfile --- old/guessit-3.2.0/Dockerfile 1970-01-01 01:00:00.000000000 +0100 +++ new/guessit-3.3.0/Dockerfile 2021-02-03 23:36:36.000000000 +0100 @@ -0,0 +1,13 @@ +FROM python:3.7-alpine + +MAINTAINER R??mi Alvergnat <toilal....@gmail.com> + +WORKDIR /root + +COPY / /root/guessit/ +WORKDIR /root/guessit/ + +RUN pip install -e . + +ENTRYPOINT ["guessit"] + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guessit-3.2.0/PKG-INFO new/guessit-3.3.0/PKG-INFO --- old/guessit-3.2.0/PKG-INFO 2020-12-24 00:08:46.455046000 +0100 +++ new/guessit-3.3.0/PKG-INFO 2021-02-03 23:37:02.014415700 +0100 @@ -1,19 +1,19 @@ Metadata-Version: 2.1 Name: guessit -Version: 3.2.0 +Version: 3.3.0 Summary: GuessIt - a library for guessing information from video filenames. Home-page: http://guessit.io Author: R??mi Alvergnat Author-email: toilal....@gmail.com License: LGPLv3 -Download-URL: https://pypi.python.org/packages/source/g/guessit/guessit-3.2.0.tar.gz +Download-URL: https://pypi.python.org/packages/source/g/guessit/guessit-3.3.0.tar.gz Description: GuessIt ======= - [](https://pypi.python.org/pypi/guessit) - []() + [](https://pypi.python.org/pypi/guessit) + []() [](https://github.com/guessit-io/guessit/actions?query=workflow%3Aci) - [](https://coveralls.io/github/guessit-io/guessit?branch=master) + [](https://coveralls.io/github/guessit-io/guessit?branch=master) [](https://github.com/relekang/python-semantic-release) GuessIt is a python library that extracts as much information as @@ -200,6 +200,20 @@ <!--next-version-placeholder--> + ## v3.3.0 (2021-02-03) + ### Feature + * Add `--output-input-string` option ([#665](https://github.com/guessit-io/guessit/issues/665)) ([`bac6143`](https://github.com/guessit-io/guessit/commit/bac6143559d437edc34e2fde0b77172567e4451d)) + * **streaming_service:** Add `Showtime`, `HBO` and `AppleTV` ([#661](https://github.com/guessit-io/guessit/issues/661)) ([`dc55eaa`](https://github.com/guessit-io/guessit/commit/dc55eaa6d0cdf9d5552c4dbaaa29c8df8365691c)) + * **other:** Add `Hybrid` support ([#669](https://github.com/guessit-io/guessit/issues/669)) ([`522af53`](https://github.com/guessit-io/guessit/commit/522af5371cac467dd1f03abb08df9cbf5b409126)) + + ### Fix + * **options:** Avoid appending `None` values to list when merging options ([#658](https://github.com/guessit-io/guessit/issues/658)) ([`42978c9`](https://github.com/guessit-io/guessit/commit/42978c909c4e5ebb2cc95b94583f80d73759f29a)) + * **streaming_service:** Add iT keyword support for iTunes ([#669](https://github.com/guessit-io/guessit/issues/669)) ([`51e0021`](https://github.com/guessit-io/guessit/commit/51e00217947d8b993bcfb091b012da803245f698)) + * **streaming_service:** Fix regex patterns declared with `re:` prefix ([`e02323f`](https://github.com/guessit-io/guessit/commit/e02323f6c1d1e74ef32dfbcfb3ab69e367d11a00)) + + ### Documentation + * **readme:** Avoid mixed-content in github pages ([`2e1f29c`](https://github.com/guessit-io/guessit/commit/2e1f29ca47f8586930ca092b31f2431a1f3df52f)) + ## v3.2.0 (2020-12-23) ### Feature * Add python 3.9 support, drop python 2.7 support ([`2c8b25e`](https://github.com/guessit-io/guessit/commit/2c8b25e77fb424d63f9f73318e85dd96cef865e0)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guessit-3.2.0/README.md new/guessit-3.3.0/README.md --- old/guessit-3.2.0/README.md 2020-12-24 00:08:14.000000000 +0100 +++ new/guessit-3.3.0/README.md 2021-02-03 23:36:36.000000000 +0100 @@ -1,10 +1,10 @@ GuessIt ======= -[](https://pypi.python.org/pypi/guessit) -[]() +[](https://pypi.python.org/pypi/guessit) +[]() [](https://github.com/guessit-io/guessit/actions?query=workflow%3Aci) -[](https://coveralls.io/github/guessit-io/guessit?branch=master) +[](https://coveralls.io/github/guessit-io/guessit?branch=master) [](https://github.com/relekang/python-semantic-release) GuessIt is a python library that extracts as much information as diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guessit-3.2.0/docs/CNAME new/guessit-3.3.0/docs/CNAME --- old/guessit-3.2.0/docs/CNAME 1970-01-01 01:00:00.000000000 +0100 +++ new/guessit-3.3.0/docs/CNAME 2021-02-03 23:36:36.000000000 +0100 @@ -0,0 +1 @@ +doc.guessit.io \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guessit-3.2.0/docs/configuration.md new/guessit-3.3.0/docs/configuration.md --- old/guessit-3.2.0/docs/configuration.md 1970-01-01 01:00:00.000000000 +0100 +++ new/guessit-3.3.0/docs/configuration.md 2021-02-03 23:36:36.000000000 +0100 @@ -0,0 +1,41 @@ +# Configuration files + +Guessit supports configuration through configuration files. + +Default configuration file is bundled inside guessit package from +[config/options.json][] file. + +It is possible to disable the default configuration with +`--no-default-config` option, but you have then to provide a full +configuration file based on the default one. + +Configuration files are loaded from the following paths: + +> - `~/.guessit/options.(json|yml|yaml)` +> - `~/.config/guessit/options.(json|yml|yaml)` + +It is also possible to disable those user configuration files with +`no-user-config` option. + +Additional configuration files can be included using the `-c`/`--config` +option. + +As many configuration files can be involved, they are deeply merged to +keep all values inside the effective configuration. + +# Advanced configuration + +Configuration files contains all options available through the command +line, but also an additional one named `advanced_config`. + +This advanced configuration contains all internal parameters and they +are exposed to help you tweaking guessit to better fit your needs. + +If no `advanced_config` is declared through all effective configuration +files, the default one will be used even when `--no-default-config` is +used. + +We're willing to keep it backwards compatible, but in order to enhance +Guessit, these parameters might change without prior notice. + + [config/options.json]: https://github.com/guessit-io/guessit/blob/develop/guessit/config/options.json/ \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guessit-3.2.0/docs/index.md new/guessit-3.3.0/docs/index.md --- old/guessit-3.2.0/docs/index.md 1970-01-01 01:00:00.000000000 +0100 +++ new/guessit-3.3.0/docs/index.md 2021-02-03 23:36:36.000000000 +0100 @@ -0,0 +1,170 @@ +GuessIt +======= + +[](https://pypi.python.org/pypi/guessit) +[]() +[](https://github.com/guessit-io/guessit/actions?query=workflow%3Aci) +[](https://coveralls.io/github/guessit-io/guessit?branch=master) + +GuessIt is a python library that extracts as much information as +possible from a video filename. + +It has a very powerful matcher that allows to guess properties from a +video using its filename only. This matcher works with both movies and +tv shows episodes. + +For example, GuessIt can do the following: + + $ guessit "Treme.1x03.Right.Place,.Wrong.Time.HDTV.XviD-NoTV.avi" + For: Treme.1x03.Right.Place,.Wrong.Time.HDTV.XviD-NoTV.avi + GuessIt found: { + "title": "Treme", + "season": 1, + "episode": 3, + "episode_title": "Right Place, Wrong Time", + "source": "HDTV", + "video_codec": "Xvid", + "release_group": "NoTV", + "container": "avi", + "mimetype": "video/x-msvideo", + "type": "episode" + } + +Migration note +-------------- + +In GuessIt 3, some properties and values were renamed in order to keep consistency and to be more intuitive. + +To migrate from guessit `2.x` to guessit `3.x`, please read the migration page\<migration2to3\>. To migrate from guessit `0.x` or `1.x` to guessit `2.x`, please read the migration page\<migration\>. + +Install +------- + +Installing GuessIt is simple with [pip](http://www.pip-installer.org/): + + $ pip install guessit + +You can also install from sources \<sources\>. + +Usage +----- + +GuessIt can be used from command line: + + $ guessit + usage: guessit [-h] [-t TYPE] [-n] [-Y] [-D] [-L ALLOWED_LANGUAGES] + [-C ALLOWED_COUNTRIES] [-E] [-T EXPECTED_TITLE] + [-G EXPECTED_GROUP] [--includes INCLUDES] [--excludes EXCLUDES] + [-f INPUT_FILE] [-v] [-P SHOW_PROPERTY] [-a] [-s] [-l] [-j] + [-y] [-i] [-c CONFIG] [--no-user-config] [--no-default-config] + [-p] [-V] [--version] + [filename [filename ...]] + + positional arguments: + filename Filename or release name to guess + + optional arguments: + -h, --help show this help message and exit + + Naming: + -t TYPE, --type TYPE The suggested file type: movie, episode. If undefined, + type will be guessed. + -n, --name-only Parse files as name only, considering "/" and "\" like + other separators. + -Y, --date-year-first + If short date is found, consider the first digits as + the year. + -D, --date-day-first If short date is found, consider the second digits as + the day. + -L ALLOWED_LANGUAGES, --allowed-languages ALLOWED_LANGUAGES + Allowed language (can be used multiple times) + -C ALLOWED_COUNTRIES, --allowed-countries ALLOWED_COUNTRIES + Allowed country (can be used multiple times) + -E, --episode-prefer-number + Guess "serie.213.avi" as the episode 213. Without this + option, it will be guessed as season 2, episode 13 + -T EXPECTED_TITLE, --expected-title EXPECTED_TITLE + Expected title to parse (can be used multiple times) + -G EXPECTED_GROUP, --expected-group EXPECTED_GROUP + Expected release group (can be used multiple times) + --includes INCLUDES List of properties to be detected + --excludes EXCLUDES List of properties to be ignored + + Input: + -f INPUT_FILE, --input-file INPUT_FILE + Read filenames from an input text file. File should + use UTF-8 charset. + + Output: + -v, --verbose Display debug output + -P SHOW_PROPERTY, --show-property SHOW_PROPERTY + Display the value of a single property (title, series, + video_codec, year, ...) + -a, --advanced Display advanced information for filename guesses, as + json output + -s, --single-value Keep only first value found for each property + -l, --enforce-list Wrap each found value in a list even when property has + a single value + -j, --json Display information for filename guesses as json + output + -y, --yaml Display information for filename guesses as yaml + output + -i, --output-input-string + Add input_string property in the output + + Configuration: + -c CONFIG, --config CONFIG + Filepath to configuration file. Configuration file + contains the same options as those from command line + options, but option names have "-" characters replaced + with "_". This configuration will be merged with + default and user configuration files. + --no-user-config Disable user configuration. If not defined, guessit + tries to read configuration files at + ~/.guessit/options.(json|yml|yaml) and + ~/.config/guessit/options.(json|yml|yaml) + --no-default-config Disable default configuration. This should be done + only if you are providing a full configuration through + user configuration or --config option. If no + "advanced_config" is provided by another configuration + file, it will still be loaded from default + configuration. + + Information: + -p, --properties Display properties that can be guessed. + -V, --values Display property values that can be guessed. + --version Display the guessit version. + +It can also be used as a python module: + + >>> from guessit import guessit + >>> guessit('Treme.1x03.Right.Place,.Wrong.Time.HDTV.XviD-NoTV.avi') # doctest: +ALLOW_UNICODE + MatchesDict([('title', 'Treme'), ('season', 1), ('episode', 3), ('episode_title', 'Right Place, Wrong Time'), ('source', 'HDTV'), ('video_codec', 'XviD'), ('release_group', 'NoTV'), ('container', 'avi'), ('mimetype', 'video/x-msvideo'), ('type', 'episode')]) + +`MatchesDict` is a dict that keeps matches ordering. + +Command line options can be given as dict or string to the second argument. + +Configuration +------------- + +Find more about Guessit configuration at configuration page\<configuration\>. + +REST API +-------- + +A REST API will be available soon ... + +Sources are available in a dedicated [guessit-rest repository](https://github.com/Toilal/guessit-rest). + +Support +------- + +This project is hosted on [GitHub](https://github.com/guessit-io/guessit). Feel free to open an issue if you think you have found a bug or something is missing in guessit. + +GuessIt relies on [Rebulk](https://github.com/Toilal/rebulk) project for pattern and rules registration. + +License +------- + +GuessIt is licensed under the [LGPLv3 license](http://www.gnu.org/licenses/lgpl.html). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guessit-3.2.0/docs/migration.md new/guessit-3.3.0/docs/migration.md --- old/guessit-3.2.0/docs/migration.md 1970-01-01 01:00:00.000000000 +0100 +++ new/guessit-3.3.0/docs/migration.md 2021-02-03 23:36:36.000000000 +0100 @@ -0,0 +1,158 @@ +Migration +========= + +Guessit 2 has been rewritten from scratch. You can find in this file all information required to perform a migration from previous version `0.x` or `1.x`. + +API +--- + +`guess_video_info`, `guess_movie_info` and `guess_episode_info` have been removed in favor of a unique function `guessit`. + +Example: + + >>> from guessit import guessit + >>> guessit('Treme.1x03.Right.Place,.Wrong.Time.HDTV.XviD-NoTV.avi') + MatchesDict([('title', 'Treme'), ('season', 1), ('episode', 3), ('episode_title', 'Right Place, Wrong Time'), ('format', 'HDTV'), ('video_codec', 'XviD'), ('release_group', 'NoTV'), ('container', 'avi'), ('mimetype', 'video/x-msvideo'), ('type', 'episode')]) + +`MatchesDict` is a dict that keeps matches ordering. + +Command line options can be given as dict or string to the second argument. + +Properties +---------- + +Some properties have been renamed. + +- `series` is now `title`. +- `title` is now `episode_title` (for `episode` `type` only). +- `episodeNumber` is now `episode`. +- `bonusNumber` is now `bonus` +- `filmNumber` is now `film` +- `cdNumber` is now `cd??` and `cdNumberTotal` is now `cd_count` +- `idNumber` is now `uuid` + +`episodeList` and `partList` have been removed. `episode_number` and `part` properties that can now contains an `int` or a `list[int]`. + +All info `type`, like `seriesinfo` and `movieinfo`. You can check directly `nfo`??value in `container` property. + +All `camelCase` properties have been renamed to `underscore_case`. + +- `releaseGroup` is now `release_group` +- `episodeCount` is now `episode_count` +- `episodeDetails` is now `episode_details` +- `episodeFormat` is now `episode_format` +- `screenSize` is now `screen_size` +- `videoCodec` is now `video_codec` +- `videoProfile` is now `video_profile` +- `videoApi` is now `video_api` +- `audioChannels` is now `audio_channels` +- `audioCodec` is now `audio_codec` +- `audioProfile` is now `audio_profile` +- `subtitleLanguage` is now `subtitle_language` +- `bonusTitle` is now `bonus_title` +- `properCount` is now `proper_count` + +Options +------- + +Some options have been removed. + +- `-X DISABLED_TRANSFORMERS`, `-s, --transformers` + + There's no transformer anymore. + +- `-S EXPECTED_SERIES` + + As `series` was renamed to `title`, use `-T EXPECTED_TITLE` instead. + +- `-G EXPECTED_GROUP` + + GuessIt is now better to guess release group, so this option has been removed. + +- `-d, --demo` + + Probably not that useful. + +- `-i INFO, --info INFO` + + Features related to this option have been removed. + +- `-c, --split-camel`, `-u, --unidentified`, `-b, --bug` + + Will be back soon... (work in progress) + +Other GuessIt `1.x` options have been kept. + +Output +------ + +Output produced by `guessit` api function is now an instance of [OrderedDict](https://docs.python.org/2/library/collections.html#collections.OrderedDict). Property values are automatically ordered based on filename, and you can still use this output as a default python `dict`. + +If multiple values are available for a property, value in the dict will be a `list` instance. + +`country` 2-letter code is not added to the title anymore. As `country` is added to the returned guess dict, it's up to the user to edit the guessed title. + +Advanced display option (`-a, --advanced`) output is also changed. It now list `Match` objects from [Rebulk](https://github.com/Toilal/rebulk), and may display duplicates that would have been merged in standard output.: + + $ guessit "Treme.1x03.Right.Place,.Wrong.Time.HDTV.XviD-NoTV.avi" -a + For: Treme.1x03.Right.Place,.Wrong.Time.HDTV.XviD-NoTV.avi + GuessIt found: { + "title": { + "value": "Treme", + "raw": "Treme.", + "start": 0, + "end": 6 + }, + "season": { + "value": 1, + "raw": "1", + "start": 6, + "end": 7 + }, + "episode": { + "value": 3, + "raw": "03", + "start": 8, + "end": 10 + }, + "episode_title": { + "value": "Right Place, Wrong Time", + "raw": ".Right.Place,.Wrong.Time.", + "start": 10, + "end": 35 + }, + "format": { + "value": "HDTV", + "raw": "HDTV", + "start": 35, + "end": 39 + }, + "video_codec": { + "value": "XviD", + "raw": "XviD", + "start": 40, + "end": 44 + }, + "release_group": { + "value": "NoTV", + "raw": "-NoTV", + "start": 44, + "end": 49 + }, + "container": { + "value": "avi", + "raw": ".avi", + "start": 49, + "end": 53 + }, + "mimetype": { + "value": "video/x-msvideo", + "start": 53, + "end": 53 + }, + "type": { + "value": "episode", + "start": 53, + "end": 53 + } + } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guessit-3.2.0/docs/migration2to3.md new/guessit-3.3.0/docs/migration2to3.md --- old/guessit-3.2.0/docs/migration2to3.md 1970-01-01 01:00:00.000000000 +0100 +++ new/guessit-3.3.0/docs/migration2to3.md 2021-02-03 23:36:36.000000000 +0100 @@ -0,0 +1,124 @@ +Migration +========= + +Guessit 3 has introduced breaking changes from previous versions. You can find in this file all information required to perform a migration from previous version `2.x`. + +API +--- + +No changes. + +Properties +---------- + +Some properties have been renamed. + +- `format` is now `source`. + +Values +------ + +The major changes in GuessIt 3 are around the values. Values were renamed in order to keep consistency and to be more intuitive. Acronyms are uppercase (e.g.: `HDTV`). Names follow the official name (e.g.: `Blu-ray`). Words have only the first letter capitalized (e.g.: `Camera`) except prepositions (e.g.: `on`) which are all lowercase. + +The following values were changed: + +### `source` (former `format` property) + +- `Cam` is now `Camera` or `HD Camera` +- `Telesync` is now `Telesync` or `HD Telesync` +- `PPV` is now `Pay-per-view` +- `DVB` is now `Digital TV` +- `VOD` is now `Video on Demand` +- `WEBRip` is now `Web` with additional property `other: Rip` +- `WEB-DL` is now `Web` +- `AHDTV` is now `Analog HDTV` +- `UHDTV` is now `Ultra HDTV` +- `HDTC` is now `HD Telecine` + +### `screen_size` + +- `360i` was added. +- `480i` was added. +- `576i` was added. +- `900i` was added. +- `4K` is now `2160p` +- `4320p` was added. + +### `video_codec` + +- `h264` is now `H.264` +- `h265` is now `H.265` +- `Mpeg2` is now `MPEG-2` +- `Real` is now `RealVideo` +- `XviD` is now `Xvid` + +### `video_profile` + +- `BP` is now `Baseline`. +- `HP` is now `High`. +- `XP` is now `Extended`. +- `MP` is now `Main`. +- `Hi422P` is now `High 4:2:2`. +- `Hi444PP` is now `High 4:4:4 Predictive`. +- `High 10` was added. +- `8bit` was removed. `8bit` is detected as `color_depth: 8-bit` +- `10bit` was removed. `10bit` is detected as `color_depth: 10-bit` + +### `audio_codec` + +- `DTS-HD` was added. +- `AC3` is now `Dolby Digital` +- `EAC3` is now `Dolby Digital Plus` +- `TrueHD` is now `Dolby TrueHD` +- `DolbyAtmos` is now `Dolby Atmos`. + +### `audio_profile` + +- `HE` is now `High Efficiency`. +- `LC` is now `Low Complexity`. +- `HQ` is now `High Quality`. +- `HDMA` is now `Master Audio`. + +### `edition` + +- `Collector Edition` is now `Collector` +- `Special Edition` is now `Special` +- `Criterion Edition` is now `Criterion` +- `Deluxe Edition` is now `Deluxe` +- `Limited Edition` is now `Limited` +- `Theatrical Edition` is now `Theatrical` +- `Director's Definitive Cut` was added. + +### `episode_details` + +- `Oav` and `Ova` were removed. They are now `other: Original Animated Video` +- `Omake` is now `Extras` +- `Final` was added. + +### `other` + +- `Rip` was added. E.g.: `DVDRip` will output `other: Rip` +- `DDC` was removed. `DDC` is now `edition: Director's Definitive Cut` +- `CC` was removed. `CC` is now `edition: Criterion` +- `FINAL` was removed. `FINAL` is now `episode_details: Final` +- `Original Animated Video` was added. +- `OV` is now `Original Video` +- `AudioFix` is now `Audio Fixed` +- `SyncFix` is now `Sync Fixed` +- `DualAudio` is now `Dual Audio` +- `Fansub` is now `Fan Subtitled` +- `Fastsub` is now `Fast Subtitled` +- `FullHD` is now `Full HD` +- `UltraHD` is now `Ultra HD` +- `mHD` and `HDLight` are now `Micro HD` +- `HQ` is now `High Quality` +- `HR` is now `High Resolution` +- `LD` is now `Line Dubbed` +- `MD` is now `Mic Dubbed` +- `Low Definition` was added. +- `LiNE` is now `Line Audio` +- `R5` is now `Region 5` +- `Region C` was added. +- `ReEncoded` is now `Reencoded` +- `WideScreen` is now `Widescreen` + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guessit-3.2.0/docs/properties.md new/guessit-3.3.0/docs/properties.md --- old/guessit-3.2.0/docs/properties.md 1970-01-01 01:00:00.000000000 +0100 +++ new/guessit-3.3.0/docs/properties.md 2021-02-03 23:36:36.000000000 +0100 @@ -0,0 +1,247 @@ +Properties +========== + +Guessed values are cleaned up and given in a readable format which may not match exactly the raw filename. + +So, for instance, + +- `DVDSCR` will be guessed as `source` = `DVD` + `other` = `Screener` +- `1920x1080` will be guessed as `screen_size` = `1080p` +- `DD5.1` will be guessed as `audio_codec` = `Dolby Digital` + `audio_channels` = `5.1` + +Main properties +--------------- + +- **type** + + Type of the file. + + - `episode`, `movie` +- **title** + + Title of movie or episode. + +- **alternative\_title** + + Other titles found for movie. + +- **container** + + Container of the file. + + - `3g2`, `3gp`, `3gp2`, `asf`, `ass`, `avi`, `divx`, `flv`, `idx`, `iso`, `m4v`, `mk2`, `mk3d`, `mkv`, `mka`, `mov`, `mp4`, `mp4a`, `mpeg`, `mpg`, `nfo`, `nzb`, `ogg`, `ogm`, `ogv`, `qt`, `ra`, `ram`, `rm`, `srt`, `ssa`, `sub`, `torrent`, `ts`, `vob`, `wav`, `webm`, `wma`, `wmv` +- **mimetype** + + Mime type of the related container. Guessed values may vary based on OS native support of mime type. + +- **date** + + Date found in filename. + +- **year** + + Year of movie (or episode). + +- **release\_group** + + Name of (non)scene group that released the file. + +- **website** + + Name of website contained in the filename. + +- **streaming\_service** + + Name of the streaming service. + + - `A&E`, `ABC`, `ABC Australia`, `Adult Swim`, `Al Jazeera English`, `AMC`, `America's Test Kitchen`, `Amazon Prime`, `Animal Planet`, `AnimeLab`, `AOL`, `AppleTV`, `ARD`, `BBC iPlayer`, `BravoTV`, `Canal+`, `Cartoon Network`, `CBC`, `CBS`, `Channel 4`, `CHRGD`, `Cinemax`, `CNBC`, `Comedy Central`, `Comedians in Cars Getting Coffee`, `Country Music Television`, `Crackle`, `Crunchy Roll`, `CSpan`, `CTV`, `CuriosityStream`, `CWSeed`, `Daisuki`, `DC Universe`, `Deadhouse Films`, `DramaFever`, `Digiturk Diledigin Yerde`, `Discovery`, `DIY Network`, `Disney`, `Doc Club`, `DPlay`, `E!`, `ePix`, `El Trece`, `ESPN`, `Esquire`, `Family`, `Family Jr`, `Food Network`, `Fox`, `Freeform`, `FYI Network`, `Global`, `GloboSat Play`, `Hallmark`, `HBO Go`, `HBO Max`, `HGTV`, `History`, `Hulu`, `Investigation Discovery`, `IFC`, `iTunes`, `ITV`, `Knowledge Network`, `Lifetime`, `Motor Trend OnDemand`, `MBC`, `MSNBC`, `MTV`, `National Geographic`, `NBA TV`, `NBC`, `Netflix`, `NFL`, `NFL Now`, `NHL GameCenter`, `Nickelodeon`, `Norsk Rikskringkasting`, `OnDemandKorea`, `PBS`, `PBS Kids`, `Playstation Network`, `Pluzz`, `RTE One`, `SBS (AU)`, `SeeSo`, `Shomi`, `Showtime`, `Spike`, `Spike TV`, `Sportsnet`, `Sprout`, `Stan`, `Starz`, `Sveriges Television`, `SwearNet`, `Syfy`, `TBS`, `TFou`, `The CW`, `TLC`, `TubiTV`, `TV3 Ireland`, `TV4 Sweeden`, `TVING`, `TV Land`, `UFC`, `UKTV`, `Univision`, `USA Network`, `Velocity`, `VH1`, `Viceland`, `Viki`, `Vimeo`, `VRV`, `W Network`, `WatchMe`, `WWE Network`, `Xbox Video`, `Yahoo`, `YouTube Red`, `ZDF` + +Episode properties +------------------ + +- **season** + + Season number. (Can be a list if several are found) + +- **episode** + + Episode number. (Can be a list if several are found) + +- **disc** + + Disc number. (Can be a list if several are found) + +- **episode\_count** + + Total number of episodes. + +- **season\_count** + + Total number of seasons. + +- **episode\_details** + + Some details about the episode. + + - `Final`, `Pilot`, `Special`, `Unaired` +- **episode\_format** + + Episode format of the series. + + - `Minisode` +- **part** + + Part number of the video. (Can be a list if several are found) + +- **version** + + Version of the episode. + + - In anime fansub scene, new versions are released with tag `<episode>v[0-9]`. + +Video properties +---------------- + +- **source** + + Source of the release + + - `Analog HDTV`, `Blu-ray`, `Camera`, `Digital Master`, `Digital TV`, `DVD`, `HD Camera`, `HD Telecine`, `HD Telesync`, `HD-DVD`, `HDTV`, `Pay-per-view`, `Satellite`, `Telecine`, `Telesync`, `TV`, `Ultra HD Blu-ray`, `Ultra HDTV`, `VHS`, `Video on Demand`, `Web`, `Workprint` +- **screen\_size** + + Resolution of video. + + - `<width>x<height>`, `360i`, `360p`, `368p`, `480i`, `480p`, `540p`, `576i`, `576p`, `720p`, `900i`, `900p`, `1080i`, `1080p`, `1440p`, `2160p`, `4320p` +- **aspect\_ratio** + + Aspect ratio of video. Calculated using width and height from `screen_size` + +- **video\_codec** + + Codec used for video. + + - `DivX`, `H.263`, `H.264`, `H.265`, `MPEG-2`, `RealVideo`, `VP7`, `VP8`, `VP9`,`Xvid` +- **video\_profile** + + Codec profile used for video. + + - `Baseline`, `High`, `High 10`, `High 4:2:2`, `High 4:4:4 Predictive`, `Main`, `Extended`, `Scalable Video Coding`, `Advanced Video Codec High Definition`, `High Efficiency Video Coding` + +- **color\_depth** + + Bit depth used for video. + - `8-bit`, `10-bit`, `12-bit` +- **video\_api** + + API used for the video. + + - `DXVA` +- **video\_bit\_rate** + + Video bit rate (Mbps). Examples: `25Mbps` (`<BitRate [25Mbps]>`), `40Mbps` (`<BitRate [40Mbps]>`). + + - `[<guessit.BitRate>]` (object has `magnitude` and `units`) +- **frame\_rate** + + Video frame rate (frames per second). Examples: `25fps` (`<FrameRate [25fps]>`), `60fps` (`<FrameRate [60fps]>`). + + - `[<guessit.FrameRate>]` (object has `magnitude` and `units`) + +Audio properties +---------------- + +- **audio\_channels** + + Number of channels for audio. + + - `1.0`, `2.0`, `5.1`, `7.1` +- **audio\_codec** + + Codec used for audio. + + - `AAC`, `Dolby Atmos`, `Dolby Digital`, `Dolby Digital Plus`, `Dolby TrueHD`, `DTS`, `FLAC`, `LPCM`, `MP2`, `MP3`, `Opus`, `PCM`, `Vorbis` +- **audio\_profile** + + The codec profile used for audio. + + - `Extended Surround`, `EX`, `High Efficiency`, `High Quality`, `High Resolution Audio`, `Low Complexity`, `Master Audio` +- **audio\_bit\_rate** + + Audio bit rate (Kbps, Mbps). Examples: `448Kbps` (`<BitRate [448Kbps]>`), `1.5Mbps` (`<BitRate [1.5Mbps]>`). + + - `[<guessit.BitRate>]` (object has `magnitude` and `units`) + +Localization properties +----------------------- + +- **country** + + Country(ies) of content. Often found in series, `Shameless (US)` for instance. + + - `[<babelfish.Country>]` (This class equals name and iso code) +- **language** + + Language(s) of the audio soundtrack. + + - `[<babelfish.Language>]` (This class equals name and iso code) +- **subtitle\_language** + + Language(s) of the subtitles. + + - `[<babelfish.Language>]` (This class equals name and iso code) + +Other properties +---------------- + +- **bonus** + + Bonus number. + +- **bonus\_title** + + Bonus title. + +- **cd** + + CD number. + +- **cd\_count** + + Total count of CD. + +- **crc32** + + CRC32 of the file. + +- **uuid** + + Volume identifier (UUID). + +- **size** + + Size (MB, GB, TB). Examples: `1.2GB` (`<Size [1.2GB]>`), `430MB` (`<Size [430MB]>`). + + - `[<guessit.Size>]` (object has `magnitude` and `units`) +- **edition** + + Edition of the movie. + + - `Alternative Cut`, `Collector`, `Criterion`, `Deluxe`, `Director's Cut`, `Director's Definitive Cut`, `Extended`, `Fan`, `Festival`, `IMAX`, `Remastered`, `Special`, `Limited`, `Theatrical`, `Ultimate`, `Uncensored`, `Uncut`, `Unrated` +- **film** + + Film number of this movie. + +- **film\_title** + + Film title of this movie. + +- **film\_series** + + Film series of this movie. + +- **other** + + Other property will appear under this property. + + - `3D`, `Audio Fixed`, `Bonus`, `BT.2020`, `Classic`, `Colorized`, `Complete`, `Converted`, `Documentary`, `Dolby Vision`, `Dual Audio`, `East Coast Feed`, `Extras`, `Fan Subtitled`, `Fast Subtitled`, `Full HD`, `Hardcoded Subtitles`, `HD`, `HDR10`, `High Frame Rate`, `Hybrid`, `Variable Frame Rate`, `High Quality`, `High Resolution`, `Internal`, `Line Dubbed`, `Line Audio`, `Mic Dubbed`, `Micro HD`, `Mux`, `NTSC`, `Obfuscated`, `Open Matte`, `Original Aspect Ratio`, `Original Video`, `PAL`, `Preair`, `Proof`, `Proper`, `PS Vita`, `Read NFO`, `Region 5`, `Region C`, `Reencoded`, `Remux`, `Repost`, `Retail`, `Rip`, `Sample`, `Screener`, `SECAM`, `Standard Dynamic Range`, `Straight to Video`, `Sync Fixed`, `Trailer`, `Ultra HD`, `Upscaled`, `West Coast Feed`, `Widescreen`, `XXX` + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guessit-3.2.0/docs/sources.md new/guessit-3.3.0/docs/sources.md --- old/guessit-3.2.0/docs/sources.md 1970-01-01 01:00:00.000000000 +0100 +++ new/guessit-3.3.0/docs/sources.md 2021-02-03 23:36:36.000000000 +0100 @@ -0,0 +1,24 @@ +Getting the source code +======================= + +GuessIt is actively developed on [GitHub](https://github.com/guessit-io/guessit). + +You can either clone the public repository: + + $ git clone https://github.com/guessit-io/guessit.git + +Download the [tarball](https://github.com/guessit-io/guessit/tarball/master): + + $ curl -L https://github.com/guessit-io/guessit/tarball/master -o guessit.tar.gz + +Or download the [zipball](https://github.com/guessit-io/guessit/zipball/master): + + $ curl -L https://github.com/guessit-io/guessit/zipball/master -o guessit.zip + +Once you have a copy of the source, you can embed it in your Python package, install it into your site-packages folder like that: + + $ python setup.py install + +or use it directly from the source folder for development: + + $ python setup.py develop diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guessit-3.2.0/guessit/__version__.py new/guessit-3.3.0/guessit/__version__.py --- old/guessit-3.2.0/guessit/__version__.py 2020-12-24 00:08:38.000000000 +0100 +++ new/guessit-3.3.0/guessit/__version__.py 2021-02-03 23:36:53.000000000 +0100 @@ -4,4 +4,4 @@ Version module """ # pragma: no cover -__version__ = '3.2.0' +__version__ = '3.3.0' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guessit-3.2.0/guessit/api.py new/guessit-3.3.0/guessit/api.py --- old/guessit-3.2.0/guessit/api.py 2020-12-24 00:08:14.000000000 +0100 +++ new/guessit-3.3.0/guessit/api.py 2021-02-03 23:36:36.000000000 +0100 @@ -198,8 +198,12 @@ for match in matches: if isinstance(match.value, str): match.value = match.value.encode("ascii") - return matches.to_dict(options.get('advanced', False), options.get('single_value', False), - options.get('enforce_list', False)) + matches_dict = matches.to_dict(options.get('advanced', False), options.get('single_value', False), + options.get('enforce_list', False)) + output_input_string = options.get('output_input_string', False) + if output_input_string: + matches_dict['input_string'] = matches.input_string + return matches_dict except Exception as err: raise GuessitException(string, options) from err diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guessit-3.2.0/guessit/config/options.json new/guessit-3.3.0/guessit/config/options.json --- old/guessit-3.2.0/guessit/config/options.json 2020-12-24 00:08:14.000000000 +0100 +++ new/guessit-3.3.0/guessit/config/options.json 2021-02-03 23:36:36.000000000 +0100 @@ -416,6 +416,10 @@ "Animal Planet": "ANPL", "AnimeLab": "ANLB", "AOL": "AOL", + "AppleTV": [ + "ATVP", + "ATV+" + ], "ARD": "ARD", "BBC iPlayer": [ "iP", @@ -482,6 +486,7 @@ "HBO", "re:HBO-?Go" ], + "HBO Max": "HMAX", "HGTV": "HGTV", "History": [ "HIST", @@ -490,7 +495,10 @@ "Hulu": "HULU", "Investigation Discovery": "ID", "IFC": "IFC", - "iTunes": "iTunes", + "iTunes": [ + "iTunes", + {"pattern": "iT", "ignore_case": false} + ], "ITV": "ITV", "Knowledge Network": "KNOW", "Lifetime": "LIFE", @@ -537,6 +545,7 @@ "SeeSo" ], "Shomi": "SHMI", + "Showtime": "SHO", "Spike": "SPIK", "Spike TV": [ "SPKE", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guessit-3.2.0/guessit/options.py new/guessit-3.3.0/guessit/options.py --- old/guessit-3.2.0/guessit/options.py 2020-12-24 00:08:14.000000000 +0100 +++ new/guessit-3.3.0/guessit/options.py 2021-02-03 23:36:36.000000000 +0100 @@ -66,6 +66,8 @@ help='Display information for filename guesses as json output') output_opts.add_argument('-y', '--yaml', dest='yaml', action='store_true', default=None, help='Display information for filename guesses as yaml output') + output_opts.add_argument('-i', '--output-input-string', dest='output_input_string', action='store_true', + default=False, help='Add input_string property in the output') conf_opts = opts.add_argument_group("Configuration") conf_opts.add_argument('-c', '--config', dest='config', action='append', default=None, @@ -223,7 +225,7 @@ if value is not None and option != 'pristine': if option in merged.keys() and isinstance(merged[option], list): for val in value: - if val not in merged[option]: + if val not in merged[option] and val is not None: merged[option].append(val) elif option in merged.keys() and isinstance(merged[option], dict): merged[option] = merge_options(merged[option], value) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guessit-3.2.0/guessit/rules/properties/other.py new/guessit-3.3.0/guessit/rules/properties/other.py --- old/guessit-3.2.0/guessit/rules/properties/other.py 2020-12-24 00:08:14.000000000 +0100 +++ new/guessit-3.3.0/guessit/rules/properties/other.py 2021-02-03 23:36:36.000000000 +0100 @@ -86,7 +86,7 @@ rebulk.regex('(HD)(?P<another>Rip)', value={'other': 'HD', 'another': 'Rip'}, private_parent=True, children=True, validator={'__parent__': seps_surround}, validate_all=True) - for value in ('Screener', 'Remux', 'PAL', 'SECAM', 'NTSC', 'XXX'): + for value in ('Screener', 'Remux', 'Hybrid', 'PAL', 'SECAM', 'NTSC', 'XXX'): rebulk.string(value, value=value) rebulk.string('3D', value='3D', tags='has-neighbor') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guessit-3.2.0/guessit/rules/properties/streaming_service.py new/guessit-3.3.0/guessit/rules/properties/streaming_service.py --- old/guessit-3.2.0/guessit/rules/properties/streaming_service.py 2020-12-24 00:08:14.000000000 +0100 +++ new/guessit-3.3.0/guessit/rules/properties/streaming_service.py 2021-02-03 23:36:36.000000000 +0100 @@ -25,13 +25,22 @@ rebulk = rebulk.string_defaults(ignore_case=True).regex_defaults(flags=re.IGNORECASE, abbreviations=[dash]) rebulk.defaults(name='streaming_service', tags=['source-prefix']) + regex_prefix = 're:' + for value, items in config.items(): patterns = items if isinstance(items, list) else [items] for pattern in patterns: - if pattern.startswith('re:'): - rebulk.regex(pattern, value=value) + if isinstance(pattern, dict): + pattern_value = pattern.pop('pattern') + kwargs = pattern + pattern = pattern_value + else: + kwargs = {} + regex = kwargs.pop('regex', False) + if regex or pattern.startswith(regex_prefix): + rebulk.regex(pattern[len(regex_prefix):], value=value, **kwargs) else: - rebulk.string(pattern, value=value) + rebulk.string(pattern, value=value, **kwargs) rebulk.rules(ValidateStreamingService) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guessit-3.2.0/guessit/test/movies.yml new/guessit-3.3.0/guessit/test/movies.yml --- old/guessit-3.2.0/guessit/test/movies.yml 2020-12-24 00:08:14.000000000 +0100 +++ new/guessit-3.3.0/guessit/test/movies.yml 2021-02-03 23:36:36.000000000 +0100 @@ -1752,6 +1752,7 @@ year: 2018 other: - 3D + - Hybrid - Proper - Remux proper_count: 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guessit-3.2.0/guessit/test/rules/other.yml new/guessit-3.3.0/guessit/test/rules/other.yml --- old/guessit-3.2.0/guessit/test/rules/other.yml 2020-12-24 00:08:14.000000000 +0100 +++ new/guessit-3.3.0/guessit/test/rules/other.yml 2021-02-03 23:36:36.000000000 +0100 @@ -80,6 +80,9 @@ ? Remux : other: Remux +? Hybrid +: other: Hybrid + ? 3D.2019 : other: 3D diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guessit-3.2.0/guessit/test/streaming_services.yaml new/guessit-3.3.0/guessit/test/streaming_services.yaml --- old/guessit-3.2.0/guessit/test/streaming_services.yaml 2020-12-24 00:08:14.000000000 +0100 +++ new/guessit-3.3.0/guessit/test/streaming_services.yaml 2021-02-03 23:36:36.000000000 +0100 @@ -577,13 +577,13 @@ release_group: BTW type: episode -# Streaming service: RT?? One +# Streaming service: RTE One ? Show.Name.S10E01.576p.RTE.WEBRip.AAC2.0.H.264-RTN : title: Show Name season: 10 episode: 1 screen_size: 576p - streaming_service: RT?? One + streaming_service: RTE One source: Web other: Rip audio_codec: AAC @@ -818,7 +818,6 @@ episode: 0 episode_details: Pilot episode_title: Pilot - language: zh other: - Proper - Rip @@ -862,7 +861,6 @@ ? What.The.Fuck.France.S01E01.Le.doublage.CNLP.WEBRip.AAC2.0.x264-TURTLE : audio_channels: '2.0' audio_codec: AAC - country: FR episode: 1 episode_title: Le doublage other: Rip @@ -870,7 +868,7 @@ season: 1 source: Web streaming_service: Canal+ - title: What The Fuck + title: What The Fuck France type: episode video_codec: H.264 @@ -943,14 +941,13 @@ ? The.Amazing.Race.Canada.S03.720p.CTV.WEBRip.AAC2.0.H.264-BTW : audio_channels: '2.0' audio_codec: AAC - country: CA other: Rip release_group: BTW screen_size: 720p season: 3 source: Web streaming_service: CTV - title: The Amazing Race + title: The Amazing Race Canada type: episode video_codec: H.264 @@ -1240,13 +1237,12 @@ ? Big.Brother.Canada.S05.GLBL.WEBRip.AAC2.0.H.264-RTN : audio_channels: '2.0' audio_codec: AAC - country: CA other: Rip release_group: RTN season: 5 source: Web streaming_service: Global - title: Big Brother + title: Big Brother Canada type: episode video_codec: H.264 @@ -1330,7 +1326,6 @@ ? Handmade.in.Japan.S01E01.720p.iP.WEBRip.AAC2.0.H.264-SUP : audio_channels: '2.0' audio_codec: AAC - country: JP episode: 1 other: Rip release_group: SUP @@ -1338,7 +1333,7 @@ season: 1 source: Web streaming_service: BBC iPlayer - title: Handmade in + title: Handmade in Japan type: episode video_codec: H.264 @@ -1463,9 +1458,8 @@ ? Bunsen.is.a.Beast.S01E23.Guinea.Some.Lovin.1080p.NICK.WEBRip.AAC2.0.x264-TVSmash : audio_channels: '2.0' audio_codec: AAC - country: GN episode: 23 - episode_title: Some Lovin + episode_title: Guinea Some Lovin other: Rip release_group: TVSmash screen_size: 1080p @@ -1538,13 +1532,14 @@ episode_title: The Masquerade other: Rip part: 2 - release_group: VP9-BTW + release_group: BTW screen_size: 1080p season: 2 source: Web streaming_service: YouTube Red title: Escape The Night type: episode + video_codec: VP9 ? Escape.The.Night.S02E02.The.Masquerade.Part.II.2160p.RED.WEBRip.AAC5.1.VP9-BTW : audio_channels: '5.1' @@ -1553,13 +1548,14 @@ episode_title: The Masquerade other: Rip part: 2 - release_group: VP9-BTW + release_group: BTW screen_size: 2160p season: 2 source: Web streaming_service: YouTube Red title: Escape The Night type: episode + video_codec: VP9 ? Escape.The.Night.S02E02.The.Masquerade.Part.II.720p.RED.WEBRip.AAC5.1.VP9-BTW : audio_channels: '5.1' @@ -1568,13 +1564,14 @@ episode_title: The Masquerade other: Rip part: 2 - release_group: VP9-BTW + release_group: BTW screen_size: 720p season: 2 source: Web streaming_service: YouTube Red title: Escape The Night type: episode + video_codec: VP9 ? The.Family.Law.S02E01.720p.SBS.WEB-DL.AAC2.0.H.264-BTN : audio_channels: '2.0' @@ -1892,7 +1889,7 @@ season: 1 source: Web streaming_service: Vimeo - title: '555' + # title: '555' type: episode video_codec: H.264 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guessit-3.2.0/guessit/test/test_main.py new/guessit-3.3.0/guessit/test/test_main.py --- old/guessit-3.2.0/guessit/test/test_main.py 2020-12-24 00:08:14.000000000 +0100 +++ new/guessit-3.3.0/guessit/test/test_main.py 2021-02-03 23:36:36.000000000 +0100 @@ -1,16 +1,25 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- # pylint: disable=no-self-use, pointless-statement, missing-docstring, invalid-name - +import json import os +import sys import pytest +from _pytest.capture import CaptureFixture from ..__main__ import main __location__ = os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__))) +# Prevent output from spamming the console +@pytest.fixture(scope="function", autouse=True) +def no_stdout(monkeypatch): + with open(os.devnull, "w") as f: + monkeypatch.setattr(sys, "stdout", f) + yield + def test_main_no_args(): main([]) @@ -70,3 +79,22 @@ def test_main_version(): main(['--version']) + + +def test_json_output_input_string(capsys: CaptureFixture): + main(['--json', '--output-input-string', 'test.avi']) + + outerr = capsys.readouterr() + data = json.loads(outerr.out) + + assert 'input_string' in data + assert data['input_string'] == 'test.avi' + + +def test_json_no_output_input_string(capsys: CaptureFixture): + main(['--json', 'test.avi']) + + outerr = capsys.readouterr() + data = json.loads(outerr.out) + + assert 'input_string' not in data diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guessit-3.2.0/guessit/test/test_yml.py new/guessit-3.3.0/guessit/test/test_yml.py --- old/guessit-3.2.0/guessit/test/test_yml.py 2020-12-24 00:08:14.000000000 +0100 +++ new/guessit-3.3.0/guessit/test/test_yml.py 2021-02-03 23:36:36.000000000 +0100 @@ -52,16 +52,16 @@ if self.ok: return self.string + ': OK!' if self.warning: - return '%s%s: WARNING! (valid=%i, extra=%i)' % ('-' if self.negates else '', self.string, len(self.valid), - len(self.extra)) + return '%s%s: WARNING! (valid=%i, extra=%s)' % ('-' if self.negates else '', self.string, len(self.valid), + self.extra) if self.error: - return '%s%s: ERROR! (valid=%i, missing=%i, different=%i, extra=%i, others=%i)' % \ - ('-' if self.negates else '', self.string, len(self.valid), len(self.missing), len(self.different), - len(self.extra), len(self.others)) - - return '%s%s: UNKOWN! (valid=%i, missing=%i, different=%i, extra=%i, others=%i)' % \ - ('-' if self.negates else '', self.string, len(self.valid), len(self.missing), len(self.different), - len(self.extra), len(self.others)) + return '%s%s: ERROR! (valid=%i, extra=%s, missing=%s, different=%s, others=%s)' % \ + ('-' if self.negates else '', self.string, len(self.valid), self.extra, self.missing, + self.different, self.others) + + return '%s%s: UNKOWN! (valid=%i, extra=%s, missing=%s, different=%s, others=%s)' % \ + ('-' if self.negates else '', self.string, len(self.valid), self.extra, self.missing, self.different, + self.others) @property def details(self): @@ -109,7 +109,7 @@ for filename in filenames: name, ext = os.path.splitext(filename) filepath = os.path.join(dirpath_rel, filename) - if ext == '.yml' and (not predicate or predicate(filepath)): + if ext in ['.yml', '.yaml'] and (not predicate or predicate(filepath)): files.append(filepath) ids.append(os.path.join(dirpath_rel, name)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guessit-3.2.0/guessit.egg-info/PKG-INFO new/guessit-3.3.0/guessit.egg-info/PKG-INFO --- old/guessit-3.2.0/guessit.egg-info/PKG-INFO 2020-12-24 00:08:46.000000000 +0100 +++ new/guessit-3.3.0/guessit.egg-info/PKG-INFO 2021-02-03 23:37:01.000000000 +0100 @@ -1,19 +1,19 @@ Metadata-Version: 2.1 Name: guessit -Version: 3.2.0 +Version: 3.3.0 Summary: GuessIt - a library for guessing information from video filenames. Home-page: http://guessit.io Author: R??mi Alvergnat Author-email: toilal....@gmail.com License: LGPLv3 -Download-URL: https://pypi.python.org/packages/source/g/guessit/guessit-3.2.0.tar.gz +Download-URL: https://pypi.python.org/packages/source/g/guessit/guessit-3.3.0.tar.gz Description: GuessIt ======= - [](https://pypi.python.org/pypi/guessit) - []() + [](https://pypi.python.org/pypi/guessit) + []() [](https://github.com/guessit-io/guessit/actions?query=workflow%3Aci) - [](https://coveralls.io/github/guessit-io/guessit?branch=master) + [](https://coveralls.io/github/guessit-io/guessit?branch=master) [](https://github.com/relekang/python-semantic-release) GuessIt is a python library that extracts as much information as @@ -200,6 +200,20 @@ <!--next-version-placeholder--> + ## v3.3.0 (2021-02-03) + ### Feature + * Add `--output-input-string` option ([#665](https://github.com/guessit-io/guessit/issues/665)) ([`bac6143`](https://github.com/guessit-io/guessit/commit/bac6143559d437edc34e2fde0b77172567e4451d)) + * **streaming_service:** Add `Showtime`, `HBO` and `AppleTV` ([#661](https://github.com/guessit-io/guessit/issues/661)) ([`dc55eaa`](https://github.com/guessit-io/guessit/commit/dc55eaa6d0cdf9d5552c4dbaaa29c8df8365691c)) + * **other:** Add `Hybrid` support ([#669](https://github.com/guessit-io/guessit/issues/669)) ([`522af53`](https://github.com/guessit-io/guessit/commit/522af5371cac467dd1f03abb08df9cbf5b409126)) + + ### Fix + * **options:** Avoid appending `None` values to list when merging options ([#658](https://github.com/guessit-io/guessit/issues/658)) ([`42978c9`](https://github.com/guessit-io/guessit/commit/42978c909c4e5ebb2cc95b94583f80d73759f29a)) + * **streaming_service:** Add iT keyword support for iTunes ([#669](https://github.com/guessit-io/guessit/issues/669)) ([`51e0021`](https://github.com/guessit-io/guessit/commit/51e00217947d8b993bcfb091b012da803245f698)) + * **streaming_service:** Fix regex patterns declared with `re:` prefix ([`e02323f`](https://github.com/guessit-io/guessit/commit/e02323f6c1d1e74ef32dfbcfb3ab69e367d11a00)) + + ### Documentation + * **readme:** Avoid mixed-content in github pages ([`2e1f29c`](https://github.com/guessit-io/guessit/commit/2e1f29ca47f8586930ca092b31f2431a1f3df52f)) + ## v3.2.0 (2020-12-23) ### Feature * Add python 3.9 support, drop python 2.7 support ([`2c8b25e`](https://github.com/guessit-io/guessit/commit/2c8b25e77fb424d63f9f73318e85dd96cef865e0)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guessit-3.2.0/guessit.egg-info/SOURCES.txt new/guessit-3.3.0/guessit.egg-info/SOURCES.txt --- old/guessit-3.2.0/guessit.egg-info/SOURCES.txt 2020-12-24 00:08:46.000000000 +0100 +++ new/guessit-3.3.0/guessit.egg-info/SOURCES.txt 2021-02-03 23:37:01.000000000 +0100 @@ -1,7 +1,10 @@ .coveragerc +.dockerignore +.gitignore AUTHORS.md CHANGELOG.md CONTRIBUTING.md +Dockerfile LICENSE MANIFEST.in README.md @@ -13,6 +16,15 @@ setup.cfg setup.py tox.ini +.github/workflows/ci.yml +.github/workflows/mkdocs.yml +docs/CNAME +docs/configuration.md +docs/index.md +docs/migration.md +docs/migration2to3.md +docs/properties.md +docs/sources.md guessit/__init__.py guessit/__main__.py guessit/__version__.py