az 1.0.1 โ 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -3
- data/README.md +10 -3
- data/az.gemspec +1 -0
- data/bin/az +20 -1
- data/lib/az/constants.rb +10 -4
- data/spec/az_spec.rb +8 -3
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ea01898973734ca8b60989aaae0921874d2932fbcac1f888c2c9a19b2a45fdb
|
4
|
+
data.tar.gz: 54a1feede7dcbf0caa136aa6622b3f00623e8a62269c206e655d88c95e81ede6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5dfc6980f11086da0cc24d1b8df72f5555bf09425939c9333f401263bb0106521c49eec7892a221c950f04fcca2bbaa2a54425c7855b0da1fe4d9f7c491bf91
|
7
|
+
data.tar.gz: 1c48f0d27e82db7f96f5697958c365d458b23c14e8bc42f7a0783404c26ce37fa61af068ffc2d7f1dd5c9e327080d564f1eb3456cea6123609e1b8896848516d
|
data/CHANGELOG.md
CHANGED
@@ -1,10 +1,17 @@
|
|
1
1
|
## CHANGELOG
|
2
2
|
|
3
|
-
###
|
3
|
+
### 2.0.0
|
4
|
+
#### New CLI Options
|
5
|
+
- Add `--copy` option to directly copy to clipboard
|
6
|
+
- Add `--fonts` option which displays list of included fonts
|
7
|
+
|
8
|
+
#### Font Changes
|
9
|
+
- Rename script to script_bold and add (light) ๐๐ธ๐๐พ๐
๐
|
10
|
+
- Rename fraktur to fraktur_bold and add (light) ๐ฃ๐ฏ๐๐จ๐ฑ๐ฒ๐ฏ
|
11
|
+
- Add ๐๐ ๐ฆ๐๐๐-๐ค๐ฅ๐ฃ๐ฆ๐๐
|
4
12
|
|
13
|
+
### 1.0.1
|
5
14
|
- Bundle correct gem version
|
6
15
|
|
7
16
|
### 1.0.0
|
8
|
-
|
9
17
|
- Initial release
|
10
|
-
|
data/README.md
CHANGED
@@ -21,6 +21,10 @@ $ az "character.construction" --to bold
|
|
21
21
|
# ๐๐ก๐๐ซ๐๐๐ญ๐๐ซ.๐๐จ๐ง๐ฌ๐ญ๐ซ๐ฎ๐๐ญ๐ข๐จ๐ง
|
22
22
|
```
|
23
23
|
|
24
|
+
You can also directly copy to your system clipboard using the `--copy` option
|
25
|
+
|
26
|
+
To see a list of all fonts included, run: `$ az --fonts`
|
27
|
+
|
24
28
|
### From Ruby
|
25
29
|
|
26
30
|
```ruby
|
@@ -45,10 +49,13 @@ sans | ๐ฅ๐๐๐ ๐ ๐๐ ๐น
|
|
45
49
|
sans_bold | ๐๐ฟ๐ผ๐บ ๐ ๐๐ผ ๐ญ
|
46
50
|
sans_italic | ๐๐ณ๐ฐ๐ฎ ๐ ๐ต๐ฐ ๐ก
|
47
51
|
sans_bold_italic / sans_italic_bold | ๐๐ง๐ค๐ข ๐ผ ๐ฉ๐ค ๐
|
48
|
-
script |
|
49
|
-
|
50
|
-
|
52
|
+
script | โฑ๐โด๐ ๐ ๐โด ๐ต
|
53
|
+
bold_script / script_bold | ๐๐ป๐ธ๐ถ ๐ ๐ฝ๐ธ ๐ฉ
|
54
|
+
fraktur | ๐๐ฏ๐ฌ๐ช ๐ ๐ฑ๐ฌ โจ
|
55
|
+
bold_fraktur / fraktur_bold | ๐ฑ๐๐๐ ๐ฌ ๐๐ ๐
|
51
56
|
parentheses | ๐โญโชโจ ๐ โฏโช ๐ฉ
|
57
|
+
small_caps | Fสแดแด A แดแด Z
|
58
|
+
double_struck | ๐ฝ๐ฃ๐ ๐ ๐ธ ๐ฅ๐ โค
|
52
59
|
circled | โปโกโโ โถ โฃโ โ
|
53
60
|
circled_upper / upper_circled | โปโโโ โถ โโ โ
|
54
61
|
circled_negative / negative_circled | ๐
๐
ก๐
๐
๐
๐
ฃ๐
๐
ฉ
|
data/az.gemspec
CHANGED
data/bin/az
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
|
4
4
|
require "rationalist"
|
5
5
|
require "paint"
|
6
|
+
require "clipboard"
|
6
7
|
require "az"
|
7
8
|
|
8
9
|
argv = Rationalist.parse(
|
@@ -11,11 +12,13 @@ argv = Rationalist.parse(
|
|
11
12
|
alias: {
|
12
13
|
t: 'to',
|
13
14
|
v: 'version',
|
15
|
+
c: 'copy',
|
14
16
|
},
|
15
17
|
boolean: [
|
16
18
|
'fonts',
|
17
19
|
'help',
|
18
20
|
'version',
|
21
|
+
'copy'
|
19
22
|
]
|
20
23
|
)
|
21
24
|
|
@@ -36,6 +39,8 @@ if argv[:help]
|
|
36
39
|
|
37
40
|
#{Paint["az", :bold]} data --to font
|
38
41
|
|
42
|
+
--to | -t | specify font to use (required)
|
43
|
+
--copy | -c | copy to clipboard instead of displaying on stdout
|
39
44
|
--fonts | | displays list of fonts
|
40
45
|
--help | | this help page
|
41
46
|
--version | -v | displays version of az
|
@@ -48,6 +53,11 @@ if argv[:help]
|
|
48
53
|
exit(0)
|
49
54
|
end
|
50
55
|
|
56
|
+
if argv[:fonts]
|
57
|
+
puts Az.fonts.join(" ")
|
58
|
+
exit(0)
|
59
|
+
end
|
60
|
+
|
51
61
|
if argv[:_] && argv[:_][0]
|
52
62
|
data = argv[:_][0]
|
53
63
|
elsif !$stdin.tty?
|
@@ -57,7 +67,16 @@ else
|
|
57
67
|
end
|
58
68
|
|
59
69
|
begin
|
60
|
-
|
70
|
+
res = Az.az(
|
71
|
+
data,
|
72
|
+
(argv[:to] or raise ArgumentError, "must specify font via --to option"),
|
73
|
+
)
|
74
|
+
if argv[:copy]
|
75
|
+
Clipboard.copy(res)
|
76
|
+
puts "Converted string has been copied to the clipboard"
|
77
|
+
else
|
78
|
+
puts res
|
79
|
+
end
|
61
80
|
rescue ArgumentError
|
62
81
|
$stderr.puts Paint[$!.message, :red]
|
63
82
|
exit(1)
|
data/lib/az/constants.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Az
|
4
|
-
VERSION = "
|
4
|
+
VERSION = "2.0.0"
|
5
5
|
UNICODE_VERSION = "12.0.0"
|
6
6
|
|
7
7
|
FONTS = {
|
@@ -19,11 +19,17 @@ module Az
|
|
19
19
|
sans_bold_italic: "๐ผ-๐๐-๐ฏ",
|
20
20
|
sans_italic_bold: "๐ผ-๐๐-๐ฏ",
|
21
21
|
|
22
|
-
script: "
|
23
|
-
|
24
|
-
|
22
|
+
script: "๐โฌ๐๐โฐโฑ๐ขโโ๐ฅ๐ฆโโณ๐ฉ-๐ฌโ๐ฎ-๐ต๐ถ-๐นโฏ๐ปโ๐ฝ-๐โด๐
-๐",
|
23
|
+
bold_script: "๐-๐ฉ๐ช-๐",
|
24
|
+
script_bold: "๐-๐ฉ๐ช-๐",
|
25
|
+
fraktur: "๐๐
โญ๐-๐โโ๐-๐โ๐-๐โจ๐-๐ท",
|
26
|
+
fraktur_bold: "๐ฌ-๐
๐-๐",
|
27
|
+
bold_fraktur: "๐ฌ-๐
๐-๐",
|
25
28
|
parentheses: "๐-๐ฉโ-โต",
|
26
29
|
|
30
|
+
small_caps: "A-Zแดสแดแด
แด๊ฐษขสษชแดแดสแดษดแดแดฉqส๊ฑแดแดแด แดกxyแดข", # upper remains ascii
|
31
|
+
double_struck: "๐ธ๐นโ๐ป-๐พโ๐-๐โ๐โโโ๐-๐โค๐-๐ซ",
|
32
|
+
|
27
33
|
circled: "โถ-โโ-โฉ",
|
28
34
|
circled_upper: "โถ-โโถ-โ",
|
29
35
|
upper_circled: "โถ-โโถ-โ",
|
data/spec/az_spec.rb
CHANGED
@@ -28,10 +28,15 @@ describe "az" do
|
|
28
28
|
assert_equal "๐๐ณ๐ฐ๐ฎ ๐ ๐ต๐ฐ ๐ก", az("From A to Z", :sans_italic)
|
29
29
|
assert_equal "๐๐ง๐ค๐ข ๐ผ ๐ฉ๐ค ๐", az("From A to Z", :sans_bold_italic)
|
30
30
|
assert_equal "๐๐ง๐ค๐ข ๐ผ ๐ฉ๐ค ๐", az("From A to Z", :sans_italic_bold)
|
31
|
-
assert_equal "
|
32
|
-
assert_equal "
|
33
|
-
assert_equal "
|
31
|
+
assert_equal "โฑ๐โด๐ ๐ ๐โด ๐ต", az("From A to Z", :script)
|
32
|
+
assert_equal "๐๐ป๐ธ๐ถ ๐ ๐ฝ๐ธ ๐ฉ", az("From A to Z", :bold_script)
|
33
|
+
assert_equal "๐๐ป๐ธ๐ถ ๐ ๐ฝ๐ธ ๐ฉ", az("From A to Z", :script_bold)
|
34
|
+
assert_equal "๐๐ฏ๐ฌ๐ช ๐ ๐ฑ๐ฌ โจ", az("From A to Z", :fraktur)
|
35
|
+
assert_equal "๐ฑ๐๐๐ ๐ฌ ๐๐ ๐
", az("From A to Z", :bold_fraktur)
|
36
|
+
assert_equal "๐ฑ๐๐๐ ๐ฌ ๐๐ ๐
", az("From A to Z", :fraktur_bold)
|
34
37
|
assert_equal "๐โญโชโจ ๐ โฏโช ๐ฉ", az("From A to Z", :parentheses)
|
38
|
+
assert_equal "Fสแดแด A แดแด Z", az("From A to Z", :small_caps)
|
39
|
+
assert_equal "๐ฝ๐ฃ๐ ๐ ๐ธ ๐ฅ๐ โค", az("From A to Z", :double_struck)
|
35
40
|
assert_equal "โปโกโโ โถ โฃโ โ", az("From A to Z", :circled)
|
36
41
|
assert_equal "โปโโโ โถ โโ โ", az("From A to Z", :circled_upper)
|
37
42
|
assert_equal "โปโโโ โถ โโ โ", az("From A to Z", :upper_circled)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: az
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Lelis
|
@@ -44,6 +44,20 @@ dependencies:
|
|
44
44
|
- - "~>"
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: '2.0'
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: clipboard
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - "~>"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '1.3'
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - "~>"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '1.3'
|
47
61
|
description: Going from A to Z in different ways
|
48
62
|
email:
|
49
63
|
- mail@janlelis.de
|