Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump version to 2.2.0 #1131

Merged
merged 13 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish

on:
release:
types: [published]

permissions:
contents: read

jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/subliminal
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
19 changes: 19 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Read the Docs configuration file for Sphinx projects
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

version: 2

build:
os: ubuntu-22.04
tools:
python: "3.12"

python:
install:
- method: pip
path: .
extra_requirements:
- docs

sphinx:
configuration: docs/conf.py
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.9.19-alpine3.20
FROM python:3.12-alpine

MAINTAINER Antoine Bertin <diaoulael@gmail.com>

Expand All @@ -8,8 +8,7 @@ ARG UNRAR_VERSION=6.2.6

RUN \
if [ "$BUILD_WITH_UNRAR" = true ]; then \
apk add -U --update --no-cache --virtual=build-dependencies \
build-base curl && \
apk add -U --update --no-cache --virtual=build-dependencies build-base curl && \
echo "**** install unrar from source ****" && \
mkdir /tmp/unrar && \
curl -o /tmp/unrar.tar.gz -L "https://www.rarlab.com/rar/unrarsrc-${UNRAR_VERSION}.tar.gz" && \
Expand All @@ -19,7 +18,7 @@ if [ "$BUILD_WITH_UNRAR" = true ]; then \
install -v -m755 unrar /usr/local/bin && \
apk del build-dependencies curl && \
rm -rf /tmp/unrar /tmp/unrar.tar.gz; \
fi
fi

RUN mkdir -p /usr/src/app /usr/src/cache

Expand Down
44 changes: 35 additions & 9 deletions HISTORY.rst
Original file line number Diff line number Diff line change
@@ -1,17 +1,43 @@
Changelog
---------

2.1.1
2.2.0
^^^^^
**release date:** *not released*

* Change default encoding of downloaded subtitle to 'utf-8' (not the original encoding)
* Switch podnapisi provider to use JSON API
* Add support for episodes with season 0 in podnapisi provider
* Disabled addic7ed provider due to required captcha for authentication
* Disabled shooter provider since it doesn't filter by language
**release date:** 2024-06-24

* Drop python2 support, the supported versions are `>=3.8,<=3.12`.
* Load CLI options from a configuration file with the ``--config/-c`` option (`#1084 <https://github.com/Diaoul/subliminal/pull/1084>`_).
* Change default encoding of downloaded subtitles to 'utf-8' (not the original encoding). Use the ``--original-encoding`` cli option to recover the previous default behavior (`#1125 <https://github.com/Diaoul/subliminal/pull/1125>`_).
* Add opensubtitlescom provider
* Add gestdown provider
* Add tmdb refiner (requires a personal API key)
* Fix tvsubtitles provider
* Fix opensubtitles provider
* Fix napiprojekt provider
* Fix podnapisi provider to use JSON API
* Fix addic7ed provider
* Remove thesubdb provider
* Remove argenteam provider
* Remove shooter provider
* Remove legendastv provider

* Use `pyproject.toml` to specify the package configurations.* Add pre-commit hook (`#1115 <https://github.com/Diaoul/subliminal/pull/1115>`_).
* Use ruff to lint and format
* Use mypy to check types
* Add type annotations
* Drop dependencies: pysrt, appdirs, six, pytz
* Add dependencies:
- click-option-group>=0.5.6
- platformdirs>=4.2
- pysubs2>=1.7
- srt>=3.5
- tomli>=2
* Bump dependency versions:
- babelfish>=0.6.1
- chardet>=5.0
- click>=8.0
- dogpile.cache>=1.0
- enzyme>=0.5.0
- stevedore>=3.0

2.1.0
^^^^^
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ include CONTRIBUTING.md
include Dockerfile
include .dockerignore
include .pre-commit-config.yaml
include .readthedocs.yaml
include tox.ini

graft docs
Expand Down
3 changes: 2 additions & 1 deletion docs/user/how_it_works.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,5 @@ Various libraries are used by subliminal and are key to its success:
* `dogpile.cache <http://dogpilecache.readthedocs.org>`_ to cache intermediate search results
* `stevedore <http://docs.openstack.org/developer/stevedore/>`_ to manage the provider entry point
* `chardet <http://chardet.readthedocs.org>`_ to detect subtitles' encoding
* `srt <https://github.com/cdown/srt>`_ to validate downloaded subtitles
* `srt <https://github.com/cdown/srt>`_ to validate downloaded SubRip subtitles
* `pysub2 <https://github.com/tkarabela/pysubs2>`_ to validate and convert downloaded subtitles to other formats.
11 changes: 11 additions & 0 deletions docs/user/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,24 @@ Download English subtitles::
only. Otherwise you will get banned from the providers for abuse due to too many requests. If subliminal didn't
find subtitles for an old video, it's unlikely it will find subtitles for that video ever anyway.

You can use a configuration file in the `TOML <https://toml.io/>`_ format with the ``--config/-c`` option. If no configuration file is
provided, it looks for a ``subliminal.toml`` file in the default configuration folder for the application. This folder is
`OS dependent <https://github.com/platformdirs/platformdirs>`_:

- Linux: ``/home/<user>/.config/subliminal/subliminal.toml``
- MacOS: ``/Users/<user>/Library/Application Support/subliminal/subliminal.toml``
- Windows: ``C:\\Users\\<user>\\AppData\\Local\\Acme\\subliminal\\subliminal.toml``

See :ref:`cli` for more details on the available commands and options.


Nautilus/Nemo integration
-------------------------
See the dedicated `project page <https://github.com/Diaoul/nautilus-subliminal>`_ for more information.

Dolphin integration
-------------------
See `this Gist <https://gist.github.com/maurocolella/03a9f02c56b1a90c64f05683e2840d57>`_.

High level API
--------------
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,11 @@ dependencies = [
"click>=8.0",
"click-option-group>=0.5.6",
"dogpile.cache>=1.0",
"enzyme>=0.4.1",
"enzyme>=0.5.0",
"guessit>=3.0.0",
"platformdirs>=4.2",
"pysubs2>=1.7",
"rarfile>=2.7",
"rebulk>=3.0",
"requests>=2.0",
"srt>=3.5",
"stevedore>=3.0",
Expand Down
2 changes: 1 addition & 1 deletion subliminal/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from __future__ import annotations

__title__: str = 'subliminal'
__version__: str = '2.1.1-dev'
__version__: str = '2.2.0'
__short_version__: str = '.'.join(__version__.split('.')[:2])
__author__: str = 'Antoine Bertin'
__license__: str = 'MIT'
Expand Down
Loading