saber 0.0.7 → 1.0.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.
- data/.gitignore +1 -0
- data/.travis.yml +4 -0
- data/CHANGELOG.md +3 -0
- data/Gemfile +18 -8
- data/Gemfile.lock +72 -33
- data/Guardfile +4 -0
- data/README.md +192 -52
- data/Rakefile +46 -0
- data/bin/1saber +5 -3
- data/bin/saber +4 -0
- data/bin/saber.bib +3 -0
- data/bin/saber.what +3 -0
- data/extconf.rb +4 -1
- data/lib/saber.rb +7 -13
- data/lib/saber/autofetcher.rb +8 -0
- data/lib/saber/autofetcher/client.rb +66 -0
- data/lib/saber/autofetcher/server.rb +78 -0
- data/lib/saber/cli.rb +65 -26
- data/lib/saber/{downloader.rb → fetcher.rb} +9 -11
- data/lib/saber/mechanize_ext.rb +136 -0
- data/lib/saber/rc.rb +3 -21
- data/lib/saber/task.rb +26 -11
- data/lib/saber/task/base.rb +18 -0
- data/lib/saber/task/clean.rb +18 -0
- data/lib/saber/task/generate.rb +38 -0
- data/lib/saber/task/make.rb +44 -0
- data/lib/saber/task/send.rb +21 -0
- data/lib/saber/task/upload.rb +37 -0
- data/lib/saber/tracker.rb +28 -0
- data/lib/saber/tracker/base.rb +115 -2
- data/lib/saber/tracker/bb.rb +244 -0
- data/lib/saber/tracker/bib.rb +225 -0
- data/lib/saber/tracker/ptp.rb +100 -0
- data/lib/saber/tracker/what.rb +55 -7
- data/lib/saber/ui.rb +65 -22
- data/lib/saber/version.rb +1 -1
- data/rutorrent/init.js +8 -9
- data/rutorrent/plugin.info +1 -1
- data/saber.gemspec +14 -10
- data/spec/data/_saber/.gitkeep +0 -0
- data/spec/saber/downloader_spec.rb +5 -2
- data/spec/saber/task_spec.rb +16 -0
- data/spec/saber/tracker/bib_spec.rb +24 -0
- data/spec/spec_helper.rb +25 -0
- data/templates/_saberrc +36 -0
- data/templates/bb/anime.yml +6 -0
- data/templates/bb/application.yml +7 -0
- data/templates/bb/audiobook.yml +12 -0
- data/templates/bb/comic.yml +7 -0
- data/templates/bb/documentary.yml +26 -0
- data/templates/bb/ebook.yml +8 -0
- data/templates/bb/elearning_video.yml +7 -0
- data/templates/bb/game_console.yml +6 -0
- data/templates/bb/game_pc.yml +6 -0
- data/templates/bb/magazine.yml +6 -0
- data/templates/bb/misc.yml +6 -0
- data/templates/bb/movie.yml +26 -0
- data/templates/bb/music.yml +21 -0
- data/templates/bb/tv.yml +6 -0
- data/templates/bib/application.yml +9 -0
- data/templates/bib/article.yml +18 -0
- data/templates/bib/audiobook.yml +17 -0
- data/templates/bib/comic.yml +22 -0
- data/templates/bib/ebook.yml +20 -0
- data/templates/bib/journal.yml +18 -0
- data/templates/bib/magazine.yml +18 -0
- data/templates/ptp/movie.yml +63 -0
- data/templates/ptp/movie_add.yml +35 -0
- data/templates/what/ebook.yml +6 -0
- data/templates/what/music.yml +2 -0
- data/templates/what/music_add.yml +2 -0
- metadata +182 -26
- data/doc/Development.md +0 -3
- data/lib/saber/client.rb +0 -58
- data/lib/saber/server.rb +0 -70
- data/saber.watchr +0 -23
data/spec/spec_helper.rb
CHANGED
@@ -6,6 +6,8 @@ $spec_data = File.expand_path("../data", __FILE__)
|
|
6
6
|
|
7
7
|
Saber::Rc._merge! Optimism <<EOF
|
8
8
|
p:
|
9
|
+
home = Pa("#{$spec_data}/_saber")
|
10
|
+
homerc = Pa("#{$spec_data}/_saberrc")
|
9
11
|
download = Pa("#{$spec_data}/download")
|
10
12
|
|
11
13
|
server:
|
@@ -17,9 +19,32 @@ server:
|
|
17
19
|
port = 8914
|
18
20
|
token = "token"
|
19
21
|
drb_uri = "druby://localhost:8915"
|
22
|
+
|
23
|
+
# upload
|
24
|
+
|
25
|
+
p:
|
26
|
+
watch = nil
|
27
|
+
|
28
|
+
username = "username"
|
29
|
+
|
30
|
+
bib:
|
31
|
+
username = "bib-username"
|
32
|
+
announce_url = "bib-announce_url"
|
33
|
+
|
34
|
+
ptp:
|
35
|
+
announce_url = "ptp-announce_url"
|
20
36
|
EOF
|
21
37
|
$log = Logger.new(StringIO.new)
|
22
38
|
|
39
|
+
require "thor"
|
40
|
+
Saber.ui = Saber::UI::Shell.new(Thor.new.shell)
|
41
|
+
|
42
|
+
require "vcr"
|
43
|
+
VCR.configure do |c|
|
44
|
+
c.cassette_library_dir = "spec/cassettes"
|
45
|
+
c.hook_into :webmock
|
46
|
+
end
|
47
|
+
|
23
48
|
RSpec.configure do |config|
|
24
49
|
def capture(stream)
|
25
50
|
begin
|
data/templates/_saberrc
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
p:
|
2
|
+
#watch = Pa("~/bt/watch") # OPTIONAL local watch directory. [saber-make]
|
3
|
+
remote_watch = Pa("bt/watch") # OPTIONAL remote watch directory. [saber-make]
|
4
|
+
fetcher_download = Pa("~/download") # aria2 download directory. [saber-fetch]
|
5
|
+
remote_download = Pa("~/bt") # remote bt download directory. [saber-fetch]
|
6
|
+
download = Pa("~/bt") # local bt download directory. [saber-clean]
|
7
|
+
|
8
|
+
server:
|
9
|
+
user = "x" # seedbox login name
|
10
|
+
host = "seedbox" # set seedbox ip address in /etc/hosts
|
11
|
+
|
12
|
+
# [saber-upload]
|
13
|
+
username = "foo" # default username for login into site.
|
14
|
+
|
15
|
+
bib:
|
16
|
+
username = "bar" # OPTIONAL per-site username. use default username if not set.
|
17
|
+
announce_url = "x" # [saber-make, saber-upload]
|
18
|
+
|
19
|
+
# [saber-fetch]
|
20
|
+
server:
|
21
|
+
ftp = "ftp://seedbox/bt"
|
22
|
+
|
23
|
+
xmpp:
|
24
|
+
jid = "x1@gmail.com"
|
25
|
+
password = "y1"
|
26
|
+
host = nil
|
27
|
+
port = nil
|
28
|
+
|
29
|
+
client:
|
30
|
+
xmpp:
|
31
|
+
jid = "x2@gmail.com"
|
32
|
+
password = "y2"
|
33
|
+
host = nil
|
34
|
+
port = nil
|
35
|
+
|
36
|
+
# vim: ft=ruby
|
@@ -0,0 +1,26 @@
|
|
1
|
+
type: Documentaries
|
2
|
+
title:
|
3
|
+
# BluRay R5 WEB-DL HD-DVD DVDRip DVDSCR HDTV PDTV SDTV VHSRip
|
4
|
+
# TeleSync CAM DVD9 DVD5 BluRay 3D BluRay RC HDRip VODRip
|
5
|
+
source:
|
6
|
+
# Video Codec
|
7
|
+
# x264 XVid MPEG-2 WMV-HD DivX
|
8
|
+
videoformat:
|
9
|
+
# Audio Codec
|
10
|
+
# AC-3 MP3 DTS PCM Vorbis AAC
|
11
|
+
audioformat:
|
12
|
+
# MKV MP4 AVI TS WMV VOB
|
13
|
+
container:
|
14
|
+
# 1080p 1080i 720p 720i 480p 480i SD
|
15
|
+
resolution:
|
16
|
+
remaster_title:
|
17
|
+
year:
|
18
|
+
tags:
|
19
|
+
# Description. DO NOT put mediainfo or screenshots in here.
|
20
|
+
desc:
|
21
|
+
# Mediainfo
|
22
|
+
release_info:
|
23
|
+
screenshot1:
|
24
|
+
screenshot2:
|
25
|
+
image:
|
26
|
+
scene:
|
@@ -0,0 +1,26 @@
|
|
1
|
+
type: Movies
|
2
|
+
title:
|
3
|
+
# BluRay R5 WEB-DL HD-DVD DVDRip DVDSCR HDTV PDTV SDTV VHSRip
|
4
|
+
# TeleSync CAM DVD9 DVD5 BluRay 3D BluRay RC HDRip VODRip
|
5
|
+
source:
|
6
|
+
# Video Codec
|
7
|
+
# x264 XVid MPEG-2 WMV-HD DivX
|
8
|
+
videoformat:
|
9
|
+
# Audio Codec
|
10
|
+
# AC-3 MP3 DTS PCM Vorbis AAC
|
11
|
+
audioformat:
|
12
|
+
# MKV MP4 AVI TS WMV VOB
|
13
|
+
container:
|
14
|
+
# 1080p 1080i 720p 720i 480p 480i SD
|
15
|
+
resolution:
|
16
|
+
remaster_title:
|
17
|
+
year:
|
18
|
+
tags:
|
19
|
+
# Description. DO NOT put mediainfo or screenshots in here.
|
20
|
+
desc:
|
21
|
+
# Mediainfo
|
22
|
+
release_info:
|
23
|
+
screenshot1:
|
24
|
+
screenshot2:
|
25
|
+
image:
|
26
|
+
scene:
|
@@ -0,0 +1,21 @@
|
|
1
|
+
type: Musics
|
2
|
+
artist:
|
3
|
+
title:
|
4
|
+
remaster:
|
5
|
+
year:
|
6
|
+
scene:
|
7
|
+
# MP3, FLAC, Ogg, ACC, DTS 5.1 Audio, 24bit FLAC
|
8
|
+
format:
|
9
|
+
# 192, V2 (VBR), 256, V0 (VBR), 320, Lossless, Other
|
10
|
+
bitrate:
|
11
|
+
# CD, DVD, Vinyl, Soundboard, DAT, Web
|
12
|
+
media:
|
13
|
+
# acoustic alternative ambient blues classic.rock classical country dance dubstep electronic
|
14
|
+
# experimental folk funk hardcore heavy.metal hip.hop indie indie.pop instrumental jazz metal
|
15
|
+
# pop post.hardcore post.rock progressive.rock psychedelic punk reggae rock soul trance trip.hop
|
16
|
+
tags:
|
17
|
+
image:
|
18
|
+
album_desc:
|
19
|
+
release_desc:
|
20
|
+
|
21
|
+
|
data/templates/bb/tv.yml
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
type: articles
|
2
|
+
Authors: REQUIRED
|
3
|
+
Title: REQUIRED
|
4
|
+
Pages: REQUIRED
|
5
|
+
Year: REQUIRED
|
6
|
+
YearTo:
|
7
|
+
Complete:
|
8
|
+
# "" EPUB PDF
|
9
|
+
Format: REQUIRED
|
10
|
+
# English German French Spanish Italian Latin Japanese Danish Swedish Norwegian
|
11
|
+
# Dutch Russian Polish Portuguese Greek Irish Gaelic Korean Chinese Arabic
|
12
|
+
Language:
|
13
|
+
Tags: REQUIRED
|
14
|
+
Image: REQUIRED
|
15
|
+
Description: |
|
16
|
+
REQUIRED
|
17
|
+
Anonymous:
|
18
|
+
Notify: yes
|
@@ -0,0 +1,17 @@
|
|
1
|
+
type: audiobooks
|
2
|
+
Authors: REQUIRED
|
3
|
+
Title: REQUIRED
|
4
|
+
ISBN: REQUIRED
|
5
|
+
Publishers:
|
6
|
+
Year: REQUIRED
|
7
|
+
# "" MP3 M4A M4B FLAC SPX
|
8
|
+
Format: REQUIRED
|
9
|
+
# English German French Spanish Italian Latin Japanese Danish Swedish Norwegian
|
10
|
+
# Dutch Russian Polish Portuguese Greek Irish Gaelic Korean Chinese Arabic
|
11
|
+
Language:
|
12
|
+
Tags: REQUIRED
|
13
|
+
Image: REQUIRED
|
14
|
+
Description: |
|
15
|
+
REQUIRED
|
16
|
+
Anonymous:
|
17
|
+
Notify: yes
|
@@ -0,0 +1,22 @@
|
|
1
|
+
type: comics
|
2
|
+
Scene:
|
3
|
+
Authors: REQUIRED
|
4
|
+
Artists: REQUIRED
|
5
|
+
Title: REQUIRED
|
6
|
+
Publishers:
|
7
|
+
Pages: REQUIRED
|
8
|
+
Year: REQUIRED
|
9
|
+
YearTo:
|
10
|
+
Complete:
|
11
|
+
# "" PDF DJVU CBR CBZ PNG JPEG
|
12
|
+
Format: REQUIRED
|
13
|
+
# English German French Spanish Italian Latin Japanese Danish Swedish Norwegian
|
14
|
+
# Dutch Russian Polish Portuguese Greek Irish Gaelic Korean Chinese Arabic
|
15
|
+
Language:
|
16
|
+
Oneshot:
|
17
|
+
Tags: REQUIRED
|
18
|
+
Image: REQUIRED
|
19
|
+
Description: |
|
20
|
+
REQUIRED
|
21
|
+
Anonymous:
|
22
|
+
Notify: yes
|
@@ -0,0 +1,20 @@
|
|
1
|
+
type: ebooks
|
2
|
+
Scene:
|
3
|
+
Authors:
|
4
|
+
Title: REQUIRED
|
5
|
+
Isbn: REQUIRED
|
6
|
+
Publishers:
|
7
|
+
Pages: REQUIRED
|
8
|
+
Year: REQUIRED
|
9
|
+
# "" EPUB MOBI PDF DJVU CHM CBR TXT
|
10
|
+
Format: REQUIRED
|
11
|
+
# English German French Spanish Italian Latin Japanese Danish Swedish Norwegian
|
12
|
+
# Dutch Russian Polish Portuguese Greek Irish Gaelic Korean Chinese Arabic
|
13
|
+
Language:
|
14
|
+
Retail:
|
15
|
+
Tags: REQUIRED
|
16
|
+
Image: REQUIRED
|
17
|
+
Description: |
|
18
|
+
REQUIRED
|
19
|
+
Anonymous:
|
20
|
+
Notify: yes
|
@@ -0,0 +1,18 @@
|
|
1
|
+
type: journals
|
2
|
+
Scene:
|
3
|
+
Title: REQUIRED
|
4
|
+
Pages: REQUIRED
|
5
|
+
Year: REQUIRED
|
6
|
+
YearTo:
|
7
|
+
Complete:
|
8
|
+
# "" EPUB PDF
|
9
|
+
Format: REQUIRED
|
10
|
+
# English German French Spanish Italian Latin Japanese Danish Swedish Norwegian
|
11
|
+
# Dutch Russian Polish Portuguese Greek Irish Gaelic Korean Chinese Arabic
|
12
|
+
Language:
|
13
|
+
Tags: REQUIRED
|
14
|
+
Image: REQUIRED
|
15
|
+
Description: |
|
16
|
+
REQUIRED
|
17
|
+
Anonymous:
|
18
|
+
Notify: yes
|
@@ -0,0 +1,18 @@
|
|
1
|
+
type: magazines
|
2
|
+
Scene:
|
3
|
+
Title: REQUIRED
|
4
|
+
Pages: REQUIRED
|
5
|
+
Year: REQUIRED
|
6
|
+
YearTo:
|
7
|
+
Complete:
|
8
|
+
# "" EPUB MOBI PDF DJVU CBR CBZ
|
9
|
+
Format: REQUIRED
|
10
|
+
# English German French Spanish Italian Latin Japanese Danish Swedish Norwegian
|
11
|
+
# Dutch Russian Polish Portuguese Greek Irish Gaelic Korean Chinese Arabic
|
12
|
+
Language:
|
13
|
+
Tags: REQUIRED
|
14
|
+
Image: REQUIRED
|
15
|
+
Description: |
|
16
|
+
REQUIRED
|
17
|
+
Anonymous:
|
18
|
+
Notify: yes
|
@@ -0,0 +1,63 @@
|
|
1
|
+
# Type
|
2
|
+
# nil(Feature Film), Short Film, Miniseries, Stand-up Commedy, Concert
|
3
|
+
type:
|
4
|
+
|
5
|
+
# Movie Title
|
6
|
+
title: REQUIRED
|
7
|
+
# Year
|
8
|
+
year: REQUIRED
|
9
|
+
|
10
|
+
# People. not support.
|
11
|
+
#artists: []
|
12
|
+
# IMDB ID
|
13
|
+
#imdbs: []
|
14
|
+
#roles: []
|
15
|
+
|
16
|
+
# Cover Art Image
|
17
|
+
image: REQUIRED
|
18
|
+
|
19
|
+
# YouTube Trailer
|
20
|
+
trailer:
|
21
|
+
|
22
|
+
# Not Main Movie
|
23
|
+
# Check this only if it does NOT contain the main movie.
|
24
|
+
# Examples: ONLY contains extras, Rifftrax, Workprints
|
25
|
+
special:
|
26
|
+
|
27
|
+
# Edition Information
|
28
|
+
# Check this box if this torrent is a special edition.
|
29
|
+
# Examples: "Director's Cut", "3D", "The Criterion Collection", "Rifftrax", "Dual Audio", "Remux".
|
30
|
+
remaster:
|
31
|
+
|
32
|
+
# Scene:
|
33
|
+
# Check this only if this is a 'scene release'. If you ripped it yourself, it is not a scene release.
|
34
|
+
# You can double check by searching the file name on orlydb.com.
|
35
|
+
scene:
|
36
|
+
|
37
|
+
# CAM TC TS R5 DVD-Screener VHS DVD TV HDTV HD-DVD Blu-ray Other
|
38
|
+
source: REQUIRED
|
39
|
+
|
40
|
+
# nil(Auto-detect) XviD DivX H.264 x264 DVD5 DVD9 BD25 BD50 Other
|
41
|
+
codec:
|
42
|
+
|
43
|
+
# nil(Auto-detect) AVI, MPG, MKV, MP4, VOB IFO, ISO, m2ts, Other
|
44
|
+
container:
|
45
|
+
|
46
|
+
# nil(Auto-detect) NTSC PAL 480p 576p 720p 1080i 1080p Other
|
47
|
+
resolution:
|
48
|
+
|
49
|
+
# action adventure animation arthouse asian biography camp comedy crime cult documentaary drama experimental expoitation family fantasy film.noir hisotry horror martial.arts musical mystery performance philosophy politics romance sci.fi short silent sport thriller video.art war western
|
50
|
+
tags: REQUIRED
|
51
|
+
|
52
|
+
# Synopsis
|
53
|
+
album_desc:
|
54
|
+
|
55
|
+
# Release Description
|
56
|
+
release_desc:
|
57
|
+
|
58
|
+
# Subtitles
|
59
|
+
# No Subtitles, English, Spanish, French, Arabic, Brazilian Port., Bulgarian, Chinese, Croatian,
|
60
|
+
# Czech, Danish, Dutch, Estonian, Finnish, German, Greek, Hebrew, Hindi, Hungarian, Icelandic,
|
61
|
+
# Indonesian, Italian, Japanese, Korean, Latvian, Lithuanian, Norwegian, Polish, Portuguese, Romanian,
|
62
|
+
# Russian, Serbian, Slovak, Slovenian, Swedish, Thai, Turkish, Ukrainian, Vietnamese,
|
63
|
+
subtitles: []
|