summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorRoger Gonzalez <roger@rogs.me>2024-03-09 12:19:03 -0300
committerRoger Gonzalez <roger@rogs.me>2024-03-09 12:19:03 -0300
commit48c8e081139fef0eb596c174dfa16be044349495 (patch)
treec2954c112606abc805124a3eeb1dd4f9a8e75988 /README.md
parent8db41648d4c4af25aff269854fd9695fe6c96c3b (diff)
Added docker configuration
Diffstat (limited to 'README.md')
-rw-r--r--README.md39
1 files changed, 39 insertions, 0 deletions
diff --git a/README.md b/README.md
index 075c009..3183fe3 100644
--- a/README.md
+++ b/README.md
@@ -14,6 +14,7 @@ Subscleaner is a Python script that removes advertisements from subtitle files.
- 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
@@ -47,6 +48,14 @@ cd subscleaner
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:
@@ -67,6 +76,36 @@ Alternatively, you can use the script directly if you've installed the dependenc
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.