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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7314edb32ef662484e8eb081eeb853b0e35dacc03d40944dc87f5454ec3d8da4
4
- data.tar.gz: 97bf39df9af6ff018acc8008fad269a5596d6676f3500903ce1c72cda27d9933
3
+ metadata.gz: 6ea01898973734ca8b60989aaae0921874d2932fbcac1f888c2c9a19b2a45fdb
4
+ data.tar.gz: 54a1feede7dcbf0caa136aa6622b3f00623e8a62269c206e655d88c95e81ede6
5
5
  SHA512:
6
- metadata.gz: a1a9b57eaf28a72fc87022d92dc91d4613c8a2f961c5c88998d2b7af106452643b8a440d7e5d8f265eb5489a50e85c4f3b1a612df0319d8952623890ab6e53bb
7
- data.tar.gz: 8bba1a0ae019e57930c0631403afaef88046fabef16adfa4f02b5ed80558142649bce444faa9271611570a2bf821ee7841915a5ea2a4e773e1af31b143a36769
6
+ metadata.gz: f5dfc6980f11086da0cc24d1b8df72f5555bf09425939c9333f401263bb0106521c49eec7892a221c950f04fcca2bbaa2a54425c7855b0da1fe4d9f7c491bf91
7
+ data.tar.gz: 1c48f0d27e82db7f96f5697958c365d458b23c14e8bc42f7a0783404c26ce37fa61af068ffc2d7f1dd5c9e327080d564f1eb3456cea6123609e1b8896848516d
@@ -1,10 +1,17 @@
1
1
  ## CHANGELOG
2
2
 
3
- ### 1.0.1
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
- fraktur | ๐•ฑ๐–—๐–”๐–’ ๐•ฌ ๐–™๐–” ๐–…
50
- small_caps | Fส€แดแด A แด›แด Z
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
@@ -21,4 +21,5 @@ Gem::Specification.new do |gem|
21
21
 
22
22
  gem.add_dependency "paint", ">= 0.9", "< 3.0"
23
23
  gem.add_dependency "rationalist", "~> 2.0"
24
+ gem.add_dependency "clipboard", "~> 1.3"
24
25
  end
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
- puts Az.az(data, argv[:to])
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)
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Az
4
- VERSION = "1.0.1"
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
- fraktur: "๐•ฌ-๐–…๐–†-๐–Ÿ",
24
- small_caps: "A-Zแด€ส™แด„แด…แด‡๊œฐษขสœษชแดŠแด‹สŸแดษดแดแดฉqส€๊œฑแด›แดœแด แดกxyแดข", # upper remains ascii
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: "โ’ถ-โ“โ’ถ-โ“",
@@ -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 "๐“•๐“ป๐“ธ๐“ถ ๐“ ๐“ฝ๐“ธ ๐“ฉ", az("From A to Z", :script)
32
- assert_equal "๐•ฑ๐–—๐–”๐–’ ๐•ฌ ๐–™๐–” ๐–…", az("From A to Z", :fraktur)
33
- assert_equal "Fส€แดแด A แด›แด Z", az("From A to Z", :small_caps)
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: 1.0.1
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