spidr_cli 0.1.0 → 0.2.0
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/README.md +5 -2
- data/lib/spidr_cli/options.rb +7 -7
- data/lib/spidr_cli/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 122d1ee2879d8333bae8fda51cbaa5adcc0a3810344a925593cfdc9dfc459916
|
4
|
+
data.tar.gz: 7f5471d05f5b977b531fccca29b07f3c5278b1b1b23e2c625f1ae832c0b57481
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4dfc79d60c5f5a6a3dd119eee44af28f31d92b915fe4ebe4fcb07a0a00781e111e260adacae6d0bb860223902478f6550e4ba39e6f82c1865237bf1f5a8de939
|
7
|
+
data.tar.gz: c577c737be56e1b1009a343354bef7aae2fc2dc3e1a829a358430e54772623d252ae24080a1800370f2c670a04c6f55598e91cd462e64ab81709682104cfaffb
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# SpidrCLI
|
1
|
+
# SpidrCLI [](https://travis-ci.org/buren/spidr_cli)
|
2
2
|
|
3
3
|
Command Line Interface (CLI) for the excellent [`spidr`](https://github.com/postmodern/spidr) gem.
|
4
4
|
|
@@ -51,10 +51,13 @@ $ spidr --columns=code,content_type,url \
|
|
51
51
|
Full usage instructions
|
52
52
|
|
53
53
|
```
|
54
|
-
Usage: spidr [<
|
54
|
+
Usage: spidr [<method>] [options] <url>
|
55
55
|
--columns=[val1,val2] Columns in output
|
56
56
|
--content-types=[val1,val2] Formats to output (html, javascript, css, json, ..)
|
57
57
|
--[no-]header Include the header
|
58
|
+
--hosts=[example.com] Only spider links on certain hosts
|
59
|
+
--ignore-hosts=[www.example.com]
|
60
|
+
Do not spider links on certain hosts
|
58
61
|
--ports=[80, 443] Only spider links on certain ports
|
59
62
|
--ignore-ports=[8000, 8080, 3000]
|
60
63
|
Do not spider links on certain ports
|
data/lib/spidr_cli/options.rb
CHANGED
@@ -48,13 +48,13 @@ module SpidrCLI
|
|
48
48
|
|
49
49
|
# NOTE: --hosts and --ignore-hosts are overriden when using Spidr::site
|
50
50
|
# @see https://github.com/postmodern/spidr/blob/master/lib/spidr/agent.rb#L273
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
51
|
+
parser.on('--hosts=[example.com]', Array, 'Only spider links on certain hosts') do |value|
|
52
|
+
spidr_options[:hosts] = to_option_regexp_array(value) if value
|
53
|
+
end
|
54
|
+
|
55
|
+
parser.on('--ignore-hosts=[www.example.com]', Array, 'Do not spider links on certain hosts') do |value|
|
56
|
+
spidr_options[:ignore_hosts] = to_option_regexp_array(value) if value
|
57
|
+
end
|
58
58
|
|
59
59
|
parser.on('--ports=[80, 443]', Array, 'Only spider links on certain ports') do |value|
|
60
60
|
spidr_options[:ports] = to_option_int_array(value) if value
|
data/lib/spidr_cli/version.rb
CHANGED