my-local-putio 4.3.1 → 4.4.0

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
  SHA256:
3
- metadata.gz: d94ea788991c8c5098d95ab14f1bc81800f4ab11b26b73b9554a8a13bd58129f
4
- data.tar.gz: 64e9f87e6498b45e1f18dd7148f5217f703a0ce6fff41caea329e8f9e89d9e05
3
+ metadata.gz: 0645c62fc7702d0675aea5789b127e6a64e1b97daa7c56a79356db63994bec72
4
+ data.tar.gz: c2d94609c5bee2a49befdb947b4631b0e33464efdc871ed23edf97ccce7a2260
5
5
  SHA512:
6
- metadata.gz: df6785e66ff407966c5704f78b510708ec58032e81e1cbfeb18b51550c258d057902f79ed3f37adaef1fb31a637623993355b8e4f3e4047a46c97dbe2369f716
7
- data.tar.gz: ee9cfad26ff5f473a00067679113250b3c4f3c0f36bd0d87010795d3489e9061fd7d6e87de686062140824a6524510467221702aa6409689c30e47fbffa49542
6
+ metadata.gz: ec4015fbe7793a523bb37b430e38f0012c2e582ceee93f3a2f53b9f6de219a7b042070e1975583f384511cfb9f1870b11f5fc15741285a821aa25a3797f72fe8
7
+ data.tar.gz: aceb70d9770dc59bb0f71b9e0e0b0e2944ec9d8d1e7d3949bcfb4f55ef7d2c4c214bfd9af18590cf016973dd8c4531f2109001f5661be46fc489128961c3e669
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ # v4.4.0
2
+
3
+ - Introducing --detailed-progress
4
+ - Display the default curl output with a detailed information of the download, instead of a simple progress bar.
5
+
1
6
  # v4.3.1
2
7
 
3
8
  - Bugfix: Already downloaded files no longer need to be downloaded again
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- my-local-putio (4.3.1)
4
+ my-local-putio (4.4.0)
5
5
  socksify (= 1.7.1)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -42,11 +42,12 @@ To update your installed version:
42
42
  -d, --delete-remote Delete remote file/folder after the download
43
43
  -s, --with-subtitles Fetch subtitles from Put.io api
44
44
  -v, --version Print my-local-putio version
45
+ --debug Debug mode [Developer mode]
46
+ --disk-threshold size Stops the downloads when the disk space threshold is reached. (Size in MB, e.g: 2000 for 2GB)
47
+ --detailed-progress Detailed download information instead a progress bar
45
48
  --temp-destination FULLPATH Temporary destination for the incomplete downloads (Default: 'local_destination'/incomplete_downloads)
46
49
  --silent Hide all messages and progress bar
47
- --debug Debug mode [Developer mode]
48
50
  --socks5-proxy hostname:port SOCKS5 hostname and port for proxy. Format: 127.0.0.1:1234
49
- --disk-threshold size Stops the downloads when the disk space threshold is reached. (Size in MB, e.g: 2000 for 2GB)
50
51
 
51
52
  #### Required attributes:
52
53
  * **-t** or **--token**: Your Put.io Token. This attribute becames optional if you set `PUTIO_TOKEN` env variable with your token (Can be inline or into your bash profile). Check examples below.
@@ -71,11 +72,12 @@ With Token variable (inline or exporting):
71
72
  * **-s** or **--with-subtitles**: Download subtitles from Put.io API if available. (Remember to set your preferred subtitle language on Put.io Settings website, otherwise no subtitle will be available for download.)
72
73
  * **-h**: Print the help usage message
73
74
  * **-v** or **--version**: Print the version of the application
75
+ * **--debug**: Developer mode: Prints everything and expose URLs with tokens for debug purposes.
76
+ * **--disk-threshold**: Set a disk threshold **(in MB)** to prevent the script to fill up the entire disk. The threshold value is in MB **(e.g 1000 for 1GB)**. The script will test both download folder and temporary folder to detect if there is enough space before download each file. If the free space is less than (file size + disk threshold) the script will stop. (Example: If the folder have 10GB available, and the threshold is set to 2GB (2000), the script will stop before start downloading a file with 9GB size)
77
+ * **--detailed-progress**: Display the default curl output with a detailed information of the download, instead of a simple progress bar.
74
78
  * **--temp-destination**: Overwrite the default path (incomplete_downloads folder) of the temporary download files. After the download the complete file is moved to the selected local destination.
75
79
  * **--silent**: Hide all messages and progress bar. Recommended for Cronjob tasks.
76
- * **--debug**: Developer mode: Prints everything and expose URLs with tokens for debug purposes.
77
80
  * **--socks5-proxy**: Enable the SOCKS5 proxy. If enabled, all the connections for PUT.IO API and the downloads will be performed using this proxy. If the socks connection became unavailable, the application will raise an error and will stop.
78
- * **--disk-threshold**: Set a disk threshold **(in MB)** to prevent the script to fill up the entire disk. The threshold value is in MB **(e.g 1000 for 1GB)**. The script will test both download folder and temporary folder to detect if there is enough space before download each file. If the free space is less than (file size + disk threshold) the script will stop. (Example: If the folder have 10GB available, and the threshold is set to 2GB (2000), the script will stop before start downloading a file with 9GB size)
79
81
 
80
82
  Examples:
81
83
 
@@ -89,7 +91,7 @@ Examples:
89
91
 
90
92
  Verbose output example:
91
93
 
92
- my-local-putio -t 123 -l Downloads -d -s --socks5-proxy 127.0.0.1:3333 --temp-destination /tmp --disk-threshold 2000
94
+ my-local-putio -t 123 -l Downloads -d -s --socks5-proxy 127.0.0.1:3333 --temp-destination /tmp --disk-threshold 2000 --detailed-progress
93
95
 
94
96
  Starting My Local Put.io - version 4.3.0
95
97
  https://github.com/rafaelbiriba/my-local-putio
@@ -98,6 +100,7 @@ Verbose output example:
98
100
  Full path of the temporary destination: /tmp (Free space: 8543 MB)
99
101
  >>> Delete remote files enabled!
100
102
  >>> With subtitles enabled!
103
+ >>> With detailed progress bar!
101
104
  >>> SOCKS5 enabled with 127.0.0.1:3333
102
105
  >>> With disk threshold of 2000 MB!
103
106
  =============================================
@@ -40,6 +40,7 @@ module MyLocalPutio
40
40
  puts "Full path of the temporary destination: #{File.realdirpath(configuration.temp_destination)} (Free space: #{configuration.disk_manager.get_folder_free_space(configuration.temp_destination)} MB)"
41
41
  puts ">>> Delete remote files enabled!" if configuration.delete_remote
42
42
  puts ">>> With subtitles enabled!" if configuration.with_subtitles
43
+ puts ">>> With detailed progress bar!" if configuration.detailed_progress
43
44
  puts ">>> SOCKS5 enabled with #{configuration.socks_host}:#{configuration.socks_port}" if configuration.socks_enabled?
44
45
  puts ">>> With disk threshold of #{configuration.disk_threshold} MB!" if configuration.disk_threshold
45
46
  puts ">>> DEBUG enabled! Hello Mr(s) developer :)" if configuration.debug
@@ -2,7 +2,7 @@ module MyLocalPutio
2
2
  class Configuration
3
3
  attr_reader :token, :local_destination, :temp_destination,
4
4
  :silent, :debug, :socks_host, :socks_port, :delete_remote, :with_subtitles,
5
- :disk_threshold
5
+ :disk_threshold, :detailed_progress
6
6
 
7
7
  def initialize
8
8
  read_args_from_envs!
@@ -35,15 +35,21 @@ module MyLocalPutio
35
35
  exit
36
36
  end
37
37
 
38
+ opt.on("--debug", "Debug mode [Developer mode]") { |v| @debug = true }
39
+
40
+ opt.on("--disk-threshold size", "Stops the downloads when the disk space threshold is reached. (Size in MB, e.g: 2000 for 2GB)") do |v|
41
+ @disk_threshold = v.to_i
42
+ end
43
+
44
+ opt.on("--detailed-progress", "Detailed download information instead a progress bar") { |v| @detailed_progress = true }
45
+
38
46
  opt.on("--temp-destination FULLPATH", "Temporary destination for the incomplete downloads (Default: 'local_destination'/incomplete_downloads)") { |v| @temp_destination = v }
47
+
39
48
  opt.on("--silent", "Hide all messages and progress bar") { |v| @silent = true }
40
- opt.on("--debug", "Debug mode [Developer mode]") { |v| @debug = true }
49
+
41
50
  opt.on("--socks5-proxy hostname:port", "SOCKS5 hostname and port for proxy. Format: 127.0.0.1:1234") do |v|
42
51
  @socks_host, @socks_port = v.to_s.split(":")
43
52
  end
44
- opt.on("--disk-threshold size", "Stops the downloads when the disk space threshold is reached. (Size in MB, e.g: 2000 for 2GB)") do |v|
45
- @disk_threshold = v.to_i
46
- end
47
53
  end.parse!
48
54
  end
49
55
 
@@ -40,9 +40,11 @@ module MyLocalPutio
40
40
  temp_destination = File.join(configuration.temp_destination, path)
41
41
 
42
42
  command = [
43
- "curl", "--create-dirs", "--progress-bar", "-L", "--retry", "5", "-S", "-C", "-", "-o", temp_destination, url.to_s
43
+ "curl", "--create-dirs", "-L", "--retry", "5", "-S", "-C", "-", "-o", temp_destination, url.to_s
44
44
  ]
45
45
 
46
+ command.push("--progress-bar") unless configuration.detailed_progress
47
+
46
48
  command.push("--silent") if logger.silent?
47
49
 
48
50
  if configuration.socks_enabled?
@@ -1,3 +1,3 @@
1
1
  module MyLocalPutio
2
- VERSION = "4.3.1"
2
+ VERSION = "4.4.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: my-local-putio
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.3.1
4
+ version: 4.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rafael Biriba