simple_downloader_td 0.0.2 → 0.0.4
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.
- checksums.yaml +8 -8
- data/README.md +6 -0
- data/lib/simple_downloader_td.rb +3 -1
- data/lib/simple_downloader_td/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZTk2ZDBiZGM0YjU5ZGY2NmUxZmE5NDEyZTUyMTVlOWQ3M2YwY2FmYw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZmU2ZDQ3ODg2MWM0NTY5ZDdiNTNjM2VmMjAwNTU3ZDAyODJhNzJiZQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YzM3OWY5OTJjMTJkYzk5MjE4M2ViNWJhOGFkZmVmZjE0ZWYyMTllNTVjYmEz
|
10
|
+
MDRmYjY1OTI0YjkxN2YyOGY5YzExZDJlNjc5Y2NmZmVlOTY4NTg2NTkyMTk3
|
11
|
+
MzJmZmFiNTU0MDU2MGNkZDQ0OTcyNmM0YWI5ZGIwNzEwZDE4MDg=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NDVjZGQ5ODBiMTc0NTE4YjAzZjdiNjdhODU3ODc1YjJmNGVmYjU2ZDYwYjM4
|
14
|
+
YjBjNDA5YzA0NzgxNWI5OGMyYmQxYjUyZTY4YWUwMGRmM2U5ZjAzNGZlNTJi
|
15
|
+
Yjc2NjIzNTkxZWM3ZTVlY2M1ZjFhZDE1YzU5YzE5YWZiNDMyMjc=
|
data/README.md
CHANGED
@@ -20,8 +20,14 @@ Or install it yourself as:
|
|
20
20
|
$ SimpleDownloaderTd <job_id>
|
21
21
|
```
|
22
22
|
|
23
|
+
## Note
|
24
|
+
|
25
|
+
Please install and use td command before use this command.
|
26
|
+
This command use YOUR APIKEY in ~/.td/td.conf
|
27
|
+
|
23
28
|
## Contributing
|
24
29
|
|
30
|
+
|
25
31
|
1. Fork it ( https://github.com/[my-github-username]/simple_downloader_td/fork )
|
26
32
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
27
33
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
data/lib/simple_downloader_td.rb
CHANGED
@@ -43,8 +43,10 @@ module SimpleDownloaderTd
|
|
43
43
|
# download job result as msgpack.gz
|
44
44
|
begin
|
45
45
|
File.open("#{job_id}_tmp.msgpack.gz", "wb") do |f|
|
46
|
+
downloaded = -1
|
46
47
|
job.result_format('msgpack.gz', f) do |compr_size|
|
47
|
-
STDOUT.puts "Downloaded
|
48
|
+
STDOUT.puts "Downloaded #{(compr_size / job.result_size) * 100}%" if downloaded != (compr_size / job.result_size)
|
49
|
+
downloaded = compr_size / job.result_size
|
48
50
|
end
|
49
51
|
end
|
50
52
|
rescue Exception => e
|