subscleaner


Namesubscleaner JSON
Version 1.1.1 PyPI version JSON
download
home_pagehttps://gitlab.com/rogs/subscleaner/
SummaryRemove advertisements from subtitle files
upload_time2024-03-29 00:17:51
maintainerNone
docs_urlNone
authorRoger Gonzalez
requires_python<4.0,>=3.9
licenseGPL-3.0-or-later
keywords subtitles subs
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Subscleaner

<p align="center">
  <img src="https://gitlab.com/uploads/-/system/project/avatar/55502917/logo.jpg" alt="subscleaner"/>
</p>

[![PyPI version](https://badge.fury.io/py/subscleaner.svg)](https://badge.fury.io/py/subscleaner)
[![codecov](https://codecov.io/gl/rogs/subscleaner/graph/badge.svg?token=JDAY18ZIFZ)](https://codecov.io/gl/rogs/subscleaner)
[![docker](https://img.shields.io/badge/Docker-subscleaner-blue)](https://hub.docker.com/r/rogsme/subscleaner)

Subscleaner is a Python script that removes advertisements from subtitle files. It's designed to help you enjoy your favorite shows and movies without the distraction of unwanted ads in the subtitles.

## Features

- Removes a predefined list of advertisement patterns from subtitle files.
- Supports various subtitle formats through the pysrt library.
- Automatically detects the encoding of subtitle files using chardet.
- Available as a Docker image for easy deployment and usage.

## Installation

### Automatic installation

To install with `pip`:

``` sh
sudo pip install subscleaner
```

### Manual installation

To install Subscleaner, you'll need Python 3.9 or higher. It's recommended to use Poetry for managing the project dependencies.

1. Clone the repository:

``` sh
git clone https://gitlab.com/rogs/subscleaner.git
```

2. Navigate to the project directory:

``` sh
cd subscleaner
```

3. Install the dependencies with Poetry:

``` sh
poetry install
```

### Docker

Subscleaner is also available as a Docker image. You can pull the image from Docker Hub:

``` sh
docker pull rogsme/subscleaner
```

## Usage

If you installed the package automatically, you can pipe a list of subtitle filenames into the script:

``` sh
find /your/media/location -name "*.srt" | subscleaner
```

If you installed the package manually:

``` sh
find /your/media/location -name "*.srt" | poetry run subscleaner
```

Alternatively, you can use the script directly if you've installed the dependencies globally:

``` sh
find /your/media/location -name "*.srt" | python3 subscleaner.py
```

### Docker

To use the Docker image, you can run the container with the following command:

``` sh
docker run -e CRON="0 0 * * *" -v /your/media/location:/files rogsme/subscleaner
```

- Replace `0 0 * * *` with your desired cron schedule for running the script.
- Replace `/your/media/location` with the path to your media directory containing the subtitle files.

The Docker container will run the Subscleaner script according to the specified cron schedule and process the subtitle files in the mounted media directory.

#### If you are using YAMS

YAMS is a highly opinionated media server. You can know more about it here: https://yams.media/

Add this container to your `docker-compose.custom.yaml`:

``` sh
  subscleaner:
    image: rogsme/subscleaner
    environment:
      - CRON=0 0 * * *
    volumes:
      - ${MEDIA_DIRECTORY}:/files
```

To get more information on how to add your own containers in YAMS: https://yams.media/advanced/add-your-own-containers/

## Contributing

Contributions are welcome! If you have any suggestions or improvements, feel free to fork the repository and submit a pull request.

## License

Subscleaner is licensed under the GNU General Public License v3.0 or later. See the [LICENSE](https://gitlab.com/rogs/subscleaner/-/blob/master/LICENSE) file for more details.

## Acknowledgments

This repository is a rewrite of this Github repository: https://github.com/FraMecca/subscleaner.

Thanks to [FraMecca](https://github.com/FraMecca/) in Github!

            

Raw data

            {
    "_id": null,
    "home_page": "https://gitlab.com/rogs/subscleaner/",
    "name": "subscleaner",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": null,
    "keywords": "subtitles, subs",
    "author": "Roger Gonzalez",
    "author_email": "roger@rogs.me",
    "download_url": "https://files.pythonhosted.org/packages/79/af/5890ef83807cdd8b39f98b5e14467d79e047b0f857093d7ec2210adf73bb/subscleaner-1.1.1.tar.gz",
    "platform": null,
    "description": "# Subscleaner\n\n<p align=\"center\">\n  <img src=\"https://gitlab.com/uploads/-/system/project/avatar/55502917/logo.jpg\" alt=\"subscleaner\"/>\n</p>\n\n[![PyPI version](https://badge.fury.io/py/subscleaner.svg)](https://badge.fury.io/py/subscleaner)\n[![codecov](https://codecov.io/gl/rogs/subscleaner/graph/badge.svg?token=JDAY18ZIFZ)](https://codecov.io/gl/rogs/subscleaner)\n[![docker](https://img.shields.io/badge/Docker-subscleaner-blue)](https://hub.docker.com/r/rogsme/subscleaner)\n\nSubscleaner is a Python script that removes advertisements from subtitle files. It's designed to help you enjoy your favorite shows and movies without the distraction of unwanted ads in the subtitles.\n\n## Features\n\n- Removes a predefined list of advertisement patterns from subtitle files.\n- Supports various subtitle formats through the pysrt library.\n- Automatically detects the encoding of subtitle files using chardet.\n- Available as a Docker image for easy deployment and usage.\n\n## Installation\n\n### Automatic installation\n\nTo install with `pip`:\n\n``` sh\nsudo pip install subscleaner\n```\n\n### Manual installation\n\nTo install Subscleaner, you'll need Python 3.9 or higher. It's recommended to use Poetry for managing the project dependencies.\n\n1. Clone the repository:\n\n``` sh\ngit clone https://gitlab.com/rogs/subscleaner.git\n```\n\n2. Navigate to the project directory:\n\n``` sh\ncd subscleaner\n```\n\n3. Install the dependencies with Poetry:\n\n``` sh\npoetry install\n```\n\n### Docker\n\nSubscleaner is also available as a Docker image. You can pull the image from Docker Hub:\n\n``` sh\ndocker pull rogsme/subscleaner\n```\n\n## Usage\n\nIf you installed the package automatically, you can pipe a list of subtitle filenames into the script:\n\n``` sh\nfind /your/media/location -name \"*.srt\" | subscleaner\n```\n\nIf you installed the package manually:\n\n``` sh\nfind /your/media/location -name \"*.srt\" | poetry run subscleaner\n```\n\nAlternatively, you can use the script directly if you've installed the dependencies globally:\n\n``` sh\nfind /your/media/location -name \"*.srt\" | python3 subscleaner.py\n```\n\n### Docker\n\nTo use the Docker image, you can run the container with the following command:\n\n``` sh\ndocker run -e CRON=\"0 0 * * *\" -v /your/media/location:/files rogsme/subscleaner\n```\n\n- Replace `0 0 * * *` with your desired cron schedule for running the script.\n- Replace `/your/media/location` with the path to your media directory containing the subtitle files.\n\nThe Docker container will run the Subscleaner script according to the specified cron schedule and process the subtitle files in the mounted media directory.\n\n#### If you are using YAMS\n\nYAMS is a highly opinionated media server. You can know more about it here: https://yams.media/\n\nAdd this container to your `docker-compose.custom.yaml`:\n\n``` sh\n  subscleaner:\n    image: rogsme/subscleaner\n    environment:\n      - CRON=0 0 * * *\n    volumes:\n      - ${MEDIA_DIRECTORY}:/files\n```\n\nTo get more information on how to add your own containers in YAMS: https://yams.media/advanced/add-your-own-containers/\n\n## Contributing\n\nContributions are welcome! If you have any suggestions or improvements, feel free to fork the repository and submit a pull request.\n\n## License\n\nSubscleaner is licensed under the GNU General Public License v3.0 or later. See the [LICENSE](https://gitlab.com/rogs/subscleaner/-/blob/master/LICENSE) file for more details.\n\n## Acknowledgments\n\nThis repository is a rewrite of this Github repository: https://github.com/FraMecca/subscleaner.\n\nThanks to [FraMecca](https://github.com/FraMecca/) in Github!\n",
    "bugtrack_url": null,
    "license": "GPL-3.0-or-later",
    "summary": "Remove advertisements from subtitle files",
    "version": "1.1.1",
    "project_urls": {
        "Documentation": "https://gitlab.com/rogs/subscleaner/-/blob/master/README.md",
        "Homepage": "https://gitlab.com/rogs/subscleaner/",
        "Repository": "https://gitlab.com/rogs/subscleaner/"
    },
    "split_keywords": [
        "subtitles",
        " subs"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "eea15d6919dffcb4729ce4b1c8dd2d2aad3cde5a4ce717696564f92e2bd2ac77",
                "md5": "8cfb70e41791d0541a4e749289faeb23",
                "sha256": "45f4591c26740f50bc597abea3719625f8ed45a1630fae7c6bb1d585190c127b"
            },
            "downloads": -1,
            "filename": "subscleaner-1.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8cfb70e41791d0541a4e749289faeb23",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 16803,
            "upload_time": "2024-03-29T00:17:36",
            "upload_time_iso_8601": "2024-03-29T00:17:36.759341Z",
            "url": "https://files.pythonhosted.org/packages/ee/a1/5d6919dffcb4729ce4b1c8dd2d2aad3cde5a4ce717696564f92e2bd2ac77/subscleaner-1.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "79af5890ef83807cdd8b39f98b5e14467d79e047b0f857093d7ec2210adf73bb",
                "md5": "cb6448884b550e376d08f2f71176a4ba",
                "sha256": "ed71e12538aae751659a68c45bc250b2770e593895d8ff7df5bc9588b4fd8e5c"
            },
            "downloads": -1,
            "filename": "subscleaner-1.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "cb6448884b550e376d08f2f71176a4ba",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 16170,
            "upload_time": "2024-03-29T00:17:51",
            "upload_time_iso_8601": "2024-03-29T00:17:51.397250Z",
            "url": "https://files.pythonhosted.org/packages/79/af/5890ef83807cdd8b39f98b5e14467d79e047b0f857093d7ec2210adf73bb/subscleaner-1.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-29 00:17:51",
    "github": false,
    "gitlab": true,
    "bitbucket": false,
    "codeberg": false,
    "gitlab_user": "rogs",
    "gitlab_project": "subscleaner",
    "lcname": "subscleaner"
}
        
Elapsed time: 0.24798s