lslinks 0.2.1 → 0.3.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 +6 -0
- data/lib/lslinks/formatter.rb +1 -1
- data/lib/lslinks/option_parser.rb +9 -8
- data/lib/lslinks/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 72b04371df2e152286b300ce8a1d4a0caae9e17366d6128e010f42609e309001
|
4
|
+
data.tar.gz: cd9c7ea7b87414f768065b67b19ec1f96bb1aa887b07fa9c6522fee1c1622fe0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9acce0ebd0999cb187556c2787d13a2ecb45bf6b5056fe2197ad9cab9b06886b15f0993ac1538d1cd6071816b87033e12703039b029a5e93942bc69c733d543
|
7
|
+
data.tar.gz: 31b73cacd96f6498577ccaf2b98cd9d8b587c2d8f7c50cf6547676294ff84db2855c628a40214b78178e4b119eeef844221c371d7b38befab61856a92c175b42
|
data/README.md
CHANGED
@@ -35,6 +35,12 @@ $ lslinks -k https://www.ruby-lang.org/
|
|
35
35
|
https://www.ruby-lang.org/en/
|
36
36
|
```
|
37
37
|
|
38
|
+
### more options
|
39
|
+
|
40
|
+
```console
|
41
|
+
$ lslinks --help
|
42
|
+
```
|
43
|
+
|
38
44
|
## Development
|
39
45
|
|
40
46
|
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
data/lib/lslinks/formatter.rb
CHANGED
@@ -2,17 +2,18 @@ class Lslinks::OptionParser < OptionParser
|
|
2
2
|
class << self
|
3
3
|
def call(argv)
|
4
4
|
parser = new
|
5
|
-
parser.banner = "Usage: #{File.basename(Process.argv0)} [OPTIONS]
|
5
|
+
parser.banner = "Usage: #{File.basename(Process.argv0)} [OPTIONS] [--] RESOURCE-NAME"
|
6
6
|
parser.version = Lslinks::VERSION
|
7
7
|
parser.separator("")
|
8
|
-
parser.separator("
|
9
|
-
parser.on("-l", "list links with text")
|
10
|
-
parser.on("-k", "--convert-links", "convert links to full URL")
|
8
|
+
parser.separator("RESOURCE-NAME are URL, local file path or stdin(-).")
|
11
9
|
parser.separator("")
|
12
|
-
parser.separator("
|
13
|
-
parser.on("
|
14
|
-
parser.on("--
|
15
|
-
parser.on("-
|
10
|
+
parser.separator("OPTIONS:")
|
11
|
+
parser.on("-l", "list links with text.") # from ls
|
12
|
+
parser.on("-k", "--convert-links", "convert links to full URL.") # from wget
|
13
|
+
parser.on("--base=BASE-URL", "specify base URL for '--convert-links' option.") # from wget
|
14
|
+
parser.on("--user-agent=USER-AGENT", "specify User-Agent header. same as '--user-agent=USER-AGENT'.") # from curl wget
|
15
|
+
parser.on("--referer=REFERER", "specify Referer header. same as '--referer=REFERER'.") # from curl wget
|
16
|
+
parser.on("-H", "--header=HEADER-LINE", "specify various headers in HTTP request. e.g.: --header='Accept-Language: ja'") # from curl wget
|
16
17
|
parser.on("--compressed", "ignore. no effect.") # from curl
|
17
18
|
options = {
|
18
19
|
http_headers: {},
|
data/lib/lslinks/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lslinks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yuya.Nishida.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-11-
|
11
|
+
date: 2023-11-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|