blitzcrank 0.0.1 → 0.0.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 66640cac73596505c3b29513d9536ac68f0b8da1
4
- data.tar.gz: df2daa1c03e8c85b75481953fa5e6b49f69bb519
3
+ metadata.gz: 00dff34cbf6a13de9044be7bb3e6a382e326b67e
4
+ data.tar.gz: 1df32ebd15bf287f94c1951b644bb80f6f517c45
5
5
  SHA512:
6
- metadata.gz: 8adc086e044a2f9bf63d4bc758081a3d8fa208973020e45c593ae3129450512fc54ee8b369224bad17c438a267143beb1e6b8cd17f6aaef949b8c43877b2e814
7
- data.tar.gz: 9e1ea697d976911b59069b2471171372fd888dcaf8533a2e575a33fbd24d93fd8cf8aa19fc76f0da4db8a1c54c8c072b31314accbf11ec8061605af6574239c5
6
+ metadata.gz: 5fd2f54496b01f81e681b94a1d0a28732044f950615abdd7d1b424b0dd856c9a69fe587df5d604d357b3a048061f1de1a9e7608f21381130450347e6e47eacc8
7
+ data.tar.gz: 0153a20602483ea4eb8c9df6375731296b07ea3785f9f1caa97c156d8fc938da0169c61a1111b5cf9e67021515d2618cae5d7a528368568b07fa80ef8236d374
data/README.md CHANGED
@@ -6,12 +6,14 @@ Copy down remote files and sort them into local directories with ease.
6
6
 
7
7
  ## Table of Contents
8
8
  * [Installation](#installation)
9
+ * [Recommendations](#recommendations)
9
10
  * [Setup](#setup)
10
11
  * [Sample Config File](#sample-config-file)
11
12
  * [Sample Directory Structure](#sample-directory-structure)
12
13
  * [Usage](#usage)
13
14
  * [Mana Barrier](#mana-barrier)
14
15
  * [Rocket Grab](#rocket-grab)
16
+ * [Overdrive](#overdrive)
15
17
  * [Contributing](#contributing)
16
18
 
17
19
  _Generated with [tocify](https://github.com/pyro2927/tocify)_
@@ -23,6 +25,7 @@ Install it with:
23
25
  $ gem install blitzcrank
24
26
 
25
27
  Blitzcrank transfers files via rsync.
28
+
26
29
  Install on OS X:
27
30
 
28
31
  $ brew install rsync
@@ -31,6 +34,10 @@ Install on Debian:
31
34
 
32
35
  $ sudo apt-get install rsync
33
36
 
37
+ ## Recommendations
38
+
39
+ Blitzcrank works best at pulling down torrents from a remote server. Manually finding torrents is _SO_ 19th century. Automatically fetch torrents with systems like [Sickbeard](http://sickbeard.com/) and [CouchPotato](https://couchpota.to/), trust me, it's awesome.
40
+
34
41
  ## Setup
35
42
 
36
43
  Blitzcrank requires a small amount of setup. First, it mainly does transfers via ssh of a remote host and your local machine. In order to do so you'll have to have a yaml config file at `~/.blitzcrank`.
@@ -82,6 +89,11 @@ Mana Barrier will populate a sample config file if you do not have one already i
82
89
 
83
90
  Use `rocketgrab` to pull down remote files and sort them into local directories.
84
91
 
92
+ ### Overdrive
93
+ ![Blitz](./img/Overdrive.jpg)
94
+
95
+ Overdrive is best suited for cron jobs and automated scheduling. It copies down any TV shows that match an existing folder, and any movies that are verified via [IMDB](http://www.imdb.com/).
96
+
85
97
  ## Contributing
86
98
 
87
99
  1. Fork it
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'blitzcrank'
4
+ Blitzcrank.configure_with(File.join(Dir.home, ".blitzcrank")) if File.exists?(File.join(Dir.home, ".blitzcrank"))
5
+ Blitzcrank.rsync_all_files
Binary file
@@ -76,6 +76,21 @@ module Blitzcrank
76
76
 
77
77
  filesToTransfer = Blitzcrank.transfer_menu(availableFiles)
78
78
 
79
+ Blitzcrank.transfer_files(filesToTransfer)
80
+ end
81
+
82
+ def self.rsync_all_files
83
+ puts "Downloading all remote videos\n"
84
+ fileArray = Blitzcrank.remote_video_file_list.gsub('./','').split("\n")
85
+ availableFiles = Array.new()
86
+ fileArray.each do |remoteFile|
87
+ availableFiles.push({:path => remoteFile, :name => remoteFile.split('/').last()})
88
+ end
89
+ Blitzcrank.transfer_files(availableFiles)
90
+ end
91
+
92
+ # any files (hashes) passed into here will be checked against our local TV folders and IMDB to see if it's a movie
93
+ def self.transfer_files(filesToTransfer)
79
94
  Dir.chdir(@config[:base_tv_dir])
80
95
  tv_directories = Dir.glob("*/")
81
96
 
@@ -115,11 +130,14 @@ module Blitzcrank
115
130
  end
116
131
 
117
132
  def self.is_movie?(file_name)
118
- /^(.*).(\d{4}|dvdrip)/i.match(file_name)
119
- movie_name = $1
120
- nice_movie_name = movie_name.gsub('.', ' ').downcase
121
- i = Imdb::Search.new(nice_movie_name)
122
- i.movies.size > 0
133
+ unless /^(.*).(\d{4}|dvdrip)/i.match(file_name).nil?
134
+ movie_name = $1
135
+ nice_movie_name = movie_name.gsub('.', ' ').downcase
136
+ i = Imdb::Search.new(nice_movie_name)
137
+ i.movies.size > 0
138
+ else
139
+ false
140
+ end
123
141
  end
124
142
 
125
143
  def self.transfer_menu(files)
@@ -1,3 +1,3 @@
1
1
  module Blitzcrank
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blitzcrank
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - pyro2927
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-10 00:00:00.000000000 Z
11
+ date: 2013-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -71,6 +71,7 @@ email:
71
71
  - joseph@pintozzi.com
72
72
  executables:
73
73
  - mannabarrier
74
+ - overdrive
74
75
  - rocketgrab
75
76
  extensions: []
76
77
  extra_rdoc_files: []
@@ -82,10 +83,12 @@ files:
82
83
  - README.md
83
84
  - Rakefile
84
85
  - bin/mannabarrier
86
+ - bin/overdrive
85
87
  - bin/rocketgrab
86
88
  - blitzcrank.gemspec
87
89
  - img/BlitzcrankSquare.png
88
90
  - img/Mana_Barrier.jpg
91
+ - img/Overdrive.jpg
89
92
  - img/Power_Fist.jpg
90
93
  - img/Rocket_Grab.jpg
91
94
  - img/Static_Field.jpg