cinebase 5.9.0 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7eff40769f29794d20f66b87e8d78a5295e6efb32acd0b59d7c2189456c1d98a
4
- data.tar.gz: fabfa47d703f1aa2b4d8c6a06773a6435a36c974fd8775367ad844b7fec6f254
3
+ metadata.gz: b3ac8fcd0aa75c6bd83bf57573243062934e29facf62f47ef5a8e8da84cd500b
4
+ data.tar.gz: 5e7989a03538de4200833f2aa3eab1ed0bebfc27f46e95b6526f5711f937f9ac
5
5
  SHA512:
6
- metadata.gz: 429d9f452ab938b0c1e8e353c18efcc52c374698a9c38d27e60d09ef3001d0ae1226aff4015f28b60ed1c915e2af59389701fd1ecb515f7e30d689b54bcbe1ca
7
- data.tar.gz: b9c3e3a3834facd2f41448c3788c76a693d57081fa844266706415df4bfd4bbeb1a178aeb3e159da1d6b44d19bd6524d6d06094b383e686f6a05de750e46c983
6
+ metadata.gz: 87be5f35f85ae4262cf552343e51546bf0f39bca4dbac73cf05e73bb3c7f327e740d06f3dd34749ca30f1768c51c0411e90530705a46e0f68f9d4a9fa1864911
7
+ data.tar.gz: e210368f288ea23eb89e424043503818a4ee7437afee72399ad98f0b84ab1c358976b78e5ba3ada7cdf2274c4c6f1edf705d0759fdb11df235fe68dd3d7309a3
data/CHANGELOG.md CHANGED
@@ -2,6 +2,26 @@
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
+
20
+ ## [5.9.1] - 2026-11-03
21
+ ### Fixed
22
+ - Titles with non-breaking spaces now match the common rules and audience labels.
23
+ - `COMMON_REMOVE` also strips presenter credits such as `Bar Trash Presents:`, an anniversary at the end of a title without brackets, `– Live On Stage` with an en dash, Q&A add-ons naming a `Dir.`, and bracketed Q&As.
24
+
5
25
  ## [5.9.0] - 2026-11-03
6
26
  ### Added
7
27
  - `Cinebase::Event` for opera, ballet, theatre and exhibition screenings. `Performance#event` names the series from the `film_name` prefix the title sanitizer gives, such as `Met Opera: `, and `Performance#film_name` leaves it out.
@@ -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
@@ -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*:\s*/i],
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
- 'preview' => [/\s*[-–]\s*(?:Special )?Preview\z/i]
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
@@ -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)
@@ -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(#{NAMES.map { |name| Regexp.escape(name) }.join('|')})(?: ((?:20)?\d{2}))?\s*[:–-]\s*/
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
- PREFIXES.each do |prefix|
30
- match = title.match(prefix)
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
@@ -21,7 +21,7 @@ module Cinebase
21
21
  @film_year = options.fetch(:film_year, nil)
22
22
  @language = options.fetch(:language, nil)
23
23
  @time = options.fetch(:starting_at)
24
- @title = options.fetch(:title, nil)
24
+ @title = options.fetch(:title, nil)&.gsub(/[[:space:]]/, ' ')
25
25
  @variant = options.fetch(:variant, [])
26
26
  end
27
27
 
@@ -5,7 +5,7 @@ module Cinebase
5
5
  TitleSanitizer = Struct.new(:title) do
6
6
  def sanitized
7
7
  @sanitized ||= begin
8
- sanitized = title.dup
8
+ sanitized = title.gsub(/[[:space:]]/, ' ')
9
9
  remove.each do |pattern|
10
10
  sanitized.gsub! pattern, ''
11
11
  end
@@ -42,9 +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
- *Festival::PREFIXES, # festival prefix
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
49
+ /\A[^:]+?\s+presents:\s*/i, # presenter credit
50
+ /\AThrowback:\s*/i, # series prefix
48
51
  /\s+[23]d\b/i, # dimension
49
52
  /\s*\([23]D\)/i, # bracketed dimension
50
53
  /\((#{LANGUAGES.join('|')})\)/i, # language version
@@ -53,14 +56,16 @@ module Cinebase
53
56
  /\s*\(4K(?: Restoration)?\)/i, # bracketed 4K restoration
54
57
  /\s*\((?:20\d{2} )?Encore\)/i, # bracketed encore
55
58
  /\s*\(Recorded\)/i, # recorded, not live
56
- /\s+-\s+Live On Stage\z/i, # filmed stage show
59
+ /\s+[-–]\s+Live On Stage\z/i, # filmed stage show
57
60
  /\(Re-release\)/i, # re-release
58
61
  FILM_YEAR, # film year, see .film_year
59
- /\s*\+\s*(?:[\w-]+\s+)*Q(?:&|\+)A\z/i, # Q&A add-on
62
+ /\s*\+\s*(?:[\w.-]+\s+)*Q(?:&|\+)A\z/i, # Q&A add-on
63
+ /\s*\((?:with )?[^)]*Q(?:&|\+)A\)/i, # bracketed Q&A
60
64
  /\s*\+\s*Discussion\z/i, # discussion add-on
61
65
  /\s*\+\s*(?:ScreenTalk|Intro(?:duction)?|Short Film)\z/i, # talk or short add-on
62
66
  /\s*\((35|70)mm\)/i, # film gauge
63
- /\s+4K(?: Restoration)?\b/i, # 4K restoration
67
+ /\s+4K(?: Restoration)?\b/i, # 4K restoration
68
+ /\s*[-–]?\s*\d+(?:st|nd|rd|th) Anniversary\z/i, # trailing anniversary
64
69
  /:\s*Encore\z/i, # encore
65
70
  /\bsing-?a-?long\z/i, # singalong
66
71
  'amp;' # html ampersands
@@ -85,7 +90,8 @@ module Cinebase
85
90
  /\A(?:NT (?:Live|Encore)(?: Encore)?|NTL|National Theatre(?: Live)?)#{ARTS_SEPARATOR}(.*)/i => 'National Theatre Live: ',
86
91
  /\AExhibition on Screen#{ARTS_SEPARATOR}(.*)/i => 'Exhibition on Screen: ',
87
92
  /\ABolshoi(?: Ballet)?#{ARTS_SEPARATOR}(.*)/i => 'Bolshoi Ballet: ',
88
- /WORLD TOUR(.*)/ => 'World Tour'
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: '
89
95
  }.freeze
90
96
 
91
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
@@ -2,5 +2,5 @@
2
2
 
3
3
  # Cinebase version
4
4
  module Cinebase
5
- VERSION = '5.9.0'
5
+ VERSION = '5.9.2'
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cinebase
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.9.0
4
+ version: 5.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Croll