-
Notifications
You must be signed in to change notification settings - Fork 0
/
basic.config.yaml
199 lines (195 loc) · 8.58 KB
/
basic.config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Basic config file to show what rock-paper-sand is all about.
# Filters for media items. These don't do anything by themselves, but they can
# be referenced by reports, below.
filters:
- # This filter uses JustWatch's API to match movies and TV shows that are
# available to watch at home at no additional cost on specific streaming
# services, not including already watched movies or episodes. Run
# `rock-paper-sand justwatch` and its subcommands to see the possible values
# for `providers` and `monetizationTypes`. Note that this will only work for
# media items that have a `justwatch` field.
#
# For media items that match, this will also add extra information in reports
# to show which of the listed streaming services the item is available on.
name: todo_availability_free_at_home_justwatch
filter:
justwatch:
country: US
providers:
- amazonprime
- netflix
monetizationTypes:
- flatrate # E.g., a paid subscription.
- free
- # Matches media items that have nothing remaining to watch/read/etc. The `or`
# filter matches anything that any of its child filters match. The `done`
# filter matches media with "all" in its `done` field. The `justwatch` filter
# additionally matches media where the `done` field covers all known episodes.
# E.g., it would match either `done: "all"` or `done: "1 - 7"` for a TV show
# with 7 seasons.
name: all_done
filter:
or:
filters:
- done: "all"
- justwatch:
country: US
allDone: true
- # Matches still-to-do media items that are available at no additional cost
# somewhere other than at home. Unlike
# todo_availability_free_at_home_justwatch above, this uses the free-form
# `customAvailability` field, so you'd have to fill that in manually to use
# something like this filter. The regex this uses matches anything that starts
# with "borrow from ", including values like "borrow from the library" and
# "borrow from my friend Alice".
#
# The `and` filter matches anything that all of its child filters match. `not`
# matches anything that its single child filter does not match. `ref`
# references the filter "all_done" that was defined above.
#
# There is not yet support for programmatically looking up items in a public
# library's catalog, so you still need to look them up manually and use a
# filter like this to track media at the library. Adding a field for ISBN,
# EIDR, or similar, and using that to programmatically check availability at a
# public library would be a great feature though, if anybody wants to
# contribute that.
name: todo_availability_free_not_at_home
filter:
and:
filters:
- customAvailability:
regex: "^borrow from "
- not:
ref: all_done
- # Matches still-to-do media items that are available at home at no additional
# cost, using the `customAvailability` field. As with
# todo_availability_free_not_at_home above, this uses the free-form
# `customAvailability` field, so it's all up to you what you put in that field
# and how you filter on it. This regex matches http:// and https:// URLs, for
# things that are available for free on the web, e.g., on YouTube or
# archive.org. But you could also match strings like "top shelf of the left
# bookshelf" for a physical book.
name: todo_availability_free_at_home_custom
filter:
and:
filters:
- customAvailability:
regex: "^https?://"
- not:
ref: all_done
- # Matches media items that are free at home in either way mentioned above.
name: todo_availability_free_at_home
filter:
or:
filters:
- ref: todo_availability_free_at_home_justwatch
- ref: todo_availability_free_at_home_custom
- # Matches media items that are free in any way mentioned above.
name: todo_availability_free
filter:
or:
filters:
- ref: todo_availability_free_at_home
- ref: todo_availability_free_not_at_home
- # This filter uses data from Wikidata to match media that's been partially but
# not completely released, like an ongoing TV show.
name: ongoing
filter:
wikidata:
releaseStatuses:
- ONGOING
# Reports about media items. These can be displayed on the console, or sent in
# email notifications when the results change.
reports:
- name: My Favorite Report
# Optional, only needed if you want email notifications for this report.
emailHeaders:
To: alice@example.com # Put your email address here.
sections:
- # Shows media that's free at home.
name: free-at-home
filter:
ref: todo_availability_free_at_home
- # Shows media that's free at home and not ongoing.
name: free-at-home-and-not-ongoing
filter:
and:
filters:
- ref: todo_availability_free_at_home
- not:
ref: ongoing
- # Shows media that's free somewhere other than at home, and not also free at
# home. E.g., if something is both at the library and on a streaming service
# you have, it won't show up in this section.
name: free-not-at-home
filter:
and:
filters:
- ref: todo_availability_free_not_at_home
- not:
ref: todo_availability_free_at_home
- # This just shows all the media defined below. It's probably not very useful
# when printing to the console, but it could be useful in an email if you
# check email from devices that don't have access to this config file.
name: all
filter:
all: {}
# Media items to keep track of and generate reports about.
media:
- # This is a movie that's already been watched.
name: "Monty Python and the Holy Grail (1975)"
done: "all"
wikidata: https://www.wikidata.org/wiki/Q25043
- # This is a movie that the user still wants to watch. It's available at the
# library, and it may or may not also be available on streaming services.
name: "Life of Brian (1979)"
customAvailability: "borrow from the library"
wikidata: https://www.wikidata.org/wiki/Q24953
justwatch: https://www.justwatch.com/us/movie/life-of-brian
- # This is a TV show with 4 series/seasons, and series 1 through 3 have been
# watched, so the todo_availability_free_at_home_justwatch filter above will
# check the specified streaming services for availability of series 4 only.
# Something similar can be used for ongoing TV shows (imagine this config file
# back when series 3 was released but series 4 was still upcoming), and
# filters like todo_availability_free_at_home_justwatch would only start
# matching after the next series/season is released.
name: "Monty Python's Flying Circus (1969)"
done: "1 - 3"
wikidata: https://www.wikidata.org/wiki/Q16401
justwatch: https://www.justwatch.com/us/tv-show/monty-pythons-flying-circus
- # You can also keep track of more obscure media that isn't in public databases
# like Wikidata or JustWatch. And you can group related media together however
# you want.
name: "Rock, Paper, Sand! the Extended Universe"
parts:
- # The book that started it all has already been read.
name: "Rock, Paper, Sand! the Book"
done: "all"
- # The comic book sequel to the book is available at the library.
name: "Rock, Paper, Sand! the Comic Book"
customAvailability: "borrow from the library"
- # The movie adaptation of the book is available on YouTube.
name: "Rock, Paper, Sand! the Movie"
customAvailability: "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
- # The movie's sequel (not based on the original book or comic book sequel)
# hasn't been released yet. Note that as this is defined now, it will never
# match one of the todo_availability_... filters because it doesn't have a
# `customAvailability` or `justwatch` field. But it would be possible to
# create a report section for unavailable media, and check it occasionally
# to see if anything has changed. The free-form `comment` field could make
# that easier to check, or you could use it for whatever else you want.
name: "Rock, Paper, Sand! the Sequel"
comment: "Maybe check if this will screen at the Rick Astley Film Festival?"