download_tv 2.0.4 → 2.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a77cec330e5e61823ec729de83b132401b85068f
4
- data.tar.gz: 2e0cd12cecfd6598dd6684154210cbccab3ea654
3
+ metadata.gz: fd88d671bc69dcee56c936d14f317feaaa415760
4
+ data.tar.gz: 2b807730f5b28367e73c0b9aec62f4ddb485f858
5
5
  SHA512:
6
- metadata.gz: 85d69f2e9f6142595c464b8e19dff22881815cbe56e196a7fbfb9132b7076d0ee6f6b96ebefd785b57d9b780efc71b9a972316377902d19b864c224c0eee69dd
7
- data.tar.gz: a3de81afc841a0843397fef6f86389f682c3f82d59f15e7ca15569b96c9cdf17ec3f3c449a1f8c4383e6509af25272d26082e10d89ae556e13846459c45fb4b8
6
+ metadata.gz: 83f01a44a0b2395b30c268cada25937f3b16e4134b1b35aff08ddb8312f1ceb7f3cd3c5849c4c261f49b21150931db18f5cdf13ca4c7ceda28a47d175a6609ce
7
+ data.tar.gz: cd47f6d44228bcc7cd23905fbe7393cff6456930ca1809488a3cb53418d371dcbfb5c48c013b74132d9affd752bfaa29a40f478169d33b58d6d0be4ae20b7e92
data/README.md CHANGED
@@ -1,18 +1,17 @@
1
1
  # download_tv
2
2
 
3
- [![Build Status](https://travis-ci.org/guille/daily-shows.svg?branch=master)](https://travis-ci.org/guille/daily-shows)
3
+ [![Build Status](https://travis-ci.org/guille/download_tv.svg?branch=master)](https://travis-ci.org/guille/download_tv)
4
+ [![Gem Version](https://badge.fury.io/rb/download_tv.svg)](https://badge.fury.io/rb/download_tv)
4
5
 
5
6
  download_tv is a Ruby command line application that automatically downloads the new episodes from the shows you follow. It grabs the list of shows from your MyEpisodes account.
6
7
 
7
8
  ### Installation
8
9
 
9
- Clone the repository.
10
-
11
- Rename the config_example.rb to config.rb and modify it if needed.
10
+ `gem install download_tv`
12
11
 
13
12
  ### Usage
14
13
 
15
- A binary is provided in /bin/tv.
14
+ Once installed, you can launch the binary *tv*
16
15
 
17
16
  ```
18
17
  Usage: tv [options]
@@ -21,30 +20,21 @@ Specific options:
21
20
  -o, --offset OFFSET Move back the last run offset
22
21
  -f, --file PATH Download shows from a file
23
22
  -d, --download SHOW Downloads given show
24
- --dry-run Don't write to the date file
23
+ -c, --configure Configures defaults
24
+ --show-config Show current configuration values
25
+ --dry-run Don't write to the date file
26
+ -a, --[no-]auto Automatically find links
27
+ -s, --[no-]subtitles Download subtitles
25
28
  -h, --help Show this message
29
+
26
30
  ```
27
31
 
28
- Three actions are recognised:
32
+ Four actions are recognised:
29
33
 
30
34
  * By default, it fetches the list of episodes from MyEpisodes that have aired since the program was run for the last time and tries to download them. The -o flag can be used in order to re-download the episodes from previous days.
31
35
 
32
36
  * In order to download a single episode, use the -d flag. Example: *tv -d Breaking Bad S04E01*
33
37
 
34
- * Finally, the -f flag can be used to download a set of episodes. This option takes a text file as an argument. Each line of the file is interpreted as a episode to download. Example: *tv -f /path/to/listofeps*
35
-
36
- ### Configuration
37
-
38
- * myepisodes_user: String containing the username that will be used to log in to MyEpisodes. Set to an empty string to have the application ask for it in each execution.
39
-
40
- * auto: Boolean value (true/false). Determines whether the application will try to automatically select a torrent using pre-determined filters or show the list to the user and let him choose.
41
-
42
- * subs: Not implemented yet. Boolean value (true/false). Determines whether the application will try to find subtitles for the shows being downloaded.
43
-
44
- * cookie_path: String containing a path to where the session cookie for MyEpisodes will be stored. Set it to "" to prevent the cookie from being stored.
45
-
46
- * ignored: Array containing names of TV shows you follow in MyEpisodes but don't want to download. The strings should match the name of the show as displayed by MyEpisodes. Example: ["Boring Show 1", "Boring Show 2"],
47
-
48
- * tpb_proxy: Base URL of the ThePirateBay proxy to use.
38
+ * he -f flag can be used to download a set of episodes. This option takes a text file as an argument. Each line of the file is interpreted as a episode to download. Example: *tv -f /path/to/listofeps*
49
39
 
50
- * grabbers: String containing names of the sources where to look for torrents in ascending order of preference. Useful for activating or deactivating specific sites, reordering them or for plugin developers.
40
+ * Finally, with -c you can edit your configuration defaults (your MyEpisodes user, whether to save the auth cookie or the shows you wish to ignore)
data/bin/tv CHANGED
@@ -34,6 +34,10 @@ opt_parser = OptionParser.new do |opts|
34
34
  options[:cmd] = "config"
35
35
  end
36
36
 
37
+ opts.on("--show-config", "Show current configuration values") do |n|
38
+ options[:cmd] = "showconfig"
39
+ end
40
+
37
41
  opts.on("--dry-run", "Don't write to the date file") do |n|
38
42
  options[:dry] = n
39
43
  end
@@ -65,6 +69,9 @@ begin
65
69
  dl.download_from_file(options[:arg])
66
70
  when "config"
67
71
  DownloadTV::Configuration.new true
72
+ when "showconfig"
73
+ DownloadTV::Configuration.new.print_config
74
+
68
75
  end
69
76
  rescue Interrupt
70
77
  puts "Interrupt signal detected. Exiting..."
@@ -38,8 +38,14 @@ module DownloadTV
38
38
  serialize()
39
39
  end
40
40
 
41
- def serialize()
41
+
42
+ def serialize
42
43
  File.open("config", "wb") {|f| Marshal.dump(@content, f)}
43
44
  end
45
+
46
+
47
+ def print_config
48
+ @content.each {|k, v| puts "#{k}: #{v}"}
49
+ end
44
50
  end
45
51
  end
@@ -25,6 +25,7 @@ module DownloadTV
25
25
 
26
26
 
27
27
  def download_from_file(filename)
28
+ filename = File.realpath(filename)
28
29
  raise "File doesn't exist" if !File.exists? filename
29
30
  t = Torrent.new
30
31
  File.readlines(filename).each { |show| download(t.get_link(show, @auto)) }
@@ -1,3 +1,3 @@
1
1
  module DownloadTV
2
- VERSION = "2.0.4"
2
+ VERSION = "2.0.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: download_tv
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.4
4
+ version: 2.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - guille
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-07 00:00:00.000000000 Z
11
+ date: 2017-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler