From 73ef05f4c926aee3ce98f217ab7581d88f6e2e53 Mon Sep 17 00:00:00 2001 From: Andrew Zammit Date: Wed, 18 Aug 2021 16:02:41 -0700 Subject: [PATCH] feat: init project, working ripperx container with config --- .github/workflows/docker.yml | 35 ++++++++++++++++++++++++ Dockerfile | 27 ++++++++++++++++++ LICENSE | 21 ++++++++++++++ README.md | 13 +++++++++ ripperX.rc | 53 ++++++++++++++++++++++++++++++++++++ startapp.sh | 4 +++ 6 files changed, 153 insertions(+) create mode 100644 .github/workflows/docker.yml create mode 100644 Dockerfile create mode 100644 LICENSE create mode 100644 README.md create mode 100644 ripperX.rc create mode 100644 startapp.sh diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 0000000..4370063 --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,35 @@ +on: + push: + tags: + - '*' + +jobs: + build-push: + name: Build and Push + # Set the type of machine to run on + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Get the Ref + id: get-ref + uses: ankitvgupta/ref-to-tag-action@master + with: + ref: ${{ github.ref }} + head_ref: ${{ github.head_ref }} + - uses: docker/setup-buildx-action@v1 + - uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - uses: docker/build-push-action@v2 + with: + context: . + file: ./Dockerfile + platforms: linux/amd64 + push: true + tags: | + zamnuts/ripperx:latest + zamnuts/ripperx:${{ steps.get-ref.outputs.tag }} + build-args: | + ripperxVersion=${{ steps.get-ref.outputs.tag }} diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..042635b --- /dev/null +++ b/Dockerfile @@ -0,0 +1,27 @@ +FROM jlesage/baseimage-gui:ubuntu-18.04-v3 +ARG ripperxVersion='2.8.0' + +ENV \ + APP_NAME='ripperx' \ + HOME='/' +VOLUME ['/output'] +COPY startapp.sh /startapp.sh +COPY ripperX.rc /config/.ripperXrc + +RUN \ + apt-get update && \ + DEBIAN_FRONTEND='noninteractive' \ + apt-get \ + -y \ + -o Dpkg::Options::='--force-confdef' \ + -o Dpkg::Options::='--force-confold' \ + install \ + ca-certificates \ + ripperx="${ripperxVersion}-*" \ + flac \ + lame \ + mppenc \ + vorbis-tools \ + && \ + apt-get clean && \ + update-ca-certificates diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..df3eeed --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Andrew Zammit + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..502739c --- /dev/null +++ b/README.md @@ -0,0 +1,13 @@ +# ripperx in a web-based X session + +A [ripperx](https://sourceforge.net/projects/ripperx/) web-based GUI based +on [jlesage/baseimage-gui](https://github.com/jlesage/docker-baseimage-gui). +Rip CDs to wav using cdparanoia III, and can encode to mp3, flac, +and other formats. Integrates with CDDB for audio CD information. +Writes id3 tags. Creates m3u playlists. + +- To override the default configuration, mount to `/config/.ripperXrc`. + Embeds a [`.ripperXrc`](ripperX.rc) containing a default configuration. +- Access via `http://localhost:5800`. HTTPS is supported, see the [README in jlesage/baseimage-gui](https://github.com/jlesage/docker-baseimage-gui/blob/master/README.md). +- Outputs files to the volume declared at path `/output`. +- Bundles a handful of encoders: `flac`, `lame`, `mppenc`, and `ogg` diff --git a/ripperX.rc b/ripperX.rc new file mode 100644 index 0000000..6cc57bf --- /dev/null +++ b/ripperX.rc @@ -0,0 +1,53 @@ +// +// ~/.ripperXrc +// This is the resource file for ripperX. +// If you edit this file with an editor, note +// that this file is overwritten each time ripperX is run. +// +// You can configure everything in the config menu within ripperX. +// + +//-v 2.8.0 + +CDDBConfig::AutoLookup = 0 +CDDBConfig::ConvertSpaces = 0 +CDDBConfig::CreateID3 = 1 +CDDBConfig::CreatePlaylist = 0 +CDDBConfig::DirFormatString = %a/%v +CDDBConfig::FormatString = %# - %s +CDDBConfig::MakeDirectories = 1 +CDDBConfig::Port = 80 +CDDBConfig::ProxyPort = 8080 +CDDBConfig::ProxyServer = +CDDBConfig::Server = freedb.freedb.org/~cddb/cddb.cgi +CDDBConfig::UseHttp = 1 +CdPlayer::Play_command = cdplay % +CdPlayer::Stop_command = cdstop +Encoder::Bitrate = 320 +Encoder::Encoder = lame +Encoder::HighQual = 1 +Encoder::Plugin = ripperX_plugin-lame +Encoder::Priority = 10 +Encoder::Type = 2 +Encoder::VBRQual = 4 +Encoder::VarBitrate = 0 +Encoder::extraOptions = +Encoder::fullCommand = lame -b 320 --nohist -v -h +Encoder::useCRC = 1 +General::AskWhenFileExists = 1 +General::AutoAppendExtension = 1 +General::CDDBPath = ./.cddbslave +General::KeepWav = 0 +General::MakeMp3FromExistingWav = 0 +General::Mp3FileNameFormat = track% +General::Mp3Path = /output/mp3 +General::Mp3Ratio = 0.08 +General::PrependChar = _ +General::ShellForExecution = /bin/sh +General::WavFileNameFormat = track% +General::WavPath = /output/wav +General::WavRatio = 0.006 +Mp3Player::Command = mpg123 % +Ripper::Plugin = ripperX_plugin-cdparanoia +Ripper::Ripper = cdparanoia +WavPlayer::Command = play % diff --git a/startapp.sh b/startapp.sh new file mode 100644 index 0000000..34b6512 --- /dev/null +++ b/startapp.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env sh + +export HOME=/config +ripperx