html_to_ansi 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/README.md +51 -8
- data/html_to_ansi.gemspec +2 -0
- data/lib/html_to_ansi/version.rb +1 -1
- metadata +20 -7
- data/Gemfile.lock +0 -43
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 39bcd17b0bcd685c4eebb8a0032275f206b8abdf54497206624c79037d3d7b82
|
4
|
+
data.tar.gz: 442976231587a0f3a2698c88f97a4d4ac655984288e497b5933b961ad1860b10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5bf9a12a87d570c6d96858b7f861cc418c3ba20efe02b1d446bbbd27b3afa28bf99d4e249689a40a8c3aa8b69f7a02e62a1bce74847fab8fc386b5fef3d463f8
|
7
|
+
data.tar.gz: e446843d4ad9b1fe3da80e0c0b56c66ad305d08128a37396877302c63910c5042e130c6227059e880b2648c12f55997c99b88d7344154d814dd6b4269ee9312e
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
# HtmlToAnsi
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
3
|
+
Generate ANSI text with escape sequences to emulate basic HTML formatting.
|
6
4
|
|
7
5
|
## Installation
|
8
6
|
|
@@ -22,17 +20,62 @@ Or install it yourself as:
|
|
22
20
|
|
23
21
|
## Usage
|
24
22
|
|
25
|
-
|
23
|
+
### Paragraphs
|
24
|
+
|
25
|
+
Code:
|
26
|
+
|
27
|
+
```ruby
|
28
|
+
HtmlToAnsi.convert(%(
|
29
|
+
<p>First paragraph</p>
|
30
|
+
<p>Second paragraph</p>
|
31
|
+
))
|
32
|
+
```
|
33
|
+
|
34
|
+
Output:
|
35
|
+
|
36
|
+
> First paragraph
|
37
|
+
>
|
38
|
+
> Second paragraph
|
39
|
+
|
40
|
+
### Ordered List
|
41
|
+
|
42
|
+
Code:
|
26
43
|
|
27
|
-
|
44
|
+
```ruby
|
45
|
+
HtmlToAnsi.convert(%(
|
46
|
+
<ul>
|
47
|
+
<li>One</li>
|
48
|
+
<li>Two</li>
|
49
|
+
</ul>
|
50
|
+
))
|
51
|
+
```
|
52
|
+
|
53
|
+
Output:
|
54
|
+
|
55
|
+
> 1. One
|
56
|
+
> 2. Two
|
57
|
+
|
58
|
+
### Unordered List
|
59
|
+
|
60
|
+
Code:
|
61
|
+
|
62
|
+
```ruby
|
63
|
+
HtmlToAnsi.convert(%(
|
64
|
+
<ul>
|
65
|
+
<li>One</li>
|
66
|
+
<li>Two</li>
|
67
|
+
</ul>
|
68
|
+
))
|
69
|
+
```
|
28
70
|
|
29
|
-
|
71
|
+
Output:
|
30
72
|
|
31
|
-
|
73
|
+
> * One
|
74
|
+
> * Two
|
32
75
|
|
33
76
|
## Contributing
|
34
77
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
78
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/castwide/html_to_ansi.
|
36
79
|
|
37
80
|
## License
|
38
81
|
|
data/html_to_ansi.gemspec
CHANGED
@@ -21,6 +21,8 @@ Gem::Specification.new do |spec|
|
|
21
21
|
end
|
22
22
|
spec.require_paths = ["lib"]
|
23
23
|
|
24
|
+
spec.add_dependency 'rexml', '~> 3.2'
|
25
|
+
|
24
26
|
spec.add_development_dependency "bundler", "~> 2.0"
|
25
27
|
spec.add_development_dependency "rake", "~> 10.0"
|
26
28
|
spec.add_development_dependency "rspec", "~> 3.0"
|
data/lib/html_to_ansi/version.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: html_to_ansi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fred Snyder
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-03-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rexml
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3.2'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '3.2'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: bundler
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -77,7 +91,6 @@ files:
|
|
77
91
|
- ".rspec"
|
78
92
|
- ".travis.yml"
|
79
93
|
- Gemfile
|
80
|
-
- Gemfile.lock
|
81
94
|
- LICENSE.txt
|
82
95
|
- README.md
|
83
96
|
- Rakefile
|
@@ -92,7 +105,7 @@ homepage: http://castwide.com
|
|
92
105
|
licenses:
|
93
106
|
- MIT
|
94
107
|
metadata: {}
|
95
|
-
post_install_message:
|
108
|
+
post_install_message:
|
96
109
|
rdoc_options: []
|
97
110
|
require_paths:
|
98
111
|
- lib
|
@@ -107,8 +120,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
107
120
|
- !ruby/object:Gem::Version
|
108
121
|
version: '0'
|
109
122
|
requirements: []
|
110
|
-
rubygems_version: 3.
|
111
|
-
signing_key:
|
123
|
+
rubygems_version: 3.3.7
|
124
|
+
signing_key:
|
112
125
|
specification_version: 4
|
113
126
|
summary: HTML to ANSI conversion tool
|
114
127
|
test_files: []
|
data/Gemfile.lock
DELETED
@@ -1,43 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
html_to_ansi (0.1.0)
|
5
|
-
|
6
|
-
GEM
|
7
|
-
remote: https://rubygems.org/
|
8
|
-
specs:
|
9
|
-
diff-lcs (1.3)
|
10
|
-
docile (1.3.1)
|
11
|
-
json (2.2.0)
|
12
|
-
rake (10.5.0)
|
13
|
-
rspec (3.8.0)
|
14
|
-
rspec-core (~> 3.8.0)
|
15
|
-
rspec-expectations (~> 3.8.0)
|
16
|
-
rspec-mocks (~> 3.8.0)
|
17
|
-
rspec-core (3.8.0)
|
18
|
-
rspec-support (~> 3.8.0)
|
19
|
-
rspec-expectations (3.8.2)
|
20
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
21
|
-
rspec-support (~> 3.8.0)
|
22
|
-
rspec-mocks (3.8.0)
|
23
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
24
|
-
rspec-support (~> 3.8.0)
|
25
|
-
rspec-support (3.8.0)
|
26
|
-
simplecov (0.16.1)
|
27
|
-
docile (~> 1.1)
|
28
|
-
json (>= 1.8, < 3)
|
29
|
-
simplecov-html (~> 0.10.0)
|
30
|
-
simplecov-html (0.10.2)
|
31
|
-
|
32
|
-
PLATFORMS
|
33
|
-
x64-mingw32
|
34
|
-
|
35
|
-
DEPENDENCIES
|
36
|
-
bundler (~> 2.0)
|
37
|
-
html_to_ansi!
|
38
|
-
rake (~> 10.0)
|
39
|
-
rspec (~> 3.0)
|
40
|
-
simplecov (~> 0.14)
|
41
|
-
|
42
|
-
BUNDLED WITH
|
43
|
-
2.0.1
|