From 4933d6214435a969b794806fa369d701befb6d89 Mon Sep 17 00:00:00 2001 From: Robert Thomas <31854736+wolveix@users.noreply.github.com> Date: Thu, 14 Dec 2023 03:27:55 +0000 Subject: [PATCH] Code cleanup --- .github/workflows/docker.yml | 7 +- Dockerfile | 5 +- README.md | 35 +- docs/help/index.html | 12 +- docs/index.html | 38 +- docs/install.sh | 20 +- docs/versions/index.html | 66 +- plexus | 1294 ++++++++++++++++------------------ 8 files changed, 731 insertions(+), 746 deletions(-) mode change 100644 => 100755 plexus diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 8702326..0884a80 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -1,9 +1,6 @@ name: Docker on: push -env: - IMAGE_NAME: '${{ github.event.repository.name }}' - jobs: push: runs-on: ubuntu-latest @@ -11,14 +8,14 @@ jobs: - uses: actions/checkout@v2 - name: Log into registry - run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin + run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin - name: Build image run: docker build . --file Dockerfile --tag image - name: Push image to Github Packages run: | - IMAGE_ID=docker.pkg.github.com/${{ github.repository }}/$IMAGE_NAME + IMAGE_ID=ghcr.io/${{ github.repository }} IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') diff --git a/Dockerfile b/Dockerfile index eb558cd..2c62e6d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,11 @@ FROM jrottenberg/ffmpeg:4.1-alpine +RUN apk --no-cache add bash curl rsync unzip + COPY plexus /usr/bin/plexus RUN chmod u+x /usr/bin/plexus -RUN apk update && \ - apk add bash curl rsync unzip - RUN curl https://rclone.org/install.sh | bash WORKDIR /root/.config/plexus diff --git a/README.md b/README.md index 9a93f8f..43c1b39 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ You can automatically install Plexus by running the following line via a support curl https://plexus.wolveix.com/install.sh | sudo bash ``` -If you don't have superuser priviledges or are using macOS, use this instead: +If you don't have superuser privileges or are using macOS, use this instead: ``` shell curl https://plexus.wolveix.com/install.sh | bash ``` @@ -48,13 +48,13 @@ mkdir -p $HOME/.config/plexus $HOME/.plexus/encode/convert $HOME/.plexus/encode/ Download the default config file and move it into the correct location: ``` shell -curl -O https://raw.githubusercontent.com/Wolveix/Plexus/master/plexus.conf +curl -O https://raw.githubusercontent.com/wolveix/plexus/master/plexus.conf mv plexus.conf "$HOME"/.config/plexus/ ``` Next, download the executable itself: ``` shell -curl -O https://raw.githubusercontent.com/Wolveix/Plexus/master/plexus +curl -O https://raw.githubusercontent.com/wolveix/plexus/master/plexus ``` Finally, correct the file permissions and move it into your respective operating system's application directory. The following example is for Linux: @@ -95,27 +95,40 @@ video_codec="h264" video_library="libx264" ``` -Without changing any options, Plexus will create a list of your files that either don't use the MKV container, x264 video codec or the aac audio codec. You can then process this list by running the encode command which will move through the list and re-encode each file to fit the above three conditions. +Without changing any options, Plexus will create a list of your media files that either don't use the MKV container, +x264 video codec, or the aac audio codec. You can then process this list by running the encode command which will move +through the list and re-encode each file to fit the above three conditions. -Original files are replaced by default, but you can disable this by changing the `force_overwrite` value to `false`. You can edit the config file directly (`$HOME/.config/plexus/plexus.conf`) or you can use the built-in config function by running `plexus config`. +Original files are overwritten by default, you can disable this by setting `force_overwrite` to `false`. You can edit +the config file directly (`$HOME/.config/plexus/plexus.conf`) or you can use the built-in config function by +running `plexus config`. ### Usage -This somewhat varies depending on whether you're planning on encoding local media or media contained on an [RClone remote](https://rclone.org/remote_setup/). Firstly, specify your ideal codecs via the `config` function. + +This varies depending on whether you're planning on encoding local media or media contained on +an [RClone remote](https://rclone.org/remote_setup/). Begin by specifying your preferred codecs via the `config` +function. #### Local Media Run `plexus list -d /path/to/media` to start building a recursive list of your media which needs to be re-encoded. -Once the list function has finished its process, you can begin the encoding process by running `plexus encode -l /path/to/list`. +Once the list compilation has completed, you can begin the encoding process using `plexus encode -l /path/to/list`. #### Remote Media Run `plexus list -d /mount/path/path/to/media -m /mount/path` to start building a recursive list of your media which needs to be re-encoded. -Once the list function has finished its process, you can begin the encoding process by running `plexus encode -l /path/to/list -r RCloneRemote:`. +Once the list compilation has completed, you can begin the encoding process +using `plexus encode -l /path/to/list -r RCloneRemote:`. ### Support -If you run into any issues, please [submit an issue via this repo](https://github.com/Wolveix/Plexus/issues/new?assignees=&labels=&template=bug_report.md&title=). If the issue occurs during the encode command, please run the command again with the `--verbose` flag so that we may have a better idea of what's happening. + +If you run into any issues, +please [submit an issue via this repo](https://github.com/wolveix/plexus/issues/new?assignees=&labels=&template=bug_report.md&title=). +If the issue occurs during the encode command, please run the command again with the `--verbose` flag to give us a +better idea of what's happening. ## Credits -- Creator: [Robert Thomas](https://github.com/Wolveix) + +- Creator: [Robert Thomas](https://github.com/wolveix) - Help: [Greg Probst](https://github.com/gorgarp), [Mason Rowe](https://github.com/MasonR) -- License: [GNU General Public License v3.0](https://github.com/Wolveix/Plexus/blob/master/LICENSE) +- License: [GNU General Public License v3.0](https://github.com/wolveix/plexus/blob/master/LICENSE) diff --git a/docs/help/index.html b/docs/help/index.html index f7eda29..41fe05e 100644 --- a/docs/help/index.html +++ b/docs/help/index.html @@ -33,7 +33,7 @@