From 883b8964b51cf66931128d3f32c09c4956c0ca70 Mon Sep 17 00:00:00 2001 From: Olezhich Date: Sat, 7 Mar 2026 14:59:05 +0300 Subject: [PATCH] support for REM COMPOSER, ISRC and PREGAP keywords without parsing their values has been added --- CHANGELOG.md | 6 +++++- cuetools/parser/lex.py | 4 ++++ cuetools/parser/parser.py | 6 ++++++ pyproject.toml | 2 +- tests/test_parser.py | 2 ++ 5 files changed, 18 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ddfa88d..4de6d59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,8 +5,11 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased] +## [1.1.1] - 2026-03-07 + ### Added - Replaygain [+-]a.bb dB pattern support. +- Support for *REM COMPOSER*, *ISRC* and *PREGAP* keywords without parsing their values. ## [1.1.0] - 2026-01-10 @@ -121,7 +124,8 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Dataclasses for data models. -[Unreleased]: https://github.com/Olezhich/CueTools/compare/v1.1.0...main +[Unreleased]: https://github.com/Olezhich/CueTools/compare/v1.1.1...main +[1.1.1]: https://github.com/Olezhich/CueTools/compare/v1.1.0...v1.1.1 [1.1.0]: https://github.com/Olezhich/CueTools/compare/v1.0.3...v1.1.0 [1.0.3]: https://github.com/Olezhich/CueTools/compare/v1.0.2...v1.0.3 [1.0.2]: https://github.com/Olezhich/CueTools/compare/v1.0.1...v1.0.2 diff --git a/cuetools/parser/lex.py b/cuetools/parser/lex.py index 7e107c6..4dcce05 100644 --- a/cuetools/parser/lex.py +++ b/cuetools/parser/lex.py @@ -22,11 +22,15 @@ class Token(Enum): DISCID = r'(DISCID)\b' COMMENT = r'(COMMENT)\b' + COMPOSER = r'(COMPOSER)\b' TRACK = r'TRACK (\d\d+)\b' AUDIO = r'(AUDIO)\b' INDEX = r'INDEX (\d\d)\b' + ISRC = r'(ISRC)\b' + PREGAP = r'(PREGAP)\b' + ARG_QUOTES = r'"(.*)"' ARG = r'(.*)' diff --git a/cuetools/parser/parser.py b/cuetools/parser/parser.py index 946f057..c8c8be3 100644 --- a/cuetools/parser/parser.py +++ b/cuetools/parser/parser.py @@ -107,6 +107,10 @@ def load_f_iter(cue: Iterator[str], strict_title_case: bool = False) -> AlbumDat filepath.lexeme, filepath.pos, ) + case Token.ISRC: + ... + case Token.PREGAP: + ... case Token.REM: rem_type = tokens[1] value = tokens[2] @@ -176,6 +180,8 @@ def load_f_iter(cue: Iterator[str], strict_title_case: bool = False) -> AlbumDat ... case Token.COMMENT: ... + case Token.COMPOSER: + ... case _: raise CueParseError( current_line, diff --git a/pyproject.toml b/pyproject.toml index 6497688..a88b003 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "cuetools" -version = "1.1.0" +version = "1.1.1" description = "Lightweight CUE sheet toolkit for Python" authors = [ {name = "Olezhich"} diff --git a/tests/test_parser.py b/tests/test_parser.py index 831840d..8ac9b04 100644 --- a/tests/test_parser.py +++ b/tests/test_parser.py @@ -131,6 +131,8 @@ def test_line_parsing(): cue_sheet = """FILE "track.flac" WAVE TRACK 01 AUDIO + ISRC GBAYE1001378 + REM COMPOSER "" INDEX 00 00:00:50 INDEX 01 00:00:65""" cue = cuetools.loads(cue_sheet)