Skip to content

Commit

Permalink
fixed merge conflicts
Browse files Browse the repository at this point in the history
Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
  • Loading branch information
JoeLametta committed May 30, 2020
2 parents 82a0b09 + bcdbf5b commit c046f4c
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 29 deletions.
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Whipper

[![license](https://img.shields.io/github/license/whipper-team/whipper.svg)](https://github.com/whipper-team/whipper/blob/master/LICENSE)
[![Build Status](https://travis-ci.com/whipper-team/whipper.svg?branch=master)](https://travis-ci.com/whipper-team/whipper)
[![license](https://img.shields.io/github/license/whipper-team/whipper.svg)](https://github.com/whipper-team/whipper/blob/develop/LICENSE)
[![Build Status](https://travis-ci.com/whipper-team/whipper.svg?branch=develop)](https://travis-ci.com/whipper-team/whipper)
[![GitHub (pre-)release](https://img.shields.io/github/release/whipper-team/whipper/all.svg)](https://github.com/whipper-team/whipper/releases/latest)
[![IRC](https://img.shields.io/badge/irc-%23whipper%40freenode-brightgreen.svg)](https://webchat.freenode.net/?channels=%23whipper)
[![GitHub Stars](https://img.shields.io/github/stars/whipper-team/whipper.svg)](https://github.com/whipper-team/whipper/stargazers)
Expand All @@ -24,13 +24,15 @@ In order to track whipper's latest changes it's advised to check its commit hist
* [Package](#package)
- [Building](#building)
1. [Required dependencies](#required-dependencies)
2. [Fetching the source code](#fetching-the-source-code)
3. [Finalizing the build](#finalizing-the-build)
2. [Optional dependencies](#optional-dependencies)
3. [Fetching the source code](#fetching-the-source-code)
4. [Finalizing the build](#finalizing-the-build)
- [Usage](#usage)
- [Getting started](#getting-started)
- [Configuration file documentation](#configuration-file-documentation)
- [Running uninstalled](#running-uninstalled)
- [Logger plugins](#logger-plugins)
* [Official logger plugins](#official-logger-plugins)
- [License](#license)
- [Contributing](#contributing)
- [Developer Certificate of Origin (DCO)](#developer-certificate-of-origin-dco)
Expand Down Expand Up @@ -62,7 +64,7 @@ https://web.archive.org/web/20160528213242/https://thomas.apestaart.org/thomas/t

## Changelog

See [CHANGELOG.md](https://github.com/whipper-team/whipper/blob/master/CHANGELOG.md).
See [CHANGELOG.md](https://github.com/whipper-team/whipper/blob/develop/CHANGELOG.md).

For detailed information, please check the commit history.

Expand All @@ -78,15 +80,15 @@ You can easily install whipper without needing to care about the required depend

Please note that, right now, Docker Hub only builds whipper images for the `amd64` architecture: if you intend to use them on a different one, you'll need to build the images locally (as explained below).

Alternatively, in case you prefer building Docker images locally, just issue the following command (it relies on the [Dockerfile](https://github.com/whipper-team/whipper/blob/master/Dockerfile) included in whipper's repository):
Alternatively, in case you prefer building Docker images locally, just issue the following command (it relies on the [Dockerfile](https://github.com/whipper-team/whipper/blob/develop/Dockerfile) included in whipper's repository):

`docker build -t whipperteam/whipper .`

It's recommended to create an alias for a convenient usage:

```bash
alias whipper="docker run -ti --rm --device=/dev/cdrom \
--mount type=bind,source=~/.config/whipper,target=/home/worker/.config/whipper \
--mount type=bind,source=${HOME}/.config/whipper,target=/home/worker/.config/whipper \
--mount type=bind,source=${PWD}/output,target=/output \
whipperteam/whipper"
```
Expand All @@ -95,7 +97,7 @@ You should put this e.g. into your `.bash_aliases`. Also keep in mind to substit

Essentially, what this does is to map the /home/worker/.config/whipper and ${PWD}/output (or whatever other directory you specified) on your host system to locations inside the Docker container where the files can be written and read. These directories need to exist on your system before you can run the container:

`mkdir -p ~/.config/whipper "${PWD}"/output`
`mkdir -p "${HOME}/.config/whipper" "${PWD}/output"`

Finally you can test the correct installation:

Expand Down Expand Up @@ -125,7 +127,7 @@ Whipper relies on the following packages in order to run correctly and provide a

- [cd-paranoia](https://github.com/rocky/libcdio-paranoia), for the actual ripping
- To avoid bugs it's advised to use `cd-paranoia` versions ≥ **10.2+0.94+2-2**
- The package named `libcdio-utils`, available on Debian and Ubuntu, is affected by a bug (except for Debian testing/sid): it doesn't include the `cd-paranoia` binary (needed by whipper). For more details see: [#888053 (Debian)](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=888053), [#889803 (Debian)](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=889803) and [#1750264 (Ubuntu)](https://bugs.launchpad.net/ubuntu/+source/libcdio/+bug/1750264).
- The package named `libcdio-utils`, available on Debian and Ubuntu, is affected by a bug (except for Debian testing/sid where a separate `cd-paranoia` package has been added): it doesn't include the `cd-paranoia` binary (needed by whipper). For more details see: [#888053 (Debian)](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=888053), [#889803 (Debian)](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=889803) and [#1750264 (Ubuntu)](https://bugs.launchpad.net/ubuntu/+source/libcdio/+bug/1750264).
- [cdrdao](http://cdrdao.sourceforge.net/), for session, TOC, pre-gap, and ISRC extraction
- [GObject Introspection](https://wiki.gnome.org/Projects/GObjectIntrospection), to provide GLib-2.0 methods used by `task.py`
- [PyGObject](https://pypi.org/project/PyGObject/), required by `task.py`
Expand Down Expand Up @@ -153,7 +155,7 @@ Some dependencies aren't available in the PyPI. They can be probably installed u
- [git](https://git-scm.com/) or [mercurial](https://www.mercurial-scm.org/)
- [libdiscid](https://musicbrainz.org/doc/libdiscid)

PyPI installable dependencies are listed in the [requirements.txt](https://github.com/whipper-team/whipper/blob/master/requirements.txt) file and can be installed issuing the following command:
PyPI installable dependencies are listed in the [requirements.txt](https://github.com/whipper-team/whipper/blob/develop/requirements.txt) file and can be installed issuing the following command:

`pip3 install -r requirements.txt`

Expand Down
4 changes: 2 additions & 2 deletions scripts/accuraterip-checksum
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import sys

if len(sys.argv) == 2 and sys.argv[1] == '--version':
print('accuraterip-checksum version 2.0')
exit(0)
raise SystemExit()

use_v1 = None
if len(sys.argv) == 4:
Expand All @@ -22,7 +22,7 @@ elif len(sys.argv) == 5:

if use_v1 is None:
print('Syntax: accuraterip-checksum [--version / --accuraterip-v1 / --accuraterip-v2 (default)] filename track_number total_tracks')
exit(1)
raise SystemExit(1)

filename = sys.argv[offset + 1]
track_number = int(sys.argv[offset + 2])
Expand Down
3 changes: 1 addition & 2 deletions whipper/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# vi:si:et:sw=4:sts=4:ts=4

import os
import sys

from whipper.command.main import main

Expand All @@ -11,4 +10,4 @@
# Make accuraterip_checksum be found automatically if it was built
local_arb = os.path.join(os.path.dirname(__file__), '..', 'src')
os.environ['PATH'] = ':'.join([os.getenv('PATH'), local_arb])
sys.exit(main())
raise SystemExit(main())
5 changes: 2 additions & 3 deletions whipper/command/basecommand.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

import argparse
import os
import sys

from whipper.common import config, drive

Expand Down Expand Up @@ -109,11 +108,11 @@ def __init__(self, argv, prog_name, opts):
if hasattr(self, 'subcommands'):
if not self.options.remainder:
self.parser.print_help()
sys.exit(0)
raise SystemExit()
if not self.options.remainder[0] in self.subcommands:
logger.critical("incorrect subcommand: %s",
self.options.remainder[0])
sys.exit(1)
raise SystemExit(1)
self.cmd = self.subcommands[self.options.remainder[0]](
self.options.remainder[1:],
prog_name + " " + self.options.remainder[0],
Expand Down
12 changes: 6 additions & 6 deletions whipper/command/cd.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,12 +317,12 @@ def handle_arguments(self):
validate_template(self.options.disc_template, 'disc')

if self.options.offset is None:
raise ValueError("Drive offset is unconfigured.\n"
"Please install pycdio and run 'whipper offset "
"find' to detect your drive's offset or set it "
"manually in the configuration file. It can "
"also be specified at runtime using the "
"'--offset=value' argument")
raise SystemExit(
"Error: drive offset unconfigured. Please install pycdio and "
"run 'whipper offset find' to detect your drive's offset or "
"set it manually in the configuration file. It can also be "
"specified at runtime using the '--offset=value' argument"
)

if self.options.working_directory is not None:
self.options.working_directory = os.path.expanduser(
Expand Down
4 changes: 1 addition & 3 deletions whipper/command/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
# You should have received a copy of the GNU General Public License
# along with whipper. If not, see <http://www.gnu.org/licenses/>.

import sys

from whipper.command.basecommand import BaseCommand
from whipper.common import accurip, config, program
from whipper.extern.task import task
Expand Down Expand Up @@ -63,7 +61,7 @@ def do(self):
print('AccurateRip entry not found')
accurip.print_report(prog.result)
if not verified:
sys.exit(1)
raise SystemExit(1)


class Image(BaseCommand):
Expand Down
4 changes: 2 additions & 2 deletions whipper/extern/task/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,8 @@ def addListener(self, listener):

def _notifyListeners(self, methodName, *args, **kwargs):
if self._listeners:
for l in self._listeners:
method = getattr(l, methodName)
for listener in self._listeners:
method = getattr(listener, methodName)
try:
method(self, *args, **kwargs)
# FIXME: catching too general exception (Exception)
Expand Down
2 changes: 1 addition & 1 deletion whipper/test/test_image_toc.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def testMusicBrainz(self):
self.assertEqual(self.toc.table.getMusicBrainzDiscId(),
"KnpGsLhvH.lPrNc1PBL21lb9Bg4-")
self.assertEqual(self.toc.table.getMusicBrainzSubmitURL(),
"https://musicbrainz.org/cdtoc/attach?toc=1+12+195856+150+15687+31841+51016+66616+81352+99559+116070+133243+149997+161710+177832&tracks=12&id=KnpGsLhvH.lPrNc1PBL21lb9Bg4-") # noqa: E501
"https://musicbrainz.org/cdtoc/attach?toc=1+12+195856+150+15687+31841+51016+66616+81352+99559+116070+133243+149997+161710+177832&tracks=12&id=KnpGsLhvH.lPrNc1PBL21lb9Bg4-") # noqa: E501

# FIXME: I don't trust this toc, but I can't find the CD anymore

Expand Down

0 comments on commit c046f4c

Please sign in to comment.