Skip to content

Commit

Permalink
release: 0.2.9
Browse files Browse the repository at this point in the history
  • Loading branch information
joshstoik1 committed Sep 6, 2024
2 parents 6973c6f + 9d515d2 commit 0b23710
Show file tree
Hide file tree
Showing 21 changed files with 302 additions and 103 deletions.
27 changes: 14 additions & 13 deletions CREDITS.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,37 @@
# Project Dependencies
Package: riprip
Version: 0.2.8
Generated: 2024-07-25 18:16:14 UTC
Version: 0.2.9
Generated: 2024-09-06 02:45:24 UTC

| Package | Version | Author(s) | License |
| ---- | ---- | ---- | ---- |
| [ahash](https://github.com/tkaitchuck/ahash) | 0.8.11 | [Tom Kaitchuck](mailto:[email protected]) | Apache-2.0 or MIT |
| [argyle](https://github.com/Blobfolio/argyle) | 0.7.2 | [Blobfolio, LLC.](mailto:[email protected]) | WTFPL |
| [argyle](https://github.com/Blobfolio/argyle) | 0.8.1 | [Blobfolio, LLC.](mailto:[email protected]) | WTFPL |
| [block-buffer](https://github.com/RustCrypto/utils) | 0.10.4 | RustCrypto Developers | Apache-2.0 or MIT |
| [bytecount](https://github.com/llogiq/bytecount) | 0.6.8 | [Andre Bogus](mailto:[email protected]) and [Joshua Landau](mailto:[email protected]) | Apache-2.0 or MIT |
| [cdtoc](https://github.com/Blobfolio/cdtoc) | 0.3.5 | [Blobfolio, LLC.](mailto:[email protected]) | WTFPL |
| [cdtoc](https://github.com/Blobfolio/cdtoc) | 0.5.0 | [Blobfolio, LLC.](mailto:[email protected]) | WTFPL |
| [cfg-if](https://github.com/alexcrichton/cfg-if) | 1.0.0 | [Alex Crichton](mailto:[email protected]) | Apache-2.0 or MIT |
| [crc32fast](https://github.com/srijs/rust-crc32fast) | 1.4.2 | [Sam Rijs](mailto:[email protected]) and [Alex Crichton](mailto:[email protected]) | Apache-2.0 or MIT |
| [crypto-common](https://github.com/RustCrypto/traits) | 0.1.6 | RustCrypto Developers | Apache-2.0 or MIT |
| [ctrlc](https://github.com/Detegr/rust-ctrlc.git) | 3.4.4 | [Antti Keränen](mailto:[email protected]) | Apache-2.0 or MIT |
| [dactyl](https://github.com/Blobfolio/dactyl) | 0.7.2 | [Blobfolio, LLC.](mailto:[email protected]) | WTFPL |
| [ctrlc](https://github.com/Detegr/rust-ctrlc.git) | 3.4.5 | [Antti Keränen](mailto:[email protected]) | Apache-2.0 or MIT |
| [dactyl](https://github.com/Blobfolio/dactyl) | 0.7.3 | [Blobfolio, LLC.](mailto:[email protected]) | WTFPL |
| [digest](https://github.com/RustCrypto/traits) | 0.10.7 | RustCrypto Developers | Apache-2.0 or MIT |
| [faster-hex](https://github.com/NervosFoundation/faster-hex) | 0.9.0 | [zhangsoledad](mailto:[email protected]) | MIT |
| [fastrand](https://github.com/smol-rs/fastrand) | 2.1.0 | [Stjepan Glavina](mailto:[email protected]) | Apache-2.0 or MIT |
| [fyi_msg](https://github.com/Blobfolio/fyi) | 0.13.6 | [Blobfolio, LLC.](mailto:[email protected]) | WTFPL |
| [fastrand](https://github.com/smol-rs/fastrand) | 2.1.1 | [Stjepan Glavina](mailto:[email protected]) | Apache-2.0 or MIT |
| [fyi_msg](https://github.com/Blobfolio/fyi) | 0.14.0 | [Blobfolio, LLC.](mailto:[email protected]) | WTFPL |
| [generic-array](https://github.com/fizyk20/generic-array.git) | 0.14.7 | [Bartłomiej Kamiński](mailto:[email protected]) and [Aaron Trent](mailto:[email protected]) | MIT |
| [itoa](https://github.com/dtolnay/itoa) | 1.0.11 | [David Tolnay](mailto:[email protected]) | Apache-2.0 or MIT |
| [libcdio-sys](https://github.com/MonterraByte/libcdio-sys) | 0.5.1 | [Joaquim Monteiro](mailto:[email protected]) | GPL-3.0+ |
| [log](https://github.com/rust-lang/log) | 0.4.22 | The Rust Project Developers | Apache-2.0 or MIT |
| [minreq](https://github.com/neonmoe/minreq) | 2.12.0 | [Jens Pitkanen](mailto:[email protected]) | ISC |
| [oxford_join](https://github.com/Blobfolio/oxford_join) | 0.2.9 | [Blobfolio, LLC.](mailto:[email protected]) | WTFPL |
| [riprip_core](https://github.com/Blobfolio/riprip) | 0.2.8 | [Josh Stoik](mailto:[email protected]) | WTFPL |
| [once_cell](https://github.com/matklad/once_cell) | 1.19.0 | [Aleksey Kladov](mailto:[email protected]) | Apache-2.0 or MIT |
| [oxford_join](https://github.com/Blobfolio/oxford_join) | 0.2.10 | [Blobfolio, LLC.](mailto:[email protected]) | WTFPL |
| [riprip_core](https://github.com/Blobfolio/riprip) | 0.2.9 | [Josh Stoik](mailto:[email protected]) | WTFPL |
| [sha1](https://github.com/RustCrypto/hashes) | 0.10.6 | RustCrypto Developers | Apache-2.0 or MIT |
| [tempfile](https://github.com/Stebalien/tempfile) | 3.10.1 | [Steven Allen](mailto:[email protected]), The Rust Project Developers, [Ashley Mannix](mailto:[email protected]), and [Jason White](mailto:[email protected]) | Apache-2.0 or MIT |
| [tempfile](https://github.com/Stebalien/tempfile) | 3.12.0 | [Steven Allen](mailto:[email protected]), The Rust Project Developers, [Ashley Mannix](mailto:[email protected]), and [Jason White](mailto:[email protected]) | Apache-2.0 or MIT |
| [terminal_size](https://github.com/eminence/terminal-size) | 0.3.0 | [Andrew Chin](mailto:[email protected]) | Apache-2.0 or MIT |
| [trimothy](https://github.com/Blobfolio/trimothy) | 0.2.2 | [Blobfolio, LLC.](mailto:[email protected]) | WTFPL |
| [trimothy](https://github.com/Blobfolio/trimothy) | 0.3.1 | [Blobfolio, LLC.](mailto:[email protected]) | WTFPL |
| [typenum](https://github.com/paholg/typenum) | 1.17.0 | [Paho Lurie-Gregg](mailto:[email protected]) and [Andre Bogus](mailto:[email protected]) | Apache-2.0 or MIT |
| [unicode-width](https://github.com/unicode-rs/unicode-width) | 0.1.13 | [kwantam](mailto:[email protected]) and [Manish Goregaokar](mailto:[email protected]) | Apache-2.0 or MIT |
| [utc2k](https://github.com/Blobfolio/utc2k) | 0.8.1 | [Blobfolio, LLC.](mailto:[email protected]) | WTFPL |
| [utc2k](https://github.com/Blobfolio/utc2k) | 0.9.1 | [Blobfolio, LLC.](mailto:[email protected]) | WTFPL |
| [zerocopy](https://github.com/google/zerocopy) | 0.7.35 | [Joshua Liebow-Feeser](mailto:[email protected]) | Apache-2.0, BSD-2-Clause, or MIT |
4 changes: 2 additions & 2 deletions release/man/riprip.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.TH "RIP RIP HOORAY!" "1" "July 2024" "Rip Rip Hooray! v0.2.8" "User Commands"
.TH "RIP RIP HOORAY!" "1" "September 2024" "Rip Rip Hooray! v0.2.9" "User Commands"
.SH NAME
Rip Rip Hooray! \- Manual page for riprip v0.2.8.
Rip Rip Hooray! \- Manual page for riprip v0.2.9.
.SH DESCRIPTION
A specialized audio CD\-ripper optimized for incremental data recovery.
.SS USAGE:
Expand Down
11 changes: 5 additions & 6 deletions riprip/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "riprip"
version = "0.2.8"
version = "0.2.9"
license = "WTFPL"
authors = ["Josh Stoik <[email protected]>"]
edition = "2021"
Expand Down Expand Up @@ -126,15 +126,14 @@ description = "Rip one or more specific tracks (rather than the whole disc). Mul
duplicate = true

[dependencies]
argyle = "0.7.2"
ctrlc = "=3.4.4"
argyle = "0.8.*"
ctrlc = "=3.4.5"
dactyl = "0.7.*"
oxford_join = "0.2.*"
trimothy = "0.2.*"
utc2k = "0.8.*"
utc2k = "0.9.*"

[dependencies.fyi_msg]
version = "0.13.*"
version = "0.14.*"
features = [ "progress" ]

[dependencies.riprip_core]
Expand Down
46 changes: 35 additions & 11 deletions riprip/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,48 @@

#![forbid(unsafe_code)]

#![deny(
clippy::allow_attributes_without_reason,
clippy::correctness,
unreachable_pub,
)]

#![warn(
clippy::filetype_is_file,
clippy::integer_division,
clippy::needless_borrow,
clippy::complexity,
clippy::nursery,
clippy::pedantic,
clippy::perf,
clippy::suboptimal_flops,
clippy::style,
clippy::allow_attributes,
clippy::clone_on_ref_ptr,
clippy::create_dir,
clippy::filetype_is_file,
clippy::format_push_string,
clippy::get_unwrap,
clippy::impl_trait_in_params,
clippy::lossy_float_literal,
clippy::missing_assert_message,
clippy::missing_docs_in_private_items,
clippy::needless_raw_strings,
clippy::panic_in_result_fn,
clippy::pub_without_shorthand,
clippy::rest_pat_in_fully_bound_structs,
clippy::semicolon_inside_block,
clippy::str_to_string,
clippy::string_to_string,
clippy::todo,
clippy::undocumented_unsafe_blocks,
clippy::unneeded_field_pattern,
clippy::unseparated_literal_suffix,
clippy::unwrap_in_result,
macro_use_extern_crate,
missing_copy_implementations,
missing_debug_implementations,
missing_docs,
non_ascii_idents,
trivial_casts,
trivial_numeric_casts,
unreachable_pub,
unused_crate_dependencies,
unused_extern_crates,
unused_import_braces,
Expand Down Expand Up @@ -63,7 +88,6 @@ use std::{
Arc,
},
};
use trimothy::TrimSlice;
use utc2k::FmtUtc2k;


Expand Down Expand Up @@ -269,7 +293,7 @@ fn parse_rip_options(args: &Argue, drive: Option<DriveVendorModel>, disc: &Disc)
.position(|&b| matches!(b, b'm' | b'M'))
.map_or_else(
|| u16::btou(v),
|pos| u16::btou(v[..pos].trim()).and_then(|v| v.checked_mul(1024))
|pos| u16::btou(v[..pos].trim_ascii()).and_then(|v| v.checked_mul(1024))
)
.ok_or(RipRipError::CliParse("-c/--cache"))?;
opts = opts.with_cache(v);
Expand All @@ -294,14 +318,14 @@ fn parse_rip_options(args: &Argue, drive: Option<DriveVendorModel>, disc: &Disc)
// Tracks are also kinda annoying.
let toc = disc.toc();
for v in args.option2_values(b"-t", b"--tracks", Some(b',')).chain(args.option_values(b"--track", Some(b','))) {
let v = v.trim();
let v = v.trim_ascii();
if v.is_empty() { continue; }

// It might be a range.
if let Some(pos) = v.iter().position(|b| b'-'.eq(b)) {
// Split.
let a = v[..pos].trim();
let b = v[pos + 1..].trim();
let a = v[..pos].trim_ascii();
let b = v[pos + 1..].trim_ascii();
if a.is_empty() || b.is_empty() { return Err(RipRipError::CliParse("-t/--tracks")); }

// Decode.
Expand Down
14 changes: 7 additions & 7 deletions riprip_core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "riprip_core"
version = "0.2.8"
version = "0.2.9"
license = "WTFPL"
authors = ["Josh Stoik <[email protected]>"]
edition = "2021"
Expand All @@ -10,19 +10,19 @@ readme = "README.md"
publish = false

[dependencies]
cdtoc = "0.3.*"
cdtoc = "0.5.*"
crc32fast = "=1.4.2"
dactyl = "0.7.*"
tempfile = "3.8.0"
trimothy = "0.2.*"
utc2k = "0.8.*"
trimothy = "0.3.*"
utc2k = "0.9.*"

[dependencies.argyle]
version = "0.7.2"
version = "0.8.*"
optional = true

[dependencies.fyi_msg]
version = "0.13.*"
version = "0.14.*"
features = [ "progress" ]

[dependencies.libcdio-sys]
Expand All @@ -37,7 +37,7 @@ default-features = false
# reason so we don't need any minreq features at all!

[build-dependencies.cdtoc]
version = "0.3.*"
version = "0.5.*"
default-features = false
features = [ "accuraterip" ]

Expand Down
26 changes: 13 additions & 13 deletions riprip_core/src/barcode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use trimothy::TrimSliceMatches;
pub struct Barcode([u8; 13]);

impl fmt::Display for Barcode {
#[allow(unsafe_code)]
#[expect(unsafe_code, reason = "Content is ASCII.")]
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
// Safety: all values are ASCII digits.
let s = unsafe { std::str::from_utf8_unchecked(self.0.as_slice()) };
Expand Down Expand Up @@ -113,18 +113,18 @@ mod tests {

#[test]
fn t_is_ean13() {
assert_eq!(is_ean13(&*b"0008811126827"), true);
assert_eq!(is_ean13(&*b"0018861006529"), true);
assert_eq!(is_ean13(&*b"0042282848420"), true);
assert_eq!(is_ean13(&*b"0075597996524"), true);
assert_eq!(is_ean13(&*b"0075992742320"), true);
assert_eq!(is_ean13(&*b"0089218545555"), false);
assert_eq!(is_ean13(&*b"0089218545992"), true);
assert_eq!(is_ean13(&*b"0731455829921"), true);
assert_eq!(is_ean13(&*b"0732455829921"), false);
assert_eq!(is_ean13(&*b"0886977200922"), true);
assert_eq!(is_ean13(&*b"5099997200628"), true);
assert_eq!(is_ean13(&*b"9332727016318"), true);
assert!(is_ean13(b"0008811126827"));
assert!(is_ean13(b"0018861006529"));
assert!(is_ean13(b"0042282848420"));
assert!(is_ean13(b"0075597996524"));
assert!(is_ean13(b"0075992742320"));
assert!(! is_ean13(b"0089218545555"));
assert!(is_ean13(b"0089218545992"));
assert!(is_ean13(b"0731455829921"));
assert!(! is_ean13(b"0732455829921"));
assert!(is_ean13(b"0886977200922"));
assert!(is_ean13(b"5099997200628"));
assert!(is_ean13(b"9332727016318"));

// Test formatting too.
let bc = Barcode::try_from("9332727016318").expect("Barcode failed.");
Expand Down
3 changes: 3 additions & 0 deletions riprip_core/src/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ static CACHE_PREFIX: OnceLock<String> = OnceLock::new();
/// This is a simple wrapper around `Tempfile` that abstracts away the
/// particulars, minimizing code repetition.
pub(super) struct CacheWriter<'a> {
/// # Destination Path.
dst: &'a Path,

/// # Tempfile.
tmp: NamedTempFile,
}

Expand Down
Loading

0 comments on commit 0b23710

Please sign in to comment.