yuurisan 1.0.0 → 1.0.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1b9c6bcdd1d0d941b68f7792e07a7b4332c36b1ac7d67e5dc88db069e95a89b6
4
- data.tar.gz: 5c0ab7ad42432c66545b550eac6355c7065fafbe1258bc8fb5b0fd5b84aa6c01
3
+ metadata.gz: 61e647eebbd9191ba53ab7b65d09d5917f8eb9ed931c64b56a8bc290000fe0fc
4
+ data.tar.gz: 4a36b4a219694d21189d5cdd28da301646a17bdbea1ae8a41fae882824d0a6cd
5
5
  SHA512:
6
- metadata.gz: 45ea406846a2aca072dd5e2d200b30ea251759f6338b3993b93185896171cbb70ffd9bf7486fd2c22ae78785d5c1e75e2f330a26278a5ad71848a5531eaf45b7
7
- data.tar.gz: 5e399ad336aa7392550b72bc2b78c05cfc5f243bcb4c6591665e30a07414ccae054a911f13ea051864f0e932de9456cb7a61fdb265ba75bd93766626a1f1a6dc
6
+ metadata.gz: f0381a9c0fbe630190d2ca0f8de974b4785734e3114773f7a34596bf9a4ca00e442bdd477e5b47be22e425eee6c9abbb8257e613b61bb7c9faca0d119745ab51
7
+ data.tar.gz: 4df7a36d619c6cccb69e84d32672faa4dafad4a9fcac661fc4aa076ac56ef2fe01c5df50bd8d80d1e97cd68a64ab92d9a50ce11398e138eb897641ff9703947f
@@ -1,19 +1,23 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "time"
2
4
  require "artii"
3
5
 
4
6
  module Yuurisan
5
7
  module Banner
8
+ # ANSI color codes — matches colorama Fore/Style used in Python version
6
9
  RESET = "\e[0m"
7
10
  BOLD = "\e[1m"
8
- CYAN = "\e[36m"
9
- MAGENTA = "\e[35m"
10
- GREEN = "\e[32m"
11
- YELLOW = "\e[33m"
11
+ CYAN = "\e[36m" # Fore.CYAN
12
+ MAGENTA = "\e[35m" # Fore.MAGENTA
13
+ GREEN = "\e[32m" # Fore.GREEN
14
+ YELLOW = "\e[33m" # Fore.YELLOW
12
15
 
13
16
  def self.show(bot_name)
14
17
  system("cls") || system("clear")
15
18
 
16
- ascii_art = Artii::Base.new(font: "standard").asciify("Yuurisandesu").rstrip("\n")
19
+ # pyfiglet.figlet_format("Yuurisandesu", font="standard") equivalent
20
+ ascii_art = Artii::Base.new(font: "standard").asciify("Yuurisandesu").rstrip
17
21
 
18
22
  timestamp = Time.now.strftime("%d-%m-%Y %H:%M:%S")
19
23
 
@@ -1,7 +1,10 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Yuurisan
2
4
  module Title
3
5
  def self.set(bot_name)
4
6
  title = "#{bot_name} by : 佐賀県産 (YUURI)"
7
+ # Works on most terminals: xterm, iTerm2, GNOME Terminal, Windows Terminal
5
8
  print "\e]0;#{title}\a"
6
9
  $stdout.flush
7
10
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Yuurisan
2
- VERSION = "1.0.0"
4
+ VERSION = "1.0.1"
3
5
  end
data/lib/yuurisan.rb CHANGED
@@ -1,13 +1,19 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative "yuurisan/version"
2
4
  require_relative "yuurisan/banner"
3
5
  require_relative "yuurisan/title"
4
6
 
5
7
  module Yuurisan
8
+ # Sets terminal title and prints the ASCII banner
9
+ # Usage: Yuurisan.banner("My Bot")
6
10
  def self.banner(bot_name)
7
11
  set_title(bot_name)
8
12
  Banner.show(bot_name)
9
13
  end
10
14
 
15
+ # Only sets the terminal tab title
16
+ # Usage: Yuurisan.set_title("My Bot")
11
17
  def self.set_title(bot_name)
12
18
  Title.set(bot_name)
13
19
  end
data/yuurisan.gemspec CHANGED
@@ -8,16 +8,16 @@ Gem::Specification.new do |spec|
8
8
  spec.authors = ["Yuurisandesu"]
9
9
  spec.email = [""]
10
10
 
11
- spec.summary = "Shared utility library for all Yuuri bots banner & terminal title"
12
- spec.description = "Ruby port of yuurisan-rb. Provides reusable ASCII banner generation " \
11
+ spec.summary = "Shared utility library for all Yuuri bots banner & terminal title"
12
+ spec.description = "Ruby port of yuurisan-lib. Provides reusable ASCII banner generation " \
13
13
  "and terminal window title management so every Yuuri bot looks consistent."
14
- spec.homepage = "https://github.com/Yuurichan-N3/yuurisan-rb"
14
+ spec.homepage = "https://github.com/Yuurichan-N3/yuurisan-lib"
15
15
  spec.license = "MIT"
16
16
 
17
17
  spec.required_ruby_version = ">= 2.7.0"
18
18
 
19
19
  spec.metadata["homepage_uri"] = spec.homepage
20
- spec.metadata["source_code_uri"] = "https://github.com/Yuurichan-N3/yuurisan-rb"
20
+ spec.metadata["source_code_uri"] = "https://github.com/Yuurichan-N3/yuurisan-lib"
21
21
 
22
22
  # Include all lib files
23
23
  spec.files = Dir.glob("lib/**/*.rb") + ["yuurisan.gemspec", "LICENSE"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yuurisan
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuurisandesu
@@ -23,8 +23,8 @@ dependencies:
23
23
  - - "~>"
24
24
  - !ruby/object:Gem::Version
25
25
  version: '2.1'
26
- description: Ruby port of yuurisan-rb. Provides reusable ASCII banner generation and
27
- terminal window title management so every Yuuri bot looks consistent.
26
+ description: Ruby port of yuurisan-lib. Provides reusable ASCII banner generation
27
+ and terminal window title management so every Yuuri bot looks consistent.
28
28
  email:
29
29
  - ''
30
30
  executables: []
@@ -37,12 +37,12 @@ files:
37
37
  - lib/yuurisan/title.rb
38
38
  - lib/yuurisan/version.rb
39
39
  - yuurisan.gemspec
40
- homepage: https://github.com/Yuurichan-N3/yuurisan-rb
40
+ homepage: https://github.com/Yuurichan-N3/yuurisan-lib
41
41
  licenses:
42
42
  - MIT
43
43
  metadata:
44
- homepage_uri: https://github.com/Yuurichan-N3/yuurisan-rb
45
- source_code_uri: https://github.com/Yuurichan-N3/yuurisan-rb
44
+ homepage_uri: https://github.com/Yuurichan-N3/yuurisan-lib
45
+ source_code_uri: https://github.com/Yuurichan-N3/yuurisan-lib
46
46
  rdoc_options: []
47
47
  require_paths:
48
48
  - lib
@@ -59,5 +59,5 @@ required_rubygems_version: !ruby/object:Gem::Requirement
59
59
  requirements: []
60
60
  rubygems_version: 3.6.9
61
61
  specification_version: 4
62
- summary: Shared utility library for all Yuuri bots banner & terminal title
62
+ summary: Shared utility library for all Yuuri bots banner & terminal title
63
63
  test_files: []