propre 0.3.0 → 0.3.1
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 +4 -4
- data/.rubocop.yml +6 -0
- data/README.md +12 -2
- data/lib/propre.rb +4 -5
- data/lib/propre/dictionary.rb +29 -11
- data/lib/propre/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e6078d6a1ae9c744685c2dc6b7184645e6166b3
|
4
|
+
data.tar.gz: 5d3861e3aa79e49bfdd98f5c6e5d6b733e3321de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d5ca50afafe11503f1f0173e7bc3907eda8698a21f9183da883b8239b9872968652591522f5c8214e81608ce13b1f2f13c61a522f315c573b2bb3fd8668f2a77
|
7
|
+
data.tar.gz: 1a8249a02d2392b4bb079e5d1b10fa0495b8efe22e4118a27d82616f6a678088732c93ee5243bb8ce9dfde5d16ec2021d00f093d245b44b6f9ca2b9b2187d87f
|
data/.rubocop.yml
ADDED
data/README.md
CHANGED
@@ -1,8 +1,12 @@
|
|
1
|
-
[](http://badge.fury.io/rb/propre)
|
2
|
-
|
3
1
|
Propre
|
4
2
|
======
|
5
3
|
|
4
|
+
[](https://rubygems.org/gems/propre/)
|
5
|
+
[](https://gemnasium.com/yadomi/propre)
|
6
|
+
[](https://rubygems.org/gems/propre/)
|
7
|
+
|
8
|
+
---
|
9
|
+
|
6
10
|

|
7
11
|
|
8
12
|
##Introduction
|
@@ -25,6 +29,12 @@ Propre will extract the title of a movie from it's filename and then rename it b
|
|
25
29
|
|
26
30
|
##Changelog
|
27
31
|
|
32
|
+
### 0.3.0
|
33
|
+
|
34
|
+
- Extract quality as metadata
|
35
|
+
- Extract language as metadata
|
36
|
+
- Update blacklist
|
37
|
+
|
28
38
|
### 0.2.2
|
29
39
|
|
30
40
|
- Update blacklist (added fastsub)
|
data/lib/propre.rb
CHANGED
@@ -39,11 +39,10 @@ module Propre
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def self.sanitize(arg)
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
end
|
42
|
+
separator = %w(- _ .).each_with_object({}) { |c, s| s[c] = arg.count(c) }
|
43
|
+
.sort_by(&:last).reverse.first.first
|
44
|
+
|
45
|
+
arg.gsub(separator, ' ').strip
|
47
46
|
end
|
48
47
|
|
49
48
|
def self.ban_chars(arg)
|
data/lib/propre/dictionary.rb
CHANGED
@@ -1,28 +1,46 @@
|
|
1
1
|
module Dictionary
|
2
2
|
BANNED = %w(
|
3
|
-
|
4
|
-
|
5
|
-
xvid
|
6
|
-
hdtv
|
3
|
+
ac3
|
4
|
+
bdrip
|
7
5
|
bluray
|
8
|
-
|
6
|
+
dupecheck
|
7
|
+
dvd
|
9
8
|
fansub
|
10
|
-
|
11
|
-
|
9
|
+
fansub
|
10
|
+
fastsub
|
11
|
+
hardsub
|
12
|
+
hdcam
|
13
|
+
hddvd
|
14
|
+
hddvdrip
|
15
|
+
hdrip
|
16
|
+
hdtv
|
17
|
+
hdtv
|
18
|
+
proper
|
19
|
+
repack
|
20
|
+
retail
|
21
|
+
rip
|
22
|
+
screener
|
23
|
+
subbed
|
24
|
+
subforced
|
25
|
+
subforced
|
26
|
+
telesync
|
12
27
|
theatrical
|
13
28
|
unrated
|
14
|
-
|
29
|
+
unrated
|
30
|
+
unsubbed
|
31
|
+
vostfr
|
32
|
+
xvid
|
15
33
|
)
|
16
34
|
|
17
35
|
LANGUAGES = %w(
|
18
|
-
truefrench
|
19
36
|
french
|
20
37
|
italian
|
38
|
+
truefrench
|
21
39
|
)
|
22
40
|
|
23
41
|
QUALITY = %w(
|
24
|
-
x264
|
25
|
-
720p
|
26
42
|
1080p
|
43
|
+
720p
|
44
|
+
x264
|
27
45
|
)
|
28
46
|
end
|
data/lib/propre/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: propre
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Felix Yadomi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -89,6 +89,7 @@ extensions: []
|
|
89
89
|
extra_rdoc_files: []
|
90
90
|
files:
|
91
91
|
- ".gitignore"
|
92
|
+
- ".rubocop.yml"
|
92
93
|
- Gemfile
|
93
94
|
- README.md
|
94
95
|
- Rakefile
|