cinebase 5.9.3 → 5.10.0
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 +6 -0
- data/lib/cinebase/audience.rb +1 -0
- data/lib/cinebase/event.rb +17 -1
- data/lib/cinebase/festival.rb +6 -4
- data/lib/cinebase/performance.rb +7 -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: 1b67130fa05f03842aea737a21037d7edcde83150a79fc1b08a1103254dce774
|
|
4
|
+
data.tar.gz: 28246516a82aaec038e6f8e5b04b08daec53982b14d6a247960ca0829dd76744
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 56a50db84fc430e120ae9f041b0b9ecef45c2b720a2ebcd114357645c141d703e88f36f49df3969ce1521f5ef89976a64bc1704544fde9c86bf8291ad965470a
|
|
7
|
+
data.tar.gz: ffecdc3674167e55deebb3d6d1befda86dd25a4ede4b2c8917f7f1c96dd3a4bacc4a2e471341120c0b5f1cca9a42344c5073dc370511b8b24967a9fadc2a7e21
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
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.10.0] - 2026-11-03
|
|
6
|
+
### Added
|
|
7
|
+
- Live sport is an `Event`: `Six Nations 2027 - England v France` gives the event Six Nations and the variant `sport`. The fixture keeps the competition in its film name. `Event#variant` is `arts` or `sport`.
|
|
8
|
+
- `Festival.from_title` takes `names:`, and `Performance.festival_names` lets a chain name a short form that differs by place, such as NFF.
|
|
9
|
+
- `+ Mulled Wine` marks the `mulled_wine` variant, and festival prefixes after `DocHouse:` are read.
|
|
10
|
+
|
|
5
11
|
## [5.9.3] - 2026-11-03
|
|
6
12
|
### Added
|
|
7
13
|
- 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:`.
|
data/lib/cinebase/audience.rb
CHANGED
|
@@ -12,6 +12,7 @@ module Cinebase
|
|
|
12
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
|
+
'mulled_wine' => [/\s*\+\s*Mulled Wine\b.*\z/i],
|
|
15
16
|
'subtitled' => [/\([^)]*\bsubtitles\)/i],
|
|
16
17
|
'preview' => [
|
|
17
18
|
/\s*[-–]\s*(?:Special )?Preview\z/i,
|
data/lib/cinebase/event.rb
CHANGED
|
@@ -17,10 +17,17 @@ module Cinebase
|
|
|
17
17
|
|
|
18
18
|
PREFIX = Regexp.union(PREFIXES.values)
|
|
19
19
|
|
|
20
|
+
# Live sport, keyed by competition. The fixture keeps the competition in
|
|
21
|
+
# its name, as next year's "England v France" is another match.
|
|
22
|
+
SPORTS = {
|
|
23
|
+
'Six Nations' => /\ASix Nations\b/,
|
|
24
|
+
'World Rugby Nations Championship' => /\AWorld Rugby Nations Championship\b/
|
|
25
|
+
}.freeze
|
|
26
|
+
|
|
20
27
|
# @param [String] film_name sanitized film name, e.g. "Met Opera: Tosca"
|
|
21
28
|
# @return [Cinebase::Event, nil]
|
|
22
29
|
def self.from_name(film_name)
|
|
23
|
-
name, = PREFIXES.find { |_, prefix| film_name.match?(prefix) }
|
|
30
|
+
name, = PREFIXES.merge(SPORTS).find { |_, prefix| film_name.match?(prefix) }
|
|
24
31
|
new(name: name) if name
|
|
25
32
|
end
|
|
26
33
|
|
|
@@ -29,5 +36,14 @@ module Cinebase
|
|
|
29
36
|
def self.strip(film_name)
|
|
30
37
|
film_name.sub(PREFIX, '')
|
|
31
38
|
end
|
|
39
|
+
|
|
40
|
+
# @return [String] the screening variant the event adds: arts or sport
|
|
41
|
+
def variant
|
|
42
|
+
if SPORTS.key?(name)
|
|
43
|
+
'sport'
|
|
44
|
+
else
|
|
45
|
+
'arts'
|
|
46
|
+
end
|
|
47
|
+
end
|
|
32
48
|
end
|
|
33
49
|
end
|
data/lib/cinebase/festival.rb
CHANGED
|
@@ -34,7 +34,7 @@ module Cinebase
|
|
|
34
34
|
/\A(Cine-Excess) (20\d{2}): /,
|
|
35
35
|
/\A(Cinemagic) (\d{4}) -/,
|
|
36
36
|
/\A(Horror Season) (20\d{2}) /,
|
|
37
|
-
/\A(#{NAME_PATTERN})(?: ?((?:20)?\d{2}))?(?:\s*[:–-]\s*|\s+(?=Shorts:))/
|
|
37
|
+
/\A(?:DocHouse:\s*)?(#{NAME_PATTERN})(?: ?((?:20)?\d{2}))?(?:\s*[:–-]\s*|\s+(?=Shorts:))/
|
|
38
38
|
].freeze
|
|
39
39
|
|
|
40
40
|
# A festival named after the film, such as "Party USA - NFF UK Premier"
|
|
@@ -43,18 +43,20 @@ module Cinebase
|
|
|
43
43
|
# A festival in brackets after the film, such as "Coward (French Film Festival)"
|
|
44
44
|
BRACKETED = /\s*\((#{NAME_PATTERN})(?: ((?:20)?\d{2}))?\)/
|
|
45
45
|
|
|
46
|
-
PATTERNS =[*PREFIXES, SUFFIX, BRACKETED].freeze
|
|
46
|
+
PATTERNS = [*PREFIXES, SUFFIX, BRACKETED].freeze
|
|
47
47
|
|
|
48
48
|
CENTURY = 2000
|
|
49
49
|
|
|
50
50
|
# @param [String] title raw film title
|
|
51
51
|
# @param [Integer] year the edition when the title gives none, usually the
|
|
52
52
|
# screening's year
|
|
53
|
+
# @param [Hash{String => String}] names full names for short forms that
|
|
54
|
+
# differ by chain, such as NFF
|
|
53
55
|
# @return [Cinebase::Festival, nil]
|
|
54
|
-
def self.from_title(title, year:)
|
|
56
|
+
def self.from_title(title, year:, names: {})
|
|
55
57
|
PATTERNS.each do |pattern|
|
|
56
58
|
match = title.match(pattern)
|
|
57
|
-
return new(name: FULL_NAMES.fetch(match[1], match[1]), year: edition(match[2]) || year) if match
|
|
59
|
+
return new(name: FULL_NAMES.merge(names).fetch(match[1], match[1]), year: edition(match[2]) || year) if match
|
|
58
60
|
end
|
|
59
61
|
nil
|
|
60
62
|
end
|
data/lib/cinebase/performance.rb
CHANGED
|
@@ -43,9 +43,14 @@ module Cinebase
|
|
|
43
43
|
starting_at.to_date
|
|
44
44
|
end
|
|
45
45
|
|
|
46
|
+
# Full names for festival short forms that differ by chain, such as NFF
|
|
47
|
+
def self.festival_names
|
|
48
|
+
{}
|
|
49
|
+
end
|
|
50
|
+
|
|
46
51
|
# Given, or named by the raw title
|
|
47
52
|
def festival
|
|
48
|
-
@festival || (title && Festival.from_title(title, year: starting_at.year))
|
|
53
|
+
@festival || (title && Festival.from_title(title, year: starting_at.year, names: self.class.festival_names))
|
|
49
54
|
end
|
|
50
55
|
|
|
51
56
|
# The show's own name when it is an Event, e.g. "Tosca"
|
|
@@ -72,7 +77,7 @@ module Cinebase
|
|
|
72
77
|
|
|
73
78
|
def title_variants
|
|
74
79
|
audiences = title ? Audience.variants(title) : []
|
|
75
|
-
event ? audiences +
|
|
80
|
+
event ? audiences + [event.variant] : audiences
|
|
76
81
|
end
|
|
77
82
|
end
|
|
78
83
|
end
|
data/lib/cinebase/version.rb
CHANGED