Skip to content
This repository has been archived by the owner on Jun 2, 2024. It is now read-only.

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
wolveix committed Dec 14, 2023
1 parent a5dcbcd commit 4933d62
Show file tree
Hide file tree
Showing 8 changed files with 731 additions and 746 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
name: Docker
on: push

env:
IMAGE_NAME: '${{ github.event.repository.name }}'

jobs:
push:
runs-on: ubuntu-latest
steps:
- 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//')
Expand Down
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
35 changes: 24 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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)
12 changes: 9 additions & 3 deletions docs/help/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ <h1 class="logo"> <a href="/"> <span aria-hidden="true" class="icon_documents_al
<div class="container">
<div id="doc-header" class="doc-header text-center">
<h1 class="doc-title"><span aria-hidden="true" class="fa fa-question-circle"></span> Help</h1>
<div class="meta"><i class="fa fa-clock-o"></i> Last updated: June 25th, 2018</div>
<div class="meta"><i class="fa fa-clock-o"></i> Last updated: December 14th, 2023</div>
</div>
<div class="doc-body">
<div class="doc-content">
Expand All @@ -45,7 +45,10 @@ <h3 class="question"><i class="fa fa-question-circle"></i> I don't have FFmpeg i
<div class="answer">The recommended way to install any of Plexus' dependencies is to use the built-in install function. From there, you can either install the precompiled version of FFmpeg from your OS' repositories, or you can install a custom build with extended codec support.</div>

<h3 class="question"><i class="fa fa-question-circle"></i> I'm getting "An unknown error occurred with FFmpeg.", what should I do?</h3>
<div class="answer">Run the encode command again while ensuring that the --verbose flag is set. Once the error occurs again, copy & paste FFmpeg's output into a new GitHub issue for the <a href="https://github.com/Wolveix/Plexus">Plexus repository</a>.</div>
<div class="answer">Run the encode command again while ensuring that the --verbose flag is
set. Once the error occurs again, copy & paste FFmpeg's output into a new GitHub issue
for the <a href="https://github.com/wolveix/plexus">Plexus repository</a>.
</div>

<h3 class="question"><i class="fa fa-question-circle"></i> What does Plexus do?</h3>
<div class="answer">A lot of things. But it's original intended purpose was to create a sublist of media from your media collection which doesn't meet your desired video and audio codec specifications (by default, these are h264 for video and aac for audio as they're the most universally played codecs), and then process said list to re-encode the media.<br>By running the list command while using the -d flag to point to your overall media directory, Plexus will build a list file containing absolute paths to the media in question. Once the list file is complete, you're then able to feed the list into the encode command which will then re-encode all of the media that needs to be re-encoded. You can specify your default codecs from your config file ($HOME/.config/plexus/plexus.conf), or you can specify the codecs wanted for a specific runtime session by using the -a and -v flags respectively.</div>
Expand All @@ -65,7 +68,10 @@ <h3 class="question"><i class="fa fa-question-circle"></i> What does Plexus do?<
</div>
</div>
<footer id="footer" class="footer text-center">
<div class="container"> <small class="copyright">App developed by <a href="https://github.com/Wolveix" target="_blank">Robert Thomas</a> | Site template designed by <a href="http://themes.3rdwavemedia.com/" targe="_blank">Xiaoying Riley</a></small> </div>
<div class="container"><small class="copyright">App developed by <a href="https://github.com/wolveix"
target="_blank">Robert Thomas</a> | Site
template designed by <a href="http://themes.3rdwavemedia.com/" targe="_blank">Xiaoying Riley</a></small>
</div>
</footer>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.3/jquery.min.js"></script> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/js/bootstrap.min.js"></script> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.15.0/prism.min.js"></script> <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/jquery.scrollto@2.1.2/jquery.scrollTo.min.js"></script> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/ekko-lightbox/3.3.0/ekko-lightbox.min.js"></script> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery.matchHeight/0.7.2/jquery.matchHeight-min.js"></script> <script type="text/javascript" src="/assets/js/main.js"></script>
</body>
Expand Down
38 changes: 29 additions & 9 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,33 @@ <h1 class="logo"> <a href="/"> <span aria-hidden="true" class="icon_documents_al
<div class="doc-wrapper">
<div class="container">
<div id="doc-header" class="doc-header text-center">
<h1 class="doc-title"><i class="icon fa fa-share"></i> Plexus Suite v0.9.75</h1>
<div class="meta"><i class="fa fa-clock-o"></i> Last updated: February 4th, 2021</div>
<h1 class="doc-title"><i class="icon fa fa-share"></i> Plexus Suite v0.9.76</h1>
<div class="meta"><i class="fa fa-clock-o"></i> Last updated: December 14th, 2023</div>
</div>
<div class="doc-body">
<div class="doc-content">
<div class="content-inner">
<section id="about-section" class="doc-section">
<h2 class="section-title">About</h2>
<div class="section-block">
<p>Plexus is a suite of easy-to-use tools to help manage your media collection. You can build a list of media within your collection which is incorrectly encoded, and then re-encode all of that media automatically. Plexus also integrates smoothly with RClone.</p><br><p>I created this suite because I knew that I would need a simple CLI solution to re-encoding all of my media at some point in the future, and no other solution met my requirements.</p><br><p>Thank you <a href="https://github.com/masonr" target="_blank">Mason Rowe</a> for your advice along the way.</p><br><p><strong><a href="https://github.com/Wolveix" target="_blank">Robert Thomas</a> - <a href="https://robt.me" target="_blank">Full Stack Engineer</a> at <a href="https://levelzerotechnology.com" target="_blank">Level Zero Technology</a></strong></p>
<p>Plexus is a simple tool to mass re-encode your media collection. It compiles a list of
your media files which do not currently contain your preferred codecs. It can then
re-encode all of that media for you, even if the media is stored on remote storage (via
Rclone).</p><br>
<p>I created Plexus because I needed a simple CLI tool for re-encoding all of my media, and
every other solution ended up being more complex than I needed them to be.
</p><br>
<p>Thank you, <a href="https://github.com/masonr" target="_blank">Mason Rowe</a> for your
support.</p><br>
<p><strong><a href="https://github.com/wolveix" target="_blank">Robert Thomas</a> - <a
href="https://robt.me" target="_blank">Lead Software Engineer</a> at <a
href="https://levelzerotechnology.com" target="_blank">Level Zero
Technology</a></strong></p>
</div>
</section>
<section id="installation-section" class="doc-section">
<h2 class="section-title">Docker</h2>
<div id="installation-automatic" class="section-block">
<div class="section-block">
<p>Rather than installing the dependencies and downloading Plexus locally, you can run the Plexus Docker image: </p>
<p><code>docker run -v $HOME/.config/plexus:/config wolveix/Plexus:latest </code></p>
</div>
Expand All @@ -55,7 +67,7 @@ <h2 class="section-title">Installation</h2>
<h3 class="block-title">Automatic</h3>
<p>You can automatically install Plexus by running the following line via a supported command line interface: </p>
<p><code>curl https://plexus.wolveix.com/install.sh | sudo bash</code></p>
<p>If you don't have superuser priviledges or are using macOS, use this instead: </p>
<p>If you don't have superuser privileges or are using macOS, use this instead: </p>
<p><code>curl https://plexus.wolveix.com/install.sh | bash</code></p>
</div>
<div id="installation-manual" class="section-block">
Expand All @@ -80,11 +92,12 @@ <h3 class="block-title">Manual</h3>
<p><code>mkdir -p $HOME/.config/plexus $HOME/.plexus/encode/convert $HOME/.plexus/encode/converted $HOME/.plexus/rclone /tmp/plexus</code></p>
<br>
<p>Download the default config file and move it into the correct location:</p>
<p><code>curl -O https://raw.githubusercontent.com/Wolveix/Plexus/master/plexus.conf</code></p>
<p><code>curl -O
https://raw.githubusercontent.com/wolveix/plexus/master/plexus.conf</code></p>
<p><code>mv plexus.conf "$HOME"/.config/plexus/</code></p>
<br>
<p>Next, download the executable itself:</p>
<p><code>curl -O https://raw.githubusercontent.com/Wolveix/Plexus/master/plexus</code></p>
<p><code>curl -O https://raw.githubusercontent.com/wolveix/plexus/master/plexus</code></p>
<br>
<p>Finally, correct the file permissions and move it into your respective operating system's application directory. The following example is for Linux:</p>
<p><code>chmod u+x plexus && chmod 755 plexus</code></p>
Expand Down Expand Up @@ -131,7 +144,11 @@ <h4>Remote Media</h4>
<p>Once the list function has finished its process, you can begin the encoding process by running <code>plexus encode -l /path/to/list -r RCloneRemote:</code>.</p>
<br>
<h3>Support</h3>
<p>If you run into any issues, please <a href="https://github.com/Wolveix/Plexus/issues/new?assignees=&labels=&template=bug_report.md&title=">submit an issue via the repo</a>. If the issue occurs during the encode command, please run the command again with the <code>--verbose</code> flag so that we may have a better idea of what's happening.</p>
<p>If you run into any issues, please <a
href="https://github.com/wolveix/plexus/issues/new?assignees=&labels=&template=bug_report.md&title=">submit
an issue via the repo</a>. If the issue occurs during the encode command, please run
the command again with the <code>--verbose</code> flag so that we may have a better
idea of what's happening.</p>
</div>
</section>
</div>
Expand All @@ -155,7 +172,10 @@ <h3>Support</h3>
</div>
</div>
<footer id="footer" class="footer text-center">
<div class="container"> <small class="copyright">App developed by <a href="https://github.com/Wolveix" target="_blank">Robert Thomas</a> | Site template designed by <a href="http://themes.3rdwavemedia.com/" targe="_blank">Xiaoying Riley</a></small> </div>
<div class="container"><small class="copyright">App developed by <a href="https://github.com/wolveix"
target="_blank">Robert Thomas</a> | Site
template designed by <a href="http://themes.3rdwavemedia.com/" targe="_blank">Xiaoying Riley</a></small>
</div>
</footer>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.3/jquery.min.js"></script> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/js/bootstrap.min.js"></script> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.15.0/prism.min.js"></script> <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/jquery.scrollto@2.1.2/jquery.scrollTo.min.js"></script> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery.matchHeight/0.7.2/jquery.matchHeight-min.js"></script> <script type="text/javascript" src="/assets/js/main.js"></script>
</body>
Expand Down
Loading

0 comments on commit 4933d62

Please sign in to comment.