cinebase 5.9.1 → 5.9.3

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: ddfc1ea3e2cacacf74828b2e586840907802ca0685fadca5a57aec629144f1d1
4
- data.tar.gz: dd598494811d3c2c5c62f4774045d84a30790665f17e097fbf14f55d670ee785
3
+ metadata.gz: ffabe8bcfcbe9896be6fbb27f3a067729e6d3e7444bcf32452908a392cd93e6d
4
+ data.tar.gz: b823bdaff6ed9cfe85e92890514c72b157af85250bfd4e704d2a4190476dc4ba
5
5
  SHA512:
6
- metadata.gz: 31bd8500df420827e1fa3ec31f5d58ba89537f17cb6fec9f753f18a7e0188f1369ee4b0822aeb787873e0945eb53c00d0d33a465372df0a1fe677bb862639ad8
7
- data.tar.gz: 41ef31ab861f2eec0ed0052b35b93a304e0bb5ae058909653df62d9b06cfdab5636aefc1eb948714926ca44ebb9265f934ae7297335267eb55c59d8b53a11092
6
+ metadata.gz: 4e5cb3d6be63d00e6c0f177e93f815f729b3ef046f08205600dd6db389917d75e638e50f9c9f1225674f728ecd36abf4b45a0355d9e16370d335ccc2d63228d8
7
+ data.tar.gz: '0792164a88db56abcb6eef6eb4d1c3e223921ad2d47a332417c688442db6b29397d60d7e327b65f6549981c2c3e8d17eb2848ee1d0854a7cb58a936bb8d7e155'
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.3] - 2026-11-03
6
+ ### Added
7
+ - Festivals named in full, such as `UK Jewish Film Festival:` and `Women and the World International Film Festival:`, in brackets after the film, such as `Coward (French Film Festival)`, or with the year next to the name, such as `FFF26:`.
8
+ - `Dog Friendly:` without a hyphen marks a dog-friendly screening, and `(Preview)` or `[Preview]` a preview.
9
+
10
+ ## [5.9.2] - 2026-11-03
11
+ ### Changed
12
+ - 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.
13
+
14
+ ### Added
15
+ - A `See It First –` prefix marks a preview, and bracketed subtitles, such as `(with subtitles)`, mark a subtitled screening.
16
+ - Paris Opera is an `Event`: `Paris Opera Ballet: Giselle` and `La Bayadère (Opéra de Paris)` give the prefix `Paris Opera: `.
17
+ - A festival named after the film, such as `Party USA - NFF UK Premier`, is read and stripped like a prefix. `Festival::PATTERNS` holds both.
18
+ - A1Web reads the language from `(Japanese Language with English Subtitles)`.
19
+ - `Dog-Friendly:` marks a dog-friendly screening, `: Preview and Q&A` a preview, and `NFF 2026 Shorts:` the NFF festival.
20
+
21
+ ### Fixed
22
+ - `COMMON_REMOVE` strips a `Throwback:` prefix and a full stop left after a bracketed marker, such as `(35mm).`
23
+ - Titles in capitals with `WORLD TOUR` are title cased throughout, not just the words `World Tour`.
24
+
5
25
  ## [5.9.1] - 2026-11-03
6
26
  ### Fixed
7
27
  - 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
@@ -9,10 +9,16 @@ 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*[(\[]Preview[)\]]/i,
19
+ /\s*[:\-–]\s*Preview and Q(?:&|\+)A\z/i,
20
+ /\ASee It First\s*[-–:]\s*/i
21
+ ]
16
22
  }.freeze
17
23
 
18
24
  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)
@@ -6,19 +6,45 @@ module Cinebase
6
6
  # An annual festival edition a film is screened in
7
7
  class Festival
8
8
  NAMES = [
9
- 'CFF', 'Cinecity', 'FFF', 'French Film Fest UK', 'IFF', 'Into Film Festival', 'JFF', 'LDNDOCS',
10
- 'London Palestine Film Festival', 'LPFF', 'NFF', 'Queer East', 'RFF', 'SLA', 'UKJFF',
11
- 'Women and the World Festival'
9
+ 'CFF', 'Cinecity', 'FFF', 'French Film Fest UK', 'French Film Festival', 'IFF', 'Into Film Festival',
10
+ 'JFF', 'LDNDOCS', 'London Palestine Film Festival', 'LPFF', 'NFF', 'Queer East', 'RFF', 'SLA',
11
+ 'UK Jewish Film Festival', 'UKJFF', 'Women and the World', 'Women and the World Festival',
12
+ 'Women and the World International Film Festival'
12
13
  ].freeze
13
14
 
15
+ # Full names for short forms, so every chain names a festival alike
16
+ FULL_NAMES = {
17
+ 'CFF' => 'Cambridge Film Festival',
18
+ 'FFF' => 'French Film Festival',
19
+ 'French Film Fest UK' => 'French Film Festival',
20
+ 'IFF' => 'Into Film Festival',
21
+ 'JFF' => 'UK Jewish Film Festival',
22
+ 'LPFF' => 'London Palestine Film Festival',
23
+ 'RFF' => 'Romanian Film Festival',
24
+ 'SLA' => 'Scotland Loves Anime',
25
+ 'UKJFF' => 'UK Jewish Film Festival',
26
+ 'Women and the World' => 'Women and the World Festival',
27
+ 'Women and the World International Film Festival' => 'Women and the World Festival'
28
+ }.freeze
29
+
30
+ NAME_PATTERN = NAMES.sort_by { |name| -name.length }.map { |name| Regexp.escape(name) }.join('|')
31
+
14
32
  # Title prefixes naming a festival: the name, then the year when given
15
33
  PREFIXES = [
16
34
  /\A(Cine-Excess) (20\d{2}): /,
17
35
  /\A(Cinemagic) (\d{4}) -/,
18
36
  /\A(Horror Season) (20\d{2}) /,
19
- /\A(#{NAMES.map { |name| Regexp.escape(name) }.join('|')})(?: ((?:20)?\d{2}))?\s*[:–-]\s*/
37
+ /\A(#{NAME_PATTERN})(?: ?((?:20)?\d{2}))?(?:\s*[:–-]\s*|\s+(?=Shorts:))/
20
38
  ].freeze
21
39
 
40
+ # A festival named after the film, such as "Party USA - NFF UK Premier"
41
+ SUFFIX = /\s+[-–]\s+(#{NAME_PATTERN})\b(?: ((?:20)?\d{2})\b)?.*\z/
42
+
43
+ # A festival in brackets after the film, such as "Coward (French Film Festival)"
44
+ BRACKETED = /\s*\((#{NAME_PATTERN})(?: ((?:20)?\d{2}))?\)/
45
+
46
+ PATTERNS =[*PREFIXES, SUFFIX, BRACKETED].freeze
47
+
22
48
  CENTURY = 2000
23
49
 
24
50
  # @param [String] title raw film title
@@ -26,9 +52,9 @@ module Cinebase
26
52
  # screening's year
27
53
  # @return [Cinebase::Festival, nil]
28
54
  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
55
+ PATTERNS.each do |pattern|
56
+ match = title.match(pattern)
57
+ return new(name: FULL_NAMES.fetch(match[1], match[1]), year: edition(match[2]) || year) if match
32
58
  end
33
59
  nil
34
60
  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
- *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
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
- /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: '
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
@@ -2,5 +2,5 @@
2
2
 
3
3
  # Cinebase version
4
4
  module Cinebase
5
- VERSION = '5.9.1'
5
+ VERSION = '5.9.3'
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.1
4
+ version: 5.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Croll