arrg 2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: f17ec96b31f84b7dbd56521a6b3b5fce3354ccfb
4
+ data.tar.gz: 12a24ff58347e668dffaf6d0e6ca3911f49ecf1f
5
+ SHA512:
6
+ metadata.gz: 8d5aacfd9c81d97d016175c276c347835c483c3e6049dedc79f183bb8daa3342b58f350ff45ec9fb2ecbe30628e705dc04e035ffd1b3cf5c9420bcf65c08f2da
7
+ data.tar.gz: c68d82306c2873bd357cee1f8c393f3c0989ce3170a4855164668194abef88601163daf7ce14ca0342df6b1ef80ec9c8b863f28e0d91d71943dfae9eda9d9333
@@ -0,0 +1,37 @@
1
+ *.gem
2
+ *.rbc
3
+ /.config
4
+ /coverage/
5
+ /InstalledFiles
6
+ /pkg/
7
+ /spec/reports/
8
+ /test/tmp/
9
+ /test/version_tmp/
10
+ /tmp/
11
+
12
+ ## Specific to RubyMotion:
13
+ .dat*
14
+ .repl_history
15
+ build/
16
+
17
+ ## Documentation cache and generated files:
18
+ /.yardoc/
19
+ /_yardoc/
20
+ /doc/
21
+ /rdoc/
22
+
23
+ ## Environment normalisation:
24
+ /.bundle/
25
+ /lib/bundler/man/
26
+
27
+ # Annoying OS X Stuff
28
+ .DS_Store
29
+
30
+ # for a library or gem, you might want to ignore these files since the code is
31
+ # intended to run in multiple environments; otherwise, check them in:
32
+ # Gemfile.lock
33
+ # .ruby-version
34
+ # .ruby-gemset
35
+
36
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
37
+ .rvmrc
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+ gem 'launchy'
3
+ gem 'rainbow'
data/LICENSE ADDED
@@ -0,0 +1,24 @@
1
+ This is free and unencumbered software released into the public domain.
2
+
3
+ Anyone is free to copy, modify, publish, use, compile, sell, or
4
+ distribute this software, either in source code form or as a compiled
5
+ binary, for any purpose, commercial or non-commercial, and by any
6
+ means.
7
+
8
+ In jurisdictions that recognize copyright laws, the author or authors
9
+ of this software dedicate any and all copyright interest in the
10
+ software to the public domain. We make this dedication for the benefit
11
+ of the public at large and to the detriment of our heirs and
12
+ successors. We intend this dedication to be an overt act of
13
+ relinquishment in perpetuity of all present and future rights to this
14
+ software under copyright law.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
+ IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
+ OTHER DEALINGS IN THE SOFTWARE.
23
+
24
+ For more information, please refer to <http://unlicense.org>
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 Josh
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,74 @@
1
+ arrg
2
+ ======
3
+
4
+ search [thepiratebay](http://thepiratebay.se) from the command-line.
5
+
6
+ installing
7
+ ----------
8
+
9
+ ```bash
10
+ $ gem install arrg
11
+ ```
12
+
13
+ usage
14
+ -----
15
+
16
+ | Information | Argument and Parameters
17
+ | -----------------------------------------------|:-------------------------:
18
+ | Make pirate search query | `arrg [ "search (in quotes)"] [ category (optional) ] [ -url (optional )]`
19
+ | Get current version | `-v`
20
+ | Help | `-h`
21
+
22
+ ## examples
23
+
24
+ You can simply give a search query
25
+
26
+ ```bash
27
+ $ arrg 'Freaks and Geeks'
28
+ ```
29
+
30
+ Or you can specify a category (music, video, apps, porn, other)
31
+
32
+ ```bash
33
+ $ arrg 'Foo Fighters' music
34
+ ```
35
+
36
+ ```bash
37
+ $ arrg 'Pulp Fiction' video
38
+ ```
39
+
40
+ ```bash
41
+ $ arrg 'Pages' apps
42
+ ```
43
+
44
+ ```bash
45
+ $ arrg "This ain't Glee XXX" porn
46
+ ```
47
+
48
+ ```bash
49
+ $ arrg 'The Stand' other
50
+ ```
51
+
52
+ If you don't want the result to open in your browser, you can just have the URL returned
53
+
54
+ ```bash
55
+ $ arrg 'Van Halen' music -url
56
+ ```
57
+
58
+ But you don't *have* to specify a category
59
+
60
+ ```bash
61
+ $ arrg 'Styx' -url
62
+ ```
63
+
64
+ And of course, you can check the version
65
+
66
+ ```bash
67
+ $ arrg -v
68
+ ```
69
+
70
+ and get some help if you need it
71
+
72
+ ```bash
73
+ $ arrg -h
74
+ ```
@@ -0,0 +1,6 @@
1
+ task :default => [:install]
2
+
3
+ task :install do |t|
4
+ `gem install bundler`
5
+ `bundle`
6
+ end
@@ -0,0 +1,19 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require File.expand_path('../lib/arrg/version', __FILE__)
3
+
4
+ Gem::Specification.new do |gem|
5
+ gem.authors = ['Josh']
6
+ gem.email = ['joshception@icloud.com']
7
+ gem.description = %q{shiver me timbers.}
8
+ gem.summary = %q{search thepiratebay from the command-line.}
9
+ gem.homepage = 'http://twitter.com/nulljosh'
10
+
11
+ gem.files = `git ls-files`.split($\)
12
+ gem.executables = ['arrg']
13
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
14
+ gem.name = 'arrg'
15
+ gem.require_paths = ['lib']
16
+ gem.version = Arrg::VERSION
17
+ gem.add_dependency 'launchy', '~> 0'
18
+ gem.add_dependency 'rainbow', '~> 0'
19
+ end
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env ruby
2
+ require_relative '../lib/arrg'
@@ -0,0 +1,47 @@
1
+ require_relative 'arrg/version'
2
+ require 'launchy'
3
+ require 'rainbow'
4
+
5
+ module Arrg
6
+ file = 'https://raw.githubusercontent.com/trommel/arrg/master/pirate'
7
+ input = ARGV[0]
8
+ category = ARGV[1]
9
+
10
+ case input
11
+ when "-h"
12
+ Launchy.open("http://github.com/trommel/arrg")
13
+ Process.exit(0)
14
+ when "-v"
15
+ puts "arrg v#{Arrg::VERSION}"
16
+ else
17
+ case category
18
+ when "music"
19
+ category = "100"
20
+ when "video"
21
+ category = "200"
22
+ when "apps"
23
+ category = "300"
24
+ when "games"
25
+ category = "400"
26
+ when "porn"
27
+ category = "500"
28
+ when "other"
29
+ category = "600"
30
+ end
31
+
32
+ unless input.nil?
33
+ final = input.gsub " ", "%20"
34
+ if category.nil? == true
35
+ Launchy.open("http://thepiratebay.se/search/" + final + "/0/8/0")
36
+ elsif category == "-url"
37
+ puts Rainbow("http://thepiratebay.se/search/" + final).green
38
+ elsif ARGV[2] == "-url"
39
+ puts Rainbow("http://thepiratebay.se/search/" + final + "/0/7/" + category).green
40
+ else
41
+ Launchy.open("http://thepiratebay.se/search/" + final + "/0/7/" + category)
42
+ end
43
+ else
44
+ puts 'Arrg! You need to at least specify a search, matey!'
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,3 @@
1
+ module Arrg
2
+ VERSION = '2.0'
3
+ end
metadata ADDED
@@ -0,0 +1,82 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: arrg
3
+ version: !ruby/object:Gem::Version
4
+ version: '2.0'
5
+ platform: ruby
6
+ authors:
7
+ - Josh
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-06-10 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: launchy
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rainbow
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ description: shiver me timbers.
42
+ email:
43
+ - joshception@icloud.com
44
+ executables:
45
+ - arrg
46
+ extensions: []
47
+ extra_rdoc_files: []
48
+ files:
49
+ - ".gitignore"
50
+ - Gemfile
51
+ - LICENSE
52
+ - LICENSE.txt
53
+ - README.md
54
+ - Rakefile
55
+ - arrg.gemspec
56
+ - bin/arrg
57
+ - lib/arrg.rb
58
+ - lib/arrg/version.rb
59
+ homepage: http://twitter.com/nulljosh
60
+ licenses: []
61
+ metadata: {}
62
+ post_install_message:
63
+ rdoc_options: []
64
+ require_paths:
65
+ - lib
66
+ required_ruby_version: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ version: '0'
71
+ required_rubygems_version: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ requirements: []
77
+ rubyforge_project:
78
+ rubygems_version: 2.2.2
79
+ signing_key:
80
+ specification_version: 4
81
+ summary: search thepiratebay from the command-line.
82
+ test_files: []