cinebase 5.9.1 → 5.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -0
- data/lib/cinebase/a1web/performance.rb +1 -1
- data/lib/cinebase/audience.rb +7 -2
- data/lib/cinebase/event.rb +2 -1
- data/lib/cinebase/festival.rb +24 -4
- data/lib/cinebase/title_sanitizer.rb +5 -2
- data/lib/cinebase/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b3ac8fcd0aa75c6bd83bf57573243062934e29facf62f47ef5a8e8da84cd500b
|
|
4
|
+
data.tar.gz: 5e7989a03538de4200833f2aa3eab1ed0bebfc27f46e95b6526f5711f937f9ac
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 87be5f35f85ae4262cf552343e51546bf0f39bca4dbac73cf05e73bb3c7f327e740d06f3dd34749ca30f1768c51c0411e90530705a46e0f68f9d4a9fa1864911
|
|
7
|
+
data.tar.gz: e210368f288ea23eb89e424043503818a4ee7437afee72399ad98f0b84ab1c358976b78e5ba3ada7cdf2274c4c6f1edf705d0759fdb11df235fe68dd3d7309a3
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,21 @@
|
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
|
3
3
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
|
4
4
|
|
|
5
|
+
## [5.9.2] - 2026-11-03
|
|
6
|
+
### Changed
|
|
7
|
+
- Festivals take their full name, so chains agree: `CFF` is Cambridge Film Festival, `FFF` and `French Film Fest UK` are French Film Festival, `IFF` is Into Film Festival, `JFF` and `UKJFF` are UK Jewish Film Festival, `LPFF` is London Palestine Film Festival, `RFF` is Romanian Film Festival and `SLA` is Scotland Loves Anime.
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
- A `See It First –` prefix marks a preview, and bracketed subtitles, such as `(with subtitles)`, mark a subtitled screening.
|
|
11
|
+
- Paris Opera is an `Event`: `Paris Opera Ballet: Giselle` and `La Bayadère (Opéra de Paris)` give the prefix `Paris Opera: `.
|
|
12
|
+
- A festival named after the film, such as `Party USA - NFF UK Premier`, is read and stripped like a prefix. `Festival::PATTERNS` holds both.
|
|
13
|
+
- A1Web reads the language from `(Japanese Language with English Subtitles)`.
|
|
14
|
+
- `Dog-Friendly:` marks a dog-friendly screening, `: Preview and Q&A` a preview, and `NFF 2026 Shorts:` the NFF festival.
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
- `COMMON_REMOVE` strips a `Throwback:` prefix and a full stop left after a bracketed marker, such as `(35mm).`
|
|
18
|
+
- Titles in capitals with `WORLD TOUR` are title cased throughout, not just the words `World Tour`.
|
|
19
|
+
|
|
5
20
|
## [5.9.1] - 2026-11-03
|
|
6
21
|
### Fixed
|
|
7
22
|
- Titles with non-breaking spaces now match the common rules and audience labels.
|
|
@@ -21,7 +21,7 @@ module Cinebase
|
|
|
21
21
|
# A tag, or the title, as some chains list 3D and IMAX copies as films
|
|
22
22
|
THREE_D = /\b3D\b/i
|
|
23
23
|
IMAX = /\bIMAX\b/i
|
|
24
|
-
LANGUAGE = /\((#{TitleSanitizer::LANGUAGES.join('|')})(?: language)?\)/i
|
|
24
|
+
LANGUAGE = /\((#{TitleSanitizer::LANGUAGES.join('|')})(?: language)?(?: with [^)]*)?\)/i
|
|
25
25
|
TIME_ZONE = 'Europe/London'
|
|
26
26
|
|
|
27
27
|
# @return [Class] the chain's Cinebase::A1web::Cinema subclass
|
data/lib/cinebase/audience.rb
CHANGED
|
@@ -9,10 +9,15 @@ module Cinebase
|
|
|
9
9
|
LABELS = {
|
|
10
10
|
'kids' => [/\A(?:Toddler (?:Club|Kino)|Kids'? Club)\s*:\s*/i],
|
|
11
11
|
'relaxed' => [/\ARelaxed(?: Screening)?\s*:\s*/i, /#{SEPARATOR}(?:Sensory|Autism) Friendly Screening\z/i],
|
|
12
|
-
'dog_friendly' => [/\ADog-Friendly Screening\s
|
|
12
|
+
'dog_friendly' => [/\ADog-Friendly(?: Screening)?\s*[:\-–]\s*/i],
|
|
13
13
|
'baby' => [/\s*\(Parent (?:&|and) Baby(?: Only Show)?\)/i],
|
|
14
14
|
'members' => [/#{SEPARATOR}(?:Unlimited|MyOmnipass Member) Screening\z/i],
|
|
15
|
-
'
|
|
15
|
+
'subtitled' => [/\([^)]*\bsubtitles\)/i],
|
|
16
|
+
'preview' => [
|
|
17
|
+
/\s*[-–]\s*(?:Special )?Preview\z/i,
|
|
18
|
+
/\s*[:\-–]\s*Preview and Q(?:&|\+)A\z/i,
|
|
19
|
+
/\ASee It First\s*[-–:]\s*/i
|
|
20
|
+
]
|
|
16
21
|
}.freeze
|
|
17
22
|
|
|
18
23
|
PATTERNS = LABELS.values.flatten.freeze
|
data/lib/cinebase/event.rb
CHANGED
|
@@ -11,7 +11,8 @@ module Cinebase
|
|
|
11
11
|
'Royal Ballet and Opera' => /\A(?:Royal Ballet and Opera|The Royal Ballet|The Royal Opera): /,
|
|
12
12
|
'National Theatre Live' => /\A(?:National Theatre Live|National Theatre|NT Live): /,
|
|
13
13
|
'Exhibition on Screen' => /\AExhibition on Screen: /,
|
|
14
|
-
'Bolshoi Ballet' => /\ABolshoi(?: Ballet)?:
|
|
14
|
+
'Bolshoi Ballet' => /\ABolshoi(?: Ballet)?: /,
|
|
15
|
+
'Paris Opera' => /\AParis Opera: /
|
|
15
16
|
}.freeze
|
|
16
17
|
|
|
17
18
|
PREFIX = Regexp.union(PREFIXES.values)
|
data/lib/cinebase/festival.rb
CHANGED
|
@@ -11,14 +11,34 @@ module Cinebase
|
|
|
11
11
|
'Women and the World Festival'
|
|
12
12
|
].freeze
|
|
13
13
|
|
|
14
|
+
# Full names for short forms, so every chain names a festival alike
|
|
15
|
+
FULL_NAMES = {
|
|
16
|
+
'CFF' => 'Cambridge Film Festival',
|
|
17
|
+
'FFF' => 'French Film Festival',
|
|
18
|
+
'French Film Fest UK' => 'French Film Festival',
|
|
19
|
+
'IFF' => 'Into Film Festival',
|
|
20
|
+
'JFF' => 'UK Jewish Film Festival',
|
|
21
|
+
'LPFF' => 'London Palestine Film Festival',
|
|
22
|
+
'RFF' => 'Romanian Film Festival',
|
|
23
|
+
'SLA' => 'Scotland Loves Anime',
|
|
24
|
+
'UKJFF' => 'UK Jewish Film Festival'
|
|
25
|
+
}.freeze
|
|
26
|
+
|
|
27
|
+
NAME_PATTERN = NAMES.map { |name| Regexp.escape(name) }.join('|')
|
|
28
|
+
|
|
14
29
|
# Title prefixes naming a festival: the name, then the year when given
|
|
15
30
|
PREFIXES = [
|
|
16
31
|
/\A(Cine-Excess) (20\d{2}): /,
|
|
17
32
|
/\A(Cinemagic) (\d{4}) -/,
|
|
18
33
|
/\A(Horror Season) (20\d{2}) /,
|
|
19
|
-
/\A(#{
|
|
34
|
+
/\A(#{NAME_PATTERN})(?: ((?:20)?\d{2}))?(?:\s*[:–-]\s*|\s+(?=Shorts:))/
|
|
20
35
|
].freeze
|
|
21
36
|
|
|
37
|
+
# A festival named after the film, such as "Party USA - NFF UK Premier"
|
|
38
|
+
SUFFIX = /\s+[-–]\s+(#{NAME_PATTERN})\b(?: ((?:20)?\d{2})\b)?.*\z/
|
|
39
|
+
|
|
40
|
+
PATTERNS = [*PREFIXES, SUFFIX].freeze
|
|
41
|
+
|
|
22
42
|
CENTURY = 2000
|
|
23
43
|
|
|
24
44
|
# @param [String] title raw film title
|
|
@@ -26,9 +46,9 @@ module Cinebase
|
|
|
26
46
|
# screening's year
|
|
27
47
|
# @return [Cinebase::Festival, nil]
|
|
28
48
|
def self.from_title(title, year:)
|
|
29
|
-
|
|
30
|
-
match = title.match(
|
|
31
|
-
return new(name: match[1], year: edition(match[2]) || year) if match
|
|
49
|
+
PATTERNS.each do |pattern|
|
|
50
|
+
match = title.match(pattern)
|
|
51
|
+
return new(name: FULL_NAMES.fetch(match[1], match[1]), year: edition(match[2]) || year) if match
|
|
32
52
|
end
|
|
33
53
|
nil
|
|
34
54
|
end
|
|
@@ -42,10 +42,12 @@ module Cinebase
|
|
|
42
42
|
FILM_YEAR = /\s*\((1[89]\d{2}|20\d{2})\)(?=(?:\s*\([^)]*\))*\s*\z)/
|
|
43
43
|
|
|
44
44
|
COMMON_REMOVE = [
|
|
45
|
-
|
|
45
|
+
/(?<=\))\.\z/, # full stop after a marker
|
|
46
|
+
*Festival::PATTERNS, # festival prefix or suffix
|
|
46
47
|
*Audience::PATTERNS, # audience label
|
|
47
48
|
/\A(?:Opening|Closing|Centrepiece|Documentary)(?: Night)? Gala:\s*/i, # festival gala
|
|
48
49
|
/\A[^:]+?\s+presents:\s*/i, # presenter credit
|
|
50
|
+
/\AThrowback:\s*/i, # series prefix
|
|
49
51
|
/\s+[23]d\b/i, # dimension
|
|
50
52
|
/\s*\([23]D\)/i, # bracketed dimension
|
|
51
53
|
/\((#{LANGUAGES.join('|')})\)/i, # language version
|
|
@@ -88,7 +90,8 @@ module Cinebase
|
|
|
88
90
|
/\A(?:NT (?:Live|Encore)(?: Encore)?|NTL|National Theatre(?: Live)?)#{ARTS_SEPARATOR}(.*)/i => 'National Theatre Live: ',
|
|
89
91
|
/\AExhibition on Screen#{ARTS_SEPARATOR}(.*)/i => 'Exhibition on Screen: ',
|
|
90
92
|
/\ABolshoi(?: Ballet)?#{ARTS_SEPARATOR}(.*)/i => 'Bolshoi Ballet: ',
|
|
91
|
-
|
|
93
|
+
/\A(?:Paris Opera(?: Ballet)?|Op[ée]ra de Paris)#{ARTS_SEPARATOR}(.*)/i => 'Paris Opera: ',
|
|
94
|
+
/\A(.*?)\s*\(Op[ée]ra (?:national )?de Paris\)\z/i => 'Paris Opera: '
|
|
92
95
|
}.freeze
|
|
93
96
|
|
|
94
97
|
SMALL_WORDS = %w(a an and as at but by for from in into nor of on or the to v vs with).freeze
|
data/lib/cinebase/version.rb
CHANGED