extract_files 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -0
- data/bin/extract_files +1 -1
- data/extract_files.gemspec +2 -1
- data/lib/extract_files.rb +1 -1
- metadata +54 -62
data/Rakefile
CHANGED
data/bin/extract_files
CHANGED
data/extract_files.gemspec
CHANGED
@@ -9,7 +9,8 @@ Gem::Specification.new do |s|
|
|
9
9
|
s.email = ["guillermo@cientifico.net"]
|
10
10
|
s.homepage = "https://github.com/guillermo/extract_files"
|
11
11
|
s.summary = %q{Extract files from stdin or files given an extension/extensions}
|
12
|
-
s.description =
|
12
|
+
s.description = %q{Tired of generating big builds for the cdn? Just want to know wich files your designers in their css are really using? The images of all the static fiels? extract_files look inside json, html, css, and look for files based on a given extension or extensions.
|
13
|
+
run extract_files -h to have more help.}
|
13
14
|
|
14
15
|
s.rubyforge_project = "extract_files"
|
15
16
|
|
data/lib/extract_files.rb
CHANGED
metadata
CHANGED
@@ -1,65 +1,48 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: extract_files
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 27
|
5
5
|
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 2
|
10
|
+
version: 0.0.2
|
6
11
|
platform: ruby
|
7
|
-
authors:
|
8
|
-
- Guillermo A
|
12
|
+
authors:
|
13
|
+
- "Guillermo A\xCC\x81lvarez"
|
9
14
|
autorequire:
|
10
15
|
bindir: bin
|
11
16
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
17
|
+
|
18
|
+
date: 2012-02-11 00:00:00 Z
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
15
21
|
name: minitest
|
16
|
-
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
17
24
|
none: false
|
18
|
-
requirements:
|
19
|
-
- -
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: 3
|
29
|
+
segments:
|
30
|
+
- 0
|
31
|
+
version: "0"
|
22
32
|
type: :development
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
*).*$/'`dirname $css_file`'\\/\\1/p' $css_file ; done | ruby -n -e \"puts File.expand_path(\\$_)[File.expand_path('.').size+1..-1]\"\n\nProbably
|
29
|
-
could be improve.\n\n\n## Usage\n\nGiven a css file with absolute and relative images\n\n\t\t$
|
30
|
-
cat style.css\n\t\tbody {\n\t\t\tbackground: url(../images/bg.jpg), url ( ../images/bg2.jpg
|
31
|
-
);\n\t\t\tbackground: url(\"../images/bg3.jpg\");\n\t\t\tbackground: url('/images/bg4.jpg);\n\t\t\tbackground:
|
32
|
-
url('images/bg5.jpg');\n\t\t}\n\nExtract the images only ``-e jpg -e png -e gif``\n\n\t\t$
|
33
|
-
cat style.css | extract_files -e jpg\n\t\t../images/bg.jpg\n\t\t../images/bg2.jpg\n\t\t../images/bg3.jpg\n\t\t/images/bg4.jpg\n\t\timages/bg5.jpg\n\nNow,
|
34
|
-
relative to the css directory ``-b css``\n\n\t\t$ cat style.css | extract_files
|
35
|
-
\ -e jpg -b css\n\t\tcss/../images/bg.jpg\n\t\tcss/../images/bg2.jpg\n\t\tcss/../images/bg3.jpg\n\t\tcss/images/bg4.jpg\n\t\tcss/images/bg5.jpg\n\nAnd
|
36
|
-
do the path expansion ``-p``.\n\n\t\t$ cat style.css | extract_files -e jpg -b
|
37
|
-
css -p\n\t\timages/bg.jpg\n\t\timages/bg2.jpg\n\t\timages/bg3.jpg\n\t\tcss/images/bg4.jpg\n\t\tcss/images/bg5.jpg\n\nOr
|
38
|
-
show the full path ``-f``.\n\n\t\t$ cat style.css | extract_files -e jpg -b css
|
39
|
-
-p -f\n\t\t/Users/guillermo/Documents/extract_files/images/bg.jpg\n\t\t/Users/guillermo/Documents/extract_files/images/bg2.jpg\n\t\t/Users/guillermo/Documents/extract_files/images/bg3.jpg\n\t\t/Users/guillermo/Documents/extract_files/css/images/bg4.jpg\n\t\t/Users/guillermo/Documents/extract_files/css/images/bg5.jpg\n\n\n\nYou
|
40
|
-
can pass the file/files directly: \n\n\t\t$ extract_files * -e png\n\t\timage1.png\n\t\t/images/img1.png\n\n\n##
|
41
|
-
Install\n\nThere are two ways of installing this small libbrary:\n\n### Rubygems\n\n
|
42
|
-
\ $ gem install extract_files\n\nYou will have the code as a library and the binary\n\n###
|
43
|
-
Script only\n\n\t\tcurl -O https://raw.github.com/guillermo/extract_files/master/bin/extract_files\n\t\tchmod
|
44
|
-
+x extract_files\n\n## Development\n\nThe script is generated automatically with
|
45
|
-
rake, so if you fork, ensure that you edit the correct files.\n\n## License\n\n<pre>\n
|
46
|
-
____ __ __ \n| __ ) ___ ___ _ _\\ \\ / /_
|
47
|
-
_ _ __ ___ \n| _ \\ / _ \\/ _ \\ '__\\ \\ /\\ / / _` | '__/ _ \\\n| |_) | __/
|
48
|
-
\ __/ | \\ V V / (_| | | | __/\n|____/ \\___|\\___|_| \\_/\\_/ \\__,_|_|
|
49
|
-
\ \\___|\n \n _ _ \n|
|
50
|
-
| (_) ___ ___ _ __ ___ ___ \n| | | |/ __/ _ \\ '_ \\/ __|/ _ \\\n| |___| |
|
51
|
-
(_| __/ | | \\__ \\ __/\n|_____|_|\\___\\___|_| |_|___/\\___|\n \n----------------------------------------------------------------------------\n\"THE
|
52
|
-
BEER-WARE LICENSE\" (Revision 42):\nguillermo@cientifico.net wrote this file. As
|
53
|
-
long as you retain this \nnotice you can do whatever you want with this stuff. If
|
54
|
-
we meet some day,\nand you think this stuff is worth it, you can buy me a beer in
|
55
|
-
return \nGuillermo Alvarez Fernandez\n----------------------------------------------------------------------------\n\n</pre>\n\n"
|
56
|
-
email:
|
33
|
+
version_requirements: *id001
|
34
|
+
description: |-
|
35
|
+
Tired of generating big builds for the cdn? Just want to know wich files your designers in their css are really using? The images of all the static fiels? extract_files look inside json, html, css, and look for files based on a given extension or extensions.
|
36
|
+
run extract_files -h to have more help.
|
37
|
+
email:
|
57
38
|
- guillermo@cientifico.net
|
58
|
-
executables:
|
39
|
+
executables:
|
59
40
|
- extract_files
|
60
41
|
extensions: []
|
42
|
+
|
61
43
|
extra_rdoc_files: []
|
62
|
-
|
44
|
+
|
45
|
+
files:
|
63
46
|
- .gitignore
|
64
47
|
- .travis.yml
|
65
48
|
- Gemfile
|
@@ -76,29 +59,38 @@ files:
|
|
76
59
|
- test/fixtures/style.css
|
77
60
|
homepage: https://github.com/guillermo/extract_files
|
78
61
|
licenses: []
|
62
|
+
|
79
63
|
post_install_message:
|
80
64
|
rdoc_options: []
|
81
|
-
|
65
|
+
|
66
|
+
require_paths:
|
82
67
|
- lib
|
83
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
68
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
84
69
|
none: false
|
85
|
-
requirements:
|
86
|
-
- -
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
|
89
|
-
|
70
|
+
requirements:
|
71
|
+
- - ">="
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
hash: 3
|
74
|
+
segments:
|
75
|
+
- 0
|
76
|
+
version: "0"
|
77
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
90
78
|
none: false
|
91
|
-
requirements:
|
92
|
-
- -
|
93
|
-
- !ruby/object:Gem::Version
|
94
|
-
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
hash: 3
|
83
|
+
segments:
|
84
|
+
- 0
|
85
|
+
version: "0"
|
95
86
|
requirements: []
|
87
|
+
|
96
88
|
rubyforge_project: extract_files
|
97
|
-
rubygems_version: 1.8.
|
89
|
+
rubygems_version: 1.8.15
|
98
90
|
signing_key:
|
99
91
|
specification_version: 3
|
100
92
|
summary: Extract files from stdin or files given an extension/extensions
|
101
|
-
test_files:
|
93
|
+
test_files:
|
102
94
|
- test/extract_files_test.rb
|
103
95
|
- test/fixtures/files.json
|
104
96
|
- test/fixtures/index.html
|