watchbuffy 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +11 -2
- data/bin/watchbuffy +4 -1
- data/data/buffyverse-episodes.json +113 -29
- data/lib/watchbuffy.rb +3 -2
- data/lib/watchbuffy/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df8fa7c51b4ea03333be170dc85d29cd44e685f72d566b79ab17411ea9a9b3e2
|
4
|
+
data.tar.gz: 24ccfad72c083217c43e300c95c5fa12b1952e140739ca283a82efc2a5466961
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf5dbdea2fd9b892a07cc66389f519f98036f126c922ec8601209f8dc12e85d3a95fffe7ea368c138c73c92ec4c30725faab02e2fd8a923235cf50926d4cbd20
|
7
|
+
data.tar.gz: 113d595ef45ff31642f5928816e4df2473b495d1ad5c3da5dea53eadfbed80e4dec9da24f64e6d7adf1eb2fb065020aa6a0c7ae926477c92282fe92a324adc35
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -21,11 +21,11 @@ $ watchbuffy
|
|
21
21
|
▶️ Watch Buffy episode 6×8: "Tabula Rasa"
|
22
22
|
```
|
23
23
|
|
24
|
-
Run it again to get a new suggestion
|
24
|
+
Run it again to get a new suggestion:
|
25
25
|
|
26
26
|
```
|
27
27
|
$ watchbuffy
|
28
|
-
▶️ Watch
|
28
|
+
▶️ Watch Angel episode 2×2: "Are You Now or Have You Ever Been"
|
29
29
|
```
|
30
30
|
|
31
31
|
It supports a list of seasons to consider:
|
@@ -40,6 +40,15 @@ $ watchbuffy --angel-season 4,5
|
|
40
40
|
▶️ Watch Angel episode 5×14: "Smile Time"
|
41
41
|
```
|
42
42
|
|
43
|
+
### Advanced Options
|
44
|
+
|
45
|
+
You can pass in a command-line option to ignore certain characters. By now, only Connor is supported:
|
46
|
+
|
47
|
+
```
|
48
|
+
$ watchbuffy --angel-season 4 --no-connor
|
49
|
+
No episode found
|
50
|
+
```
|
51
|
+
|
43
52
|
## MIT License
|
44
53
|
|
45
54
|
Copyright (C) 2018 Jan Lelis <http://janlelis.com>. Released under the MIT license.
|
data/bin/watchbuffy
CHANGED
@@ -5,7 +5,7 @@ require_relative "../lib/watchbuffy"
|
|
5
5
|
require "rationalist"
|
6
6
|
|
7
7
|
args = Rationalist.parse(
|
8
|
-
string: ["show", "buffy-season", "angel-season"]
|
8
|
+
string: ["show", "buffy-season", "angel-season", "connor"]
|
9
9
|
)
|
10
10
|
|
11
11
|
options = {}
|
@@ -17,6 +17,9 @@ elsif args[:"buffy-season"] && !args[:"angel-season"]
|
|
17
17
|
elsif args[:"angel-season"] && !args[:"buffy-season"]
|
18
18
|
options[:show] = "angel"
|
19
19
|
end
|
20
|
+
if args[:connor] == false
|
21
|
+
options[:exclude_characters] = "Connor"
|
22
|
+
end
|
20
23
|
|
21
24
|
options[:buffy_season] = args[:"buffy-season"].split(",").map(&:to_i) if args[:"buffy-season"]
|
22
25
|
options[:angel_season] = args[:"angel-season"].split(",").map(&:to_i) if args[:"angel-season"]
|
@@ -2,7 +2,7 @@
|
|
2
2
|
"name": "buffyverse-episodes",
|
3
3
|
"description": "List of all Buffy and Angel TV episodes",
|
4
4
|
"from": "https://github.com/janlelis/watchbuffy",
|
5
|
-
"version": "1.0.
|
5
|
+
"version": "1.0.2",
|
6
6
|
"episodes": [
|
7
7
|
{
|
8
8
|
"show": "buffy",
|
@@ -1263,158 +1263,236 @@
|
|
1263
1263
|
"show": "angel",
|
1264
1264
|
"season": 3,
|
1265
1265
|
"numberInSeason": 19,
|
1266
|
-
"title": "The Price"
|
1266
|
+
"title": "The Price",
|
1267
|
+
"includesCharacters": [
|
1268
|
+
"Connor"
|
1269
|
+
]
|
1267
1270
|
},
|
1268
1271
|
{
|
1269
1272
|
"show": "angel",
|
1270
1273
|
"season": 3,
|
1271
1274
|
"numberInSeason": 20,
|
1272
|
-
"title": "A New World"
|
1275
|
+
"title": "A New World",
|
1276
|
+
"includesCharacters": [
|
1277
|
+
"Connor"
|
1278
|
+
]
|
1273
1279
|
},
|
1274
1280
|
{
|
1275
1281
|
"show": "angel",
|
1276
1282
|
"season": 3,
|
1277
1283
|
"numberInSeason": 21,
|
1278
|
-
"title": "Benediction"
|
1284
|
+
"title": "Benediction",
|
1285
|
+
"includesCharacters": [
|
1286
|
+
"Connor"
|
1287
|
+
]
|
1279
1288
|
},
|
1280
1289
|
{
|
1281
1290
|
"show": "angel",
|
1282
1291
|
"season": 3,
|
1283
1292
|
"numberInSeason": 22,
|
1284
|
-
"title": "Tomorrow"
|
1293
|
+
"title": "Tomorrow",
|
1294
|
+
"includesCharacters": [
|
1295
|
+
"Connor"
|
1296
|
+
]
|
1285
1297
|
},
|
1286
1298
|
|
1287
1299
|
{
|
1288
1300
|
"show": "angel",
|
1289
1301
|
"season": 4,
|
1290
1302
|
"numberInSeason": 1,
|
1291
|
-
"title": "Deep Down"
|
1303
|
+
"title": "Deep Down",
|
1304
|
+
"includesCharacters": [
|
1305
|
+
"Connor"
|
1306
|
+
]
|
1292
1307
|
},
|
1293
1308
|
{
|
1294
1309
|
"show": "angel",
|
1295
1310
|
"season": 4,
|
1296
1311
|
"numberInSeason": 2,
|
1297
|
-
"title": "Ground State"
|
1312
|
+
"title": "Ground State",
|
1313
|
+
"includesCharacters": [
|
1314
|
+
"Connor"
|
1315
|
+
]
|
1298
1316
|
},
|
1299
1317
|
{
|
1300
1318
|
"show": "angel",
|
1301
1319
|
"season": 4,
|
1302
1320
|
"numberInSeason": 3,
|
1303
|
-
"title": "The House Always Wins"
|
1321
|
+
"title": "The House Always Wins",
|
1322
|
+
"includesCharacters": [
|
1323
|
+
"Connor"
|
1324
|
+
]
|
1304
1325
|
},
|
1305
1326
|
{
|
1306
1327
|
"show": "angel",
|
1307
1328
|
"season": 4,
|
1308
1329
|
"numberInSeason": 4,
|
1309
|
-
"title": "Slouching Toward Bethlehem"
|
1330
|
+
"title": "Slouching Toward Bethlehem",
|
1331
|
+
"includesCharacters": [
|
1332
|
+
"Connor"
|
1333
|
+
]
|
1310
1334
|
},
|
1311
1335
|
{
|
1312
1336
|
"show": "angel",
|
1313
1337
|
"season": 4,
|
1314
1338
|
"numberInSeason": 5,
|
1315
|
-
"title": "Supersymmetry"
|
1339
|
+
"title": "Supersymmetry",
|
1340
|
+
"includesCharacters": [
|
1341
|
+
"Connor"
|
1342
|
+
]
|
1316
1343
|
},
|
1317
1344
|
{
|
1318
1345
|
"show": "angel",
|
1319
1346
|
"season": 4,
|
1320
1347
|
"numberInSeason": 6,
|
1321
|
-
"title": "Spin the Bottle"
|
1348
|
+
"title": "Spin the Bottle",
|
1349
|
+
"includesCharacters": [
|
1350
|
+
"Connor"
|
1351
|
+
]
|
1322
1352
|
},
|
1323
1353
|
{
|
1324
1354
|
"show": "angel",
|
1325
1355
|
"season": 4,
|
1326
1356
|
"numberInSeason": 7,
|
1327
|
-
"title": "Apocalypse, Nowish"
|
1357
|
+
"title": "Apocalypse, Nowish",
|
1358
|
+
"includesCharacters": [
|
1359
|
+
"Connor"
|
1360
|
+
]
|
1328
1361
|
},
|
1329
1362
|
{
|
1330
1363
|
"show": "angel",
|
1331
1364
|
"season": 4,
|
1332
1365
|
"numberInSeason": 8,
|
1333
|
-
"title": "Habeas Corpses"
|
1366
|
+
"title": "Habeas Corpses",
|
1367
|
+
"includesCharacters": [
|
1368
|
+
"Connor"
|
1369
|
+
]
|
1334
1370
|
},
|
1335
1371
|
{
|
1336
1372
|
"show": "angel",
|
1337
1373
|
"season": 4,
|
1338
1374
|
"numberInSeason": 9,
|
1339
|
-
"title": "Long Day's Journey"
|
1375
|
+
"title": "Long Day's Journey",
|
1376
|
+
"includesCharacters": [
|
1377
|
+
"Connor"
|
1378
|
+
]
|
1340
1379
|
},
|
1341
1380
|
{
|
1342
1381
|
"show": "angel",
|
1343
1382
|
"season": 4,
|
1344
1383
|
"numberInSeason": 10,
|
1345
|
-
"title": "Awakening"
|
1384
|
+
"title": "Awakening",
|
1385
|
+
"includesCharacters": [
|
1386
|
+
"Connor"
|
1387
|
+
]
|
1346
1388
|
},
|
1347
1389
|
{
|
1348
1390
|
"show": "angel",
|
1349
1391
|
"season": 4,
|
1350
1392
|
"numberInSeason": 11,
|
1351
|
-
"title": "Soulless"
|
1393
|
+
"title": "Soulless",
|
1394
|
+
"includesCharacters": [
|
1395
|
+
"Connor"
|
1396
|
+
]
|
1352
1397
|
},
|
1353
1398
|
{
|
1354
1399
|
"show": "angel",
|
1355
1400
|
"season": 4,
|
1356
1401
|
"numberInSeason": 12,
|
1357
|
-
"title": "Calvary"
|
1402
|
+
"title": "Calvary",
|
1403
|
+
"includesCharacters": [
|
1404
|
+
"Connor"
|
1405
|
+
]
|
1358
1406
|
},
|
1359
1407
|
{
|
1360
1408
|
"show": "angel",
|
1361
1409
|
"season": 4,
|
1362
1410
|
"numberInSeason": 13,
|
1363
|
-
"title": "Salvage"
|
1411
|
+
"title": "Salvage",
|
1412
|
+
"includesCharacters": [
|
1413
|
+
"Connor"
|
1414
|
+
]
|
1364
1415
|
},
|
1365
1416
|
{
|
1366
1417
|
"show": "angel",
|
1367
1418
|
"season": 4,
|
1368
1419
|
"numberInSeason": 14,
|
1369
|
-
"title": "Release"
|
1420
|
+
"title": "Release",
|
1421
|
+
"includesCharacters": [
|
1422
|
+
"Connor"
|
1423
|
+
]
|
1370
1424
|
},
|
1371
1425
|
{
|
1372
1426
|
"show": "angel",
|
1373
1427
|
"season": 4,
|
1374
1428
|
"numberInSeason": 15,
|
1375
|
-
"title": "Orpheus"
|
1429
|
+
"title": "Orpheus",
|
1430
|
+
"includesCharacters": [
|
1431
|
+
"Connor"
|
1432
|
+
]
|
1376
1433
|
},
|
1377
1434
|
{
|
1378
1435
|
"show": "angel",
|
1379
1436
|
"season": 4,
|
1380
1437
|
"numberInSeason": 16,
|
1381
|
-
"title": "Players"
|
1438
|
+
"title": "Players",
|
1439
|
+
"includesCharacters": [
|
1440
|
+
"Connor"
|
1441
|
+
]
|
1382
1442
|
},
|
1383
1443
|
{
|
1384
1444
|
"show": "angel",
|
1385
1445
|
"season": 4,
|
1386
1446
|
"numberInSeason": 17,
|
1387
|
-
"title": "Inside Out"
|
1447
|
+
"title": "Inside Out",
|
1448
|
+
"includesCharacters": [
|
1449
|
+
"Connor"
|
1450
|
+
]
|
1388
1451
|
},
|
1389
1452
|
{
|
1390
1453
|
"show": "angel",
|
1391
1454
|
"season": 4,
|
1392
1455
|
"numberInSeason": 18,
|
1393
|
-
"title": "Shiny Happy People"
|
1456
|
+
"title": "Shiny Happy People",
|
1457
|
+
"includesCharacters": [
|
1458
|
+
"Connor"
|
1459
|
+
]
|
1394
1460
|
},
|
1395
1461
|
{
|
1396
1462
|
"show": "angel",
|
1397
1463
|
"season": 4,
|
1398
1464
|
"numberInSeason": 19,
|
1399
|
-
"title": "The Magic Bullet"
|
1465
|
+
"title": "The Magic Bullet",
|
1466
|
+
"includesCharacters": [
|
1467
|
+
"Connor"
|
1468
|
+
]
|
1400
1469
|
},
|
1401
1470
|
{
|
1402
1471
|
"show": "angel",
|
1403
1472
|
"season": 4,
|
1404
1473
|
"numberInSeason": 20,
|
1405
|
-
"title": "Sacrifice"
|
1474
|
+
"title": "Sacrifice",
|
1475
|
+
"includesCharacters": [
|
1476
|
+
"Connor"
|
1477
|
+
]
|
1406
1478
|
},
|
1407
1479
|
{
|
1408
1480
|
"show": "angel",
|
1409
1481
|
"season": 4,
|
1410
1482
|
"numberInSeason": 21,
|
1411
|
-
"title": "Peace Out"
|
1483
|
+
"title": "Peace Out",
|
1484
|
+
"includesCharacters": [
|
1485
|
+
"Connor"
|
1486
|
+
]
|
1412
1487
|
},
|
1413
1488
|
{
|
1414
1489
|
"show": "angel",
|
1415
1490
|
"season": 4,
|
1416
1491
|
"numberInSeason": 22,
|
1417
|
-
"title": "Home"
|
1492
|
+
"title": "Home",
|
1493
|
+
"includesCharacters": [
|
1494
|
+
"Connor"
|
1495
|
+
]
|
1418
1496
|
},
|
1419
1497
|
|
1420
1498
|
{
|
@@ -1523,7 +1601,10 @@
|
|
1523
1601
|
"show": "angel",
|
1524
1602
|
"season": 5,
|
1525
1603
|
"numberInSeason": 18,
|
1526
|
-
"title": "Origin"
|
1604
|
+
"title": "Origin",
|
1605
|
+
"includesCharacters": [
|
1606
|
+
"Connor"
|
1607
|
+
]
|
1527
1608
|
},
|
1528
1609
|
{
|
1529
1610
|
"show": "angel",
|
@@ -1547,7 +1628,10 @@
|
|
1547
1628
|
"show": "angel",
|
1548
1629
|
"season": 5,
|
1549
1630
|
"numberInSeason": 22,
|
1550
|
-
"title": "Not Fade Away"
|
1631
|
+
"title": "Not Fade Away",
|
1632
|
+
"includesCharacters": [
|
1633
|
+
"Connor"
|
1634
|
+
]
|
1551
1635
|
}
|
1552
1636
|
]
|
1553
1637
|
}
|
data/lib/watchbuffy.rb
CHANGED
@@ -8,13 +8,14 @@ module Watchbuffy
|
|
8
8
|
ANGEL_SEASONS = [1, 2, 3, 4, 5]
|
9
9
|
|
10
10
|
class << self
|
11
|
-
def pick(show: %w[buffy angel], buffy_season: BUFFY_SEASONS, angel_season: ANGEL_SEASONS)
|
11
|
+
def pick(show: %w[buffy angel], buffy_season: BUFFY_SEASONS, angel_season: ANGEL_SEASONS, exclude_characters: [])
|
12
12
|
episode = EPISODES.select{ |e|
|
13
13
|
show.include?(e["show"]) &&
|
14
14
|
(
|
15
15
|
e["show"] == "buffy" && Array(buffy_season).include?(e["season"]) ||
|
16
16
|
e["show"] == "angel" && Array(angel_season).include?(e["season"])
|
17
|
-
)
|
17
|
+
) &&
|
18
|
+
(Array(e["includesCharacters"]) & Array(exclude_characters)).length.zero?
|
18
19
|
}.sample
|
19
20
|
|
20
21
|
if episode
|
data/lib/watchbuffy/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: watchbuffy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Lelis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-09-
|
11
|
+
date: 2018-09-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rationalist
|