dart_rip_log 0.2.0
dart_rip_log: ^0.2.0 copied to clipboard
Parses CD rip log files from EAC, XLD, and other rippers into structured, JSON-serialisable quality data (AccurateRip, CRCs, peaks, errors).
Changelog #
0.2.0 #
- Encoding detection (#29):
parseRipLogFileand the CLI now sniff the byte-order mark before decoding — UTF-16LE (the default encoding of real EAC logs), UTF-16BE, and UTF-8 with BOM all parse transparently; BOM-less input falls back from UTF-8 to Latin-1 instead of throwing. Behaviour change: a non-UTF-8 binary file no longer throws aFileSystemException; it parses to an unknown-formatRipLog. - EAC drive parsing (#31): the
Used driveline is split onAdapter:—drive.namenow holds only the drive model (e.g."ASUS BW-16D1HT") and the adapter/ID text populates the previously never-setdrive.adapter(e.g."Adapter: 1 ID: 0"). JSON-shape change; goldens regenerated. - EAC AccurateRip summary variants (#32): the footer summary is now
captured for negative and mixed outcomes (
No tracks could be verified as accurate,Some tracks could not be verified as accurate,N track(s) accurately ripped/N track(s) could not be verified as accurate), not just the all-verified line. Multi-line summaries are joined with\ninaccurateRipSummary. - EAC 0.95–0.99 footer AccurateRip block (#33): per-track AR
results emitted as a footer block (
Track 1 accurately ripped (confidence 2) [CRC]) are now mapped to the right tracks by number. Previously every footer line overwrote the last track's AR fields while the others stayednotChecked. - TOC table parsing (#34): both the EAC and XLD parsers now read
the
TOC of the extracted CDtable and populatestartSector,lengthSectors, anddurationSecondson each track (fields added to the model in 0.1.0 but never emitted).durationSecondscomes from the TOC length column (minutes/seconds/frames, 75 frames per second), falling back tolengthSectors / 75. Goldens regenerated. LogSource.byteSizefix (#35): now reports the file's on-disk byte size as documented, not the decoded string's UTF-16 code-unit count — the old value was wrong for any non-ASCII log and ~2× off for UTF-16LE EAC logs.- EAC extraction time-of-day (#36):
extractionDatenow includes the hour and minute from date lines like15. March 2026, 20:32. Date-only lines still yield midnight. - XLD
copyOksemantics (#37): no longer conflated with AccurateRip verification. XLD has no "Copy OK" concept, socopyOkis now derived from the track'sStatisticsblock reporting zero errors — a clean rip of a disc that is not in the AccurateRip database no longer reportscopyOk: false. - CLI exit-code change (#30): under the default
--fail-on any, unparseable input (unknown format or zero tracks) now exits 1 instead of 0, so a corrupt or non-log file can no longer produce a green build.--fail-on mismatch,errors, andneverare unchanged. - JSON-shape changes are limited to
drive{}(#31) and the per-track TOC fields (#34). Total suite: 243 tests.
0.1.1 #
compareRipLogsnow diffstestAndCopy,accurateRipDiscId, andaccurateRipTotalSubmissions(#27). These fields arrived in 0.0.4, after the differ was written, and were silently ignored — two logs differing only in them compared as identical.riplog --versionreported0.0.5(#25). The constant is now pinned to the pubspec version by a test so it cannot drift again.- README: install snippet was five releases behind, and the documented
JSON key lists omitted
mediaType,testAndCopy,quality,accurateRipDiscId,accurateRipTotalSubmissions,source,startSector,lengthSectors, anddurationSeconds(#28). - No API or JSON-shape changes. Total suite: 215 tests.
0.1.0 #
- Aggregate quality on
RipLog.quality— a singleRipLogQualityvalue (allVerified,partiallyVerified,mismatches,errors,unknown) derived from the track list with a documented precedence. Also emitted under thequalitykey in the JSON output — useful for dashboards. - Lineage metadata via new
LogSourceclass (byte size, line count, parser name, UTC parse timestamp) attached asRipLog.sourcewhen parsing throughparseRipLogFile.RipLog.withSource(...)returns a copy with a different source.compareRipLogsignoressourcesince its wall-clock timestamp is not a rip property. - Track timing fields on
RipLogTrack:startSector,lengthSectors,durationSeconds. Nullable, omitted from JSON when absent, tracked bycompareRipLogs. - All new fields fully covered by equality, hash,
fromJson, and golden tests. Total suite: 205 tests.
Deferred to 0.1.x parsers milestone #
Full parsers for whipper (#2), CUERipper (#3), and dBpoweramp (#4) still require real-world sample logs. Detection and stubs remain in place. Please open an issue on GitHub with a sample log to unblock these.
0.0.5 #
- CLI:
--format ndjson— streaming-friendly one-JSON-object-per-line output (useful with jq and log pipelines). - CLI:
--filter <mode>— hide non-problem tracks in--format text/--summaryoutput. Values:all(default),mismatch,errors,problems(mismatch or error counts). - CLI:
--fail-on <policy>— choose which conditions trigger exit 1. Values:any(default, current behaviour),mismatch,errors,never. Useful for tuning CI pipelines. - CLI:
-r/--recursive— walk directories for*.logfiles instead of requiring individual paths. - CLI:
--color <mode>—auto(default, based onstdout.hasTerminalandNO_COLOR),always,never. Colours AR status (verified → green, mismatch → red, notInDatabase → yellow, notChecked → dim) and theERRORSlabel. - CLI tests grown to 27 (all covered by the new flags). Total suite: 190.
0.0.4 #
- EAC: parse localised month names in the extraction date. Coverage for English, German, French, Spanish, Italian, Dutch, and Portuguese.
RipLog.testAndCopy— new field, derived from the presence of per-trackTest CRClines.nullwhen no tracks were parsed, otherwisetrueif any track recorded a test CRC (test + copy mode) orfalse(copy-only mode).RipLog.accurateRipDiscIdandRipLog.accurateRipTotalSubmissions— new fields populated from XLD'sAccurateRip Summary/DiscID:/Total submissions:lines. Serialised in the JSON output when present.- 178 tests (7 new covering localised dates, test+copy derivation, and the AR summary block).
0.0.3 #
- Added
fromJsonconstructors onRipLog,RipLogTrack,TrackErrors, andDriveInfo, completing the JSON round-trip. Unknown enum values degrade tounknown/notCheckedrather than throwing, so logs serialised by a newer library version remain readable on older versions. - Models now implement
==andhashCode(field-wise), so two parsed logs can be compared directly and used as map keys / in sets. - New diff utility
compareRipLogs(a, b)returns a structuredRipLogDiffwith per-field entries (tracks[N].copyCrc,tracks[N].errors.readErrors, etc.). Tracks present on only one side are reported astrackAdded/trackRemoved. Parser-level warnings inRipLog.errorsare intentionally ignored so re-parses on a newer library don't surface as diffs. Exported types:compareRipLogs,RipLogDiff,RipLogDiffEntry,RipLogDiffKind. - Test suite grown to 171 tests (round-trip, equality, diff).
0.0.2 #
- Relicensed from GPL-3.0 to Apache-2.0.
- Added GitHub Actions CI (analyze + test on Linux/macOS/Windows against
stable and beta Dart SDKs, plus a
dart pub publish --dry-rungate). - Added dartdoc generation to CI to keep the public API documented.
- Added a release workflow that publishes prebuilt
riplogbinaries for Linux x64, macOS arm64, and Windows x64 on everyv*tag. - README now carries CI, pub, and licence badges.
0.0.1 #
- Initial release.
- Full EAC parser: header metadata, per-track fields, AccurateRip v1 and optional v2 signature capture, full error-statistics block, summary and log-checksum footer, Range-rip (single-track whole-disc) logs.
- Full XLD parser: header, per-track CRC32/AR v1/v2, Statistics block.
- Format detection and scaffolded parsers for CUERipper, whipper, and dBpoweramp (tool version captured; full per-track parsing pending sample logs).
- Convenience helpers:
isFullyVerified,tracksWithErrors,tracksWithArMismatch,toJson. - Command-line tool
riplog:- JSON, text, and one-line summary output.
--help,--version,--quiet/-qflags.- Accepts multiple files (emits a JSON array) and reads from stdin
(
-or when piped). - Non-zero exit code on AR mismatch or track errors, for scripting / CI use.
- Tolerant of malformed input (truncated files, garbled lines, mixed line endings) — never throws on log content.
- Test suite: 155 tests covering unit parsing, CLI integration, JSON-shape goldens, Unicode filenames, and a parse-throughput smoke test.