Skip to content

Commit bd13d5a

Browse files
committed
release: 0.4.0
2 parents 3ec2688 + a449158 commit bd13d5a

File tree

15 files changed

+249
-146
lines changed

15 files changed

+249
-146
lines changed

CREDITS.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Project Dependencies
22
Package: riprip
3-
Version: 0.3.3
3+
Version: 0.4.0
44
Target: x86_64-unknown-linux-gnu
5-
Generated: 2025-04-04 02:58:32 UTC
5+
Generated: 2025-05-08 02:53:31 UTC
66

77
| Package | Version | Author(s) | License |
88
| ---- | ---- | ---- | ---- |
@@ -23,40 +23,41 @@
2323
| [either](https://github.com/rayon-rs/either) ⚒️ | 1.15.0 | bluss | MIT OR Apache-2.0 |
2424
| [faster-hex](https://github.com/NervosFoundation/faster-hex) | 0.10.0 | [zhangsoledad](mailto:[email protected]) | MIT |
2525
| [fastrand](https://github.com/smol-rs/fastrand) | 2.3.0 | [Stjepan Glavina](mailto:[email protected]) | Apache-2.0 OR MIT |
26-
| [**fyi_msg**](https://github.com/Blobfolio/fyi) | 2.0.0 | [Josh Stoik](mailto:[email protected]) | WTFPL |
26+
| [**fyi_ansi**](https://github.com/Blobfolio/fyi) | 2.0.2 | [Josh Stoik](mailto:[email protected]) | WTFPL |
27+
| [**fyi_msg**](https://github.com/Blobfolio/fyi) | 2.0.2 | [Josh Stoik](mailto:[email protected]) | WTFPL |
2728
| [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 |
2829
| [getrandom](https://github.com/rust-random/getrandom) | 0.3.2 | The Rand Project Developers | MIT OR Apache-2.0 |
2930
| [glob](https://github.com/rust-lang/glob) ⚒️ | 0.3.2 | The Rust Project Developers | MIT OR Apache-2.0 |
3031
| [hash32](https://github.com/japaric/hash32) | 0.3.1 | [Jorge Aparicio](mailto:[email protected]) | MIT OR Apache-2.0 |
3132
| [heapless](https://github.com/rust-embedded/heapless) | 0.8.0 | [Jorge Aparicio](mailto:[email protected]), [Per Lindgren](mailto:[email protected]), and [Emil Fresk](mailto:[email protected]) | MIT OR Apache-2.0 |
3233
| [itertools](https://github.com/rust-itertools/itertools) ⚒️ | 0.13.0 | bluss | MIT OR Apache-2.0 |
3334
| [itoa](https://github.com/dtolnay/itoa) | 1.0.15 | [David Tolnay](mailto:[email protected]) | MIT OR Apache-2.0 |
34-
| [libc](https://github.com/rust-lang/libc) | 0.2.171 | The Rust Project Developers | MIT OR Apache-2.0 |
35+
| [libc](https://github.com/rust-lang/libc) | 0.2.172 | The Rust Project Developers | MIT OR Apache-2.0 |
3536
| [**libcdio-sys**](https://github.com/MonterraByte/libcdio-sys) | 0.5.2 | [Joaquim Monteiro](mailto:[email protected]) | GPL-3.0+ |
3637
| [libloading](https://github.com/nagisa/rust_libloading/) ⚒️ | 0.8.6 | [Simonas Kazlauskas](mailto:[email protected]) | ISC |
37-
| [linux-raw-sys](https://github.com/sunfishcode/linux-raw-sys) | 0.9.3 | [Dan Gohman](mailto:[email protected]) | Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT |
38+
| [linux-raw-sys](https://github.com/sunfishcode/linux-raw-sys) | 0.9.4 | [Dan Gohman](mailto:[email protected]) | Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT |
3839
| [log](https://github.com/rust-lang/log) | 0.4.27 | The Rust Project Developers | MIT OR Apache-2.0 |
3940
| [memchr](https://github.com/BurntSushi/memchr) ⚒️ | 2.7.4 | [Andrew Gallant](mailto:[email protected]) and bluss | Unlicense OR MIT |
4041
| [minimal-lexical](https://github.com/Alexhuszagh/minimal-lexical) ⚒️ | 0.2.1 | [Alex Huszagh](mailto:[email protected]) | MIT OR Apache-2.0 |
41-
| [**minreq**](https://github.com/neonmoe/minreq) | 2.13.3 | [Jens Pitkanen](mailto:[email protected]) | ISC |
42+
| [**minreq**](https://github.com/neonmoe/minreq) | 2.13.4 | [Jens Pitkanen](mailto:[email protected]) | ISC |
4243
| [nom](https://github.com/Geal/nom) ⚒️ | 7.1.3 | [email protected] | MIT |
4344
| [once_cell](https://github.com/matklad/once_cell) | 1.21.3 | [Aleksey Kladov](mailto:[email protected]) | MIT OR Apache-2.0 |
4445
| [**oxford_join**](https://github.com/Blobfolio/oxford_join) | 0.5.0 | [Josh Stoik](mailto:[email protected]) | WTFPL |
45-
| [prettyplease](https://github.com/dtolnay/prettyplease) ⚒️ | 0.2.31 | [David Tolnay](mailto:[email protected]) | MIT OR Apache-2.0 |
46-
| [proc-macro2](https://github.com/dtolnay/proc-macro2) ⚒️ | 1.0.94 | [David Tolnay](mailto:[email protected]) and [Alex Crichton](mailto:[email protected]) | MIT OR Apache-2.0 |
46+
| [prettyplease](https://github.com/dtolnay/prettyplease) ⚒️ | 0.2.32 | [David Tolnay](mailto:[email protected]) | MIT OR Apache-2.0 |
47+
| [proc-macro2](https://github.com/dtolnay/proc-macro2) ⚒️ | 1.0.95 | [David Tolnay](mailto:[email protected]) and [Alex Crichton](mailto:[email protected]) | MIT OR Apache-2.0 |
4748
| [quote](https://github.com/dtolnay/quote) ⚒️ | 1.0.40 | [David Tolnay](mailto:[email protected]) | MIT OR Apache-2.0 |
4849
| [regex](https://github.com/rust-lang/regex) ⚒️ | 1.11.1 | The Rust Project Developers and [Andrew Gallant](mailto:[email protected]) | MIT OR Apache-2.0 |
4950
| [regex-automata](https://github.com/rust-lang/regex/tree/master/regex-automata) ⚒️ | 0.4.9 | The Rust Project Developers and [Andrew Gallant](mailto:[email protected]) | MIT OR Apache-2.0 |
5051
| [regex-syntax](https://github.com/rust-lang/regex/tree/master/regex-syntax) ⚒️ | 0.8.5 | The Rust Project Developers and [Andrew Gallant](mailto:[email protected]) | MIT OR Apache-2.0 |
51-
| [**riprip_core**](https://github.com/Blobfolio/riprip) | 0.3.3 | [Josh Stoik](mailto:[email protected]) | WTFPL |
52+
| [**riprip_core**](https://github.com/Blobfolio/riprip) | 0.4.0 | [Josh Stoik](mailto:[email protected]) | WTFPL |
5253
| [rustc-hash](https://github.com/rust-lang/rustc-hash) ⚒️ | 2.1.1 | The Rust Project Developers | Apache-2.0 OR MIT |
53-
| [rustix](https://github.com/bytecodealliance/rustix) | 1.0.5 | [Dan Gohman](mailto:[email protected]) and [Jakub Konka](mailto:[email protected]) | Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT |
54+
| [rustix](https://github.com/bytecodealliance/rustix) | 1.0.7 | [Dan Gohman](mailto:[email protected]) and [Jakub Konka](mailto:[email protected]) | Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT |
5455
| [sha1](https://github.com/RustCrypto/hashes) | 0.10.6 | RustCrypto Developers | MIT OR Apache-2.0 |
5556
| [shlex](https://github.com/comex/rust-shlex) ⚒️ | 1.3.0 | [comex](mailto:[email protected]), [Fenhl](mailto:[email protected]), [Adrian Taylor](mailto:[email protected]), [Alex Touchet](mailto:[email protected]), [Daniel Parks](mailto:dp+[email protected]), and [Garrett Berg](mailto:[email protected]) | MIT OR Apache-2.0 |
5657
| [signal-hook](https://github.com/vorner/signal-hook) | 0.3.17 | [Michal 'vorner' Vaner](mailto:[email protected]) and [Thomas Himmelstoss](mailto:[email protected]) | Apache-2.0 OR MIT |
57-
| [signal-hook-registry](https://github.com/vorner/signal-hook) | 1.4.2 | [Michal 'vorner' Vaner](mailto:[email protected]) and [Masaki Hara](mailto:[email protected]) | Apache-2.0 OR MIT |
58+
| [signal-hook-registry](https://github.com/vorner/signal-hook) | 1.4.5 | [Michal 'vorner' Vaner](mailto:[email protected]) and [Masaki Hara](mailto:[email protected]) | Apache-2.0 OR MIT |
5859
| [stable_deref_trait](https://github.com/storyyeller/stable_deref_trait) | 1.2.0 | [Robert Grosse](mailto:[email protected]) | MIT OR Apache-2.0 |
59-
| [syn](https://github.com/dtolnay/syn) ⚒️ | 2.0.100 | [David Tolnay](mailto:[email protected]) | MIT OR Apache-2.0 |
60+
| [syn](https://github.com/dtolnay/syn) ⚒️ | 2.0.101 | [David Tolnay](mailto:[email protected]) | MIT OR Apache-2.0 |
6061
| [**tempfile**](https://github.com/Stebalien/tempfile) | 3.19.1 | [Steven Allen](mailto:[email protected]), The Rust Project Developers, [Ashley Mannix](mailto:[email protected]), and [Jason White](mailto:[email protected]) | MIT OR Apache-2.0 |
6162
| [terminal_size](https://github.com/eminence/terminal-size) | 0.4.2 | [Andrew Chin](mailto:[email protected]) | MIT OR Apache-2.0 |
6263
| [**trimothy**](https://github.com/Blobfolio/trimothy) | 0.7.0 | [Josh Stoik](mailto:[email protected]) | WTFPL |

release/man/riprip.1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
.TH "RIP RIP HOORAY!" "1" "April 2025" "riprip v0.3.3" "User Commands"
1+
.TH "RIP RIP HOORAY!" "1" "May 2025" "riprip v0.4.0" "User Commands"
22
.SH NAME
3-
RIP RIP HOORAY! \- Manual page for riprip v0.3.3.
3+
RIP RIP HOORAY! \- Manual page for riprip v0.4.0.
44
.SH DESCRIPTION
55
A specialized audio CD\-ripper optimized for incremental data recovery.
66
.SS USAGE:

riprip/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "riprip"
3-
version = "0.3.3"
3+
version = "0.4.0"
44
license = "WTFPL"
55
authors = ["Josh Stoik <[email protected]>"]
66
edition = "2024"
@@ -131,6 +131,7 @@ argyle = "0.12.*"
131131
[dependencies]
132132
argyle = "0.12.*"
133133
dactyl = "0.10.*"
134+
fyi_ansi = "2.0.*"
134135
oxford_join = "0.5.*"
135136
utc2k = "0.12.*"
136137

riprip/src/main.rs

Lines changed: 78 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@
5858
mod cli;
5959

6060
use dactyl::NiceU16;
61+
use fyi_ansi::{
62+
ansi,
63+
csi,
64+
dim,
65+
bold,
66+
};
6167
use fyi_msg::{
6268
Msg,
6369
Progless,
@@ -123,9 +129,14 @@ fn main__() -> Result<(), RipRipError> {
123129
let vm = vm.to_string();
124130
if ! vm.is_empty() {
125131
eprintln!(
126-
"\x1b[2;36m{}\n\x1b[0;1;36m{vm}\n\x1b[0;2;36m{}\n\x1b[0m",
132+
concat!(
133+
ansi!((dim, cyan) "{}\n"),
134+
ansi!((bold, cyan) "{vm}\n"),
135+
ansi!((dim, cyan) "{}\n"),
136+
),
127137
&DIVIDER[..vm.len()],
128138
&DIVIDER[..vm.len()],
139+
vm=vm
129140
);
130141
}
131142
}
@@ -212,14 +223,29 @@ fn log_header(disc: &Disc, opts: &RipOptions) {
212223

213224

214225

226+
#[expect(clippy::too_many_lines, reason = "For readability.")]
215227
/// # Rip Summary.
216228
///
217229
/// Summarize and confirm the chosen settings before proceeding.
218230
fn rip_summary(disc: &Disc, opts: &RipOptions) -> Result<(), RipRipError> {
219231
// Build up all the messy values.
220232
let nice_c2 = Cow::Borrowed(
221-
if opts.strict() { "C2 Error Pointers \x1b[0;2m(\x1b[0;1;93mSector\x1b[0;2m)" }
222-
else { "C2 Error Pointers \x1b[0;2m(\x1b[0;1mSample\x1b[0;2m)" }
233+
if opts.strict() {
234+
concat!(
235+
"C2 Error Pointers ",
236+
csi!(reset, dim), "(",
237+
csi!(reset, bold, light_yellow), "Sector",
238+
csi!(reset, dim), ")",
239+
)
240+
}
241+
else {
242+
concat!(
243+
"C2 Error Pointers ",
244+
csi!(reset, dim), "(",
245+
csi!(reset, bold), "Sample",
246+
csi!(reset, dim), ")",
247+
)
248+
}
223249
);
224250
let nice_cache = opts.cache().map_or(
225251
Cow::Borrowed("Disabled"),
@@ -231,18 +257,34 @@ fn rip_summary(disc: &Disc, opts: &RipOptions) -> Result<(), RipRipError> {
231257
));
232258
let nice_offset = Cow::Owned(format!("{}", opts.offset().samples()));
233259
let nice_output = Cow::Owned(format!(
234-
"./{}/{}_\x1b[0;2m##\x1b[0;1m.wav",
260+
concat!(
261+
"./{}/{}_",
262+
csi!(reset, dim), "##",
263+
csi!(reset, bold), ".wav",
264+
),
235265
riprip_core::CACHE_BASE,
236266
disc.toc().cddb_id(),
237267
));
238268
let nice_passes = Cow::Owned(format!(
239269
"{}{}",
240270
opts.passes(),
241271
if opts.resume() {
242-
if opts.reset() { " \x1b[0;2m(\x1b[0;1;93mReset Counts\x1b[0;2m)" }
272+
if opts.reset() {
273+
concat!(
274+
csi!(reset, dim), " (",
275+
csi!(reset, bold, light_yellow), "Reset Counts",
276+
csi!(reset, dim), ")",
277+
)
278+
}
243279
else { "" }
244280
}
245-
else { " \x1b[0;2m(\x1b[0;1;93mFrom Scratch\x1b[0;2m)" },
281+
else {
282+
concat!(
283+
csi!(reset, dim), " (",
284+
csi!(reset, bold, light_yellow), "From Scratch",
285+
csi!(reset, dim), ")",
286+
)
287+
},
246288
));
247289
let nice_read_order = Cow::Borrowed(
248290
if opts.flip_flop() { "Alternate" }
@@ -279,21 +321,36 @@ fn rip_summary(disc: &Disc, opts: &RipOptions) -> Result<(), RipRipError> {
279321
let max_label = set.iter().map(|(k, _, _)| k.len()).max().unwrap_or(0);
280322

281323
// Print them!
282-
eprintln!("\x1b[1;38;5;199mRip Rip…\x1b[0m");
324+
eprintln!(ansi!((bold, 199) "Rip Rip…"));
283325
for (k, v, enabled) in set {
284326
if enabled {
285-
eprintln!(" {k:max_label$} \x1b[1m{v}\x1b[0m");
327+
eprintln!(
328+
concat!(" {k:max_label$} ", bold!("{v}")),
329+
k=k,
330+
v=v,
331+
max_label=max_label,
332+
);
286333
}
287334
else if k.is_empty() {
288-
eprintln!(" \x1b[2m{k:max_label$} \x1b[9m{v}\x1b[0m");
335+
eprintln!(
336+
dim!(" {k:max_label$} ", csi!(strike), "{v}"),
337+
k=k,
338+
v=v,
339+
max_label=max_label,
340+
);
289341
}
290342
else {
291-
eprintln!(" \x1b[2;9m{k:max_label$} {v}\x1b[0m");
343+
eprintln!(
344+
ansi!((dim, strike) " {k:max_label$} {v}"),
345+
k=k,
346+
v=v,
347+
max_label=max_label,
348+
);
292349
}
293350
}
294351

295352
// One last chance to bail!
296-
if Msg::from("\x1b[1;38;5;199m…Hooray?\x1b[0m").eprompt_with_default(true) {
353+
if Msg::from(ansi!((bold, 199) "…Hooray?")).eprompt_with_default(true) {
297354
eprintln!("\n");
298355
Ok(())
299356
}
@@ -325,7 +382,12 @@ fn rip_summary_tracks(opts: &RipOptions) -> String {
325382
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
326383
match *self {
327384
Self::One(n) => write!(f, "{n}"),
328-
Self::Rng(a, b) => write!(f, "{a}\x1b[0;2m..=\x1b[0;1m{b}"),
385+
Self::Rng(a, b) => write!(
386+
f,
387+
concat!("{a}", csi!(reset, dim), "..=", csi!(reset, bold), "{b}"),
388+
a=a,
389+
b=b,
390+
),
329391
}
330392
}
331393
}
@@ -341,13 +403,14 @@ fn rip_summary_tracks(opts: &RipOptions) -> String {
341403
match set.len() {
342404
1 => set.remove(0).to_string(),
343405
2 => format!(
344-
"{}\x1b[0;2m and \x1b[0;1m{}",
406+
concat!("{}", csi!(reset, dim), " and ", csi!(reset, bold), "{}"),
345407
set[0],
346408
set[1],
347409
),
348410
_ => set.pop().map_or_else(String::new, |last| format!(
349-
"{}\x1b[0;2m, and \x1b[0;1m{last}",
350-
JoinFmt::new(set.into_iter(), "\x1b[0;2m, \x1b[0;1m"),
411+
concat!("{}", csi!(reset, dim), ", and ", csi!(reset, bold), "{}"),
412+
JoinFmt::new(set.into_iter(), concat!(csi!(reset, dim), ", ", csi!(reset, bold))),
413+
last,
351414
)),
352415
}
353416
}

riprip_core/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "riprip_core"
3-
version = "0.3.3"
3+
version = "0.4.0"
44
license = "WTFPL"
55
authors = ["Josh Stoik <[email protected]>"]
66
edition = "2024"
@@ -13,6 +13,7 @@ publish = false
1313
cdtoc = "0.8.*"
1414
crc32fast = "=1.4.2"
1515
dactyl = "0.10.*"
16+
fyi_ansi = "2.0.*"
1617
oxford_join = "0.5.*"
1718
tempfile = "3.8.0"
1819
trimothy = "0.7.*"

riprip_core/src/cdio.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ impl LibcdioInstance {
383383
// The return code is a bool, true for good, instead of the usual
384384
// 0 FFI normally kicks back.
385385
// Safety: this is an FFI call…
386-
if 1 == unsafe { libcdio_sys::cdio_get_hwinfo(self.as_ptr(), &mut raw) } {
386+
if unsafe { libcdio_sys::cdio_get_hwinfo(self.as_ptr(), &mut raw) } {
387387
// Rather than deal with the uncertainty of pointers, let's recast
388388
// the signs since we have everything right here.
389389
let vendor_u8 = raw.psz_vendor.map(u8::saturating_from);
@@ -587,11 +587,11 @@ impl LibcdioInstance {
587587
buf.as_mut_ptr().cast(),
588588
lsn,
589589
1, // Sector type: CDDA.
590-
0, // No random data manipulation thank you kindly.
591-
0, // No header syncing.
590+
false, // No random data manipulation thank you kindly.
591+
false, // No header syncing.
592592
0, // No headers.
593-
1, // YES audio block!
594-
0, // No EDC.
593+
true, // YES audio block!
594+
false, // No EDC.
595595
u8::from(c2), // C2 or no C2?
596596
sub, // Subchannel? What kind?
597597
block_size, // Block size (varies by data requested).

riprip_core/src/cdtext.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ impl AsRef<str> for CDTextKind {
4949
impl fmt::Display for CDTextKind {
5050
#[inline]
5151
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
52-
f.write_str(self.as_str())
52+
<str as fmt::Display>::fmt(self.as_str(), f)
5353
}
5454
}
5555

riprip_core/src/chk.rs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ use cdtoc::{
1818
Track,
1919
};
2020
use std::{
21+
num::Wrapping,
2122
path::Path,
2223
sync::{
2324
Arc,
@@ -94,22 +95,22 @@ pub(crate) fn chk_accuraterip(toc: &Toc, track: Track, data: &[RipSample])
9495
if end <= start { return None; }
9596

9697
// Crunch!
97-
let mut crc1 = 0_u64; // Version #1.
98-
let mut crc2 = 0_u64; // Version #2.
98+
let mut crc1 = Wrapping(0_u64); // Version #1.
99+
let mut crc2 = Wrapping(0_u64); // Version #2.
99100
let mut idx = 0;
100101

101102
for sample in data {
102103
if start <= idx && idx <= end {
103104
let sample = sample.as_array();
104-
let v = u64::from_le_bytes([
105+
let v = Wrapping(u64::from_le_bytes([
105106
sample[0], sample[1], sample[2], sample[3], 0, 0, 0, 0,
106-
]);
107+
]));
107108

108-
let k = idx as u64 + 1;
109+
let k = Wrapping(idx as u64 + 1);
109110
let kv = k * v;
110111

111112
crc1 += kv;
112-
crc2 += (kv >> 32) + (kv & 0xFFFF_FFFF);
113+
crc2 += (kv.0 >> 32) + (kv.0 & 0xFFFF_FFFF);
113114
}
114115

115116
idx += 1;
@@ -118,8 +119,8 @@ pub(crate) fn chk_accuraterip(toc: &Toc, track: Track, data: &[RipSample])
118119

119120
// Sixty-four bits were only used to help with overflow; the final checksum
120121
// only uses half that much.
121-
let crc1 = (crc1 & 0xFFFF_FFFF) as u32;
122-
let crc2 = (crc2 & 0xFFFF_FFFF) as u32;
122+
let crc1 = (crc1.0 & 0xFFFF_FFFF) as u32;
123+
let crc2 = (crc2.0 & 0xFFFF_FFFF) as u32;
123124

124125
// Return the matches, if any.
125126
Some((

0 commit comments

Comments
 (0)