mirror of
https://github.com/blacktwin/JBOPS.git
synced 2025-12-11 19:37:18 +00:00
Add docker
This commit is contained in:
parent
e097a07ca5
commit
b2ccbe42ce
9
Dockerfile
Normal file
9
Dockerfile
Normal file
@ -0,0 +1,9 @@
|
||||
FROM python:3-slim
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
COPY . ./
|
||||
RUN pip install -r requirements.txt
|
||||
|
||||
RUN mkdir -p /root/.config/plexapi
|
||||
RUN cp config.ini /root/.config/plexapi/config.ini
|
||||
49
README.md
49
README.md
@ -4,14 +4,51 @@
|
||||
|
||||
Most of these scripts utilize a combination of [Tautulli](https://github.com/Tautulli/Tautulli), [python-plexapi](https://github.com/pkkid/python-plexapi), and [requests](http://docs.python-requests.org/en/master/user/install/#install).
|
||||
|
||||
For use of config.ini for common variables please use [plexapi.CONFIG](http://python-plexapi.readthedocs.io/en/latest/configuration.html)
|
||||
## Usage
|
||||
|
||||
Default location `~/.config/plexapi/config.ini`
|
||||
```python
|
||||
# To find path
|
||||
import plexapi
|
||||
print(plexapi.CONFIG_PATH)
|
||||
Clone this repo to get started!
|
||||
|
||||
### Docker (with make)
|
||||
|
||||
Edit the config.ini file to include your information.
|
||||
```
|
||||
make build
|
||||
make ARGS="utility/library_growth.py -h"
|
||||
```
|
||||
|
||||
### Docker (without make)
|
||||
|
||||
Edit the config.ini file to include your information
|
||||
|
||||
```
|
||||
docker build -t jbops .
|
||||
docker run --rm -v .:/usr/src/app jbops python3 utility/library_growth.py -h
|
||||
```
|
||||
|
||||
### Without Docker
|
||||
|
||||
> [!NOTE]
|
||||
> You can either use the config.ini file to configure the scripts or you can edit each of the scripts manually.
|
||||
> For use of config.ini for common variables please use [plexapi.CONFIG](http://python-plexapi.readthedocs.io/en/latest/configuration.html)
|
||||
> Default location `~/.config/plexapi/config.ini`
|
||||
> ```python
|
||||
> # To find path
|
||||
> import plexapi
|
||||
> print(plexapi.CONFIG_PATH)
|
||||
> ```
|
||||
|
||||
Install the required Python Packages
|
||||
```
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
Run the scripts
|
||||
```
|
||||
python3 utility/library_growth.py -h
|
||||
```
|
||||
|
||||
> [!TIP]
|
||||
> Each of the scripts has a help menu that can be displayed with either `-h` or `--help`
|
||||
|
||||
### Contact
|
||||
[](https://discord.gg/tQcWEUp) [](https://www.reddit.com/user/Blacktwin/) [](https://forums.plex.tv/u/blacktwin) [](https://github.com/blacktwin/JBOPS/issues/new)
|
||||
|
||||
11
makefile
Normal file
11
makefile
Normal file
@ -0,0 +1,11 @@
|
||||
.DEFAULT_GOAL := run
|
||||
|
||||
run:
|
||||
@if [ -n "$(ARGS)" ]; then \
|
||||
docker run --rm -v .:/usr/src/app jbops python3 $(ARGS); \
|
||||
else \
|
||||
echo "No script passed! Example: make ARGS='utility/library_growth.py'"; \
|
||||
fi
|
||||
|
||||
build:
|
||||
docker build -t jbops .
|
||||
@ -1,7 +1,13 @@
|
||||
#---------------------------------------------------------
|
||||
# Potential requirements.
|
||||
# pip install -r requirements.txt
|
||||
#---------------------------------------------------------
|
||||
requests
|
||||
plexapi
|
||||
urllib3
|
||||
flatten_json==0.1.14
|
||||
future==0.18.3
|
||||
gmusicapi==13.0.0
|
||||
google_api_python_client==2.113.0
|
||||
httplib2==0.22.0
|
||||
matplotlib==3.8.2
|
||||
oauth2client==4.1.3
|
||||
Pillow==10.2.0
|
||||
plexapi==4.15.7
|
||||
psutil==5.9.7
|
||||
python_twitter==3.5
|
||||
Requests==2.31.0
|
||||
urllib3==2.1.0
|
||||
Loading…
Reference in New Issue
Block a user