yuurisan 1.0.1 → 1.0.3

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: 61e647eebbd9191ba53ab7b65d09d5917f8eb9ed931c64b56a8bc290000fe0fc
4
- data.tar.gz: 4a36b4a219694d21189d5cdd28da301646a17bdbea1ae8a41fae882824d0a6cd
3
+ metadata.gz: 100bfa3c4d9498cf836d8af8705098ac5f0539f2f326e91733ccd359ac7aca09
4
+ data.tar.gz: 6847b25c33f04dd6e18a64c769cf5c82cce274fcb1c9ca4e30a40272de74dcc4
5
5
  SHA512:
6
- metadata.gz: f0381a9c0fbe630190d2ca0f8de974b4785734e3114773f7a34596bf9a4ca00e442bdd477e5b47be22e425eee6c9abbb8257e613b61bb7c9faca0d119745ab51
7
- data.tar.gz: 4df7a36d619c6cccb69e84d32672faa4dafad4a9fcac661fc4aa076ac56ef2fe01c5df50bd8d80d1e97cd68a64ab92d9a50ce11398e138eb897641ff9703947f
6
+ metadata.gz: 2187f92422078b86ef831c61877693a45a7a85c4a99c8bd679f7b754a02e5e5f3e2f5bf97c85d9183493ef606813beb2d1befdea391e1ed292eefb8dddce0287
7
+ data.tar.gz: a65860767efc17841fed2f9382b7653413bf33c8e3e3f1c12fe385de144620984efed987f691fc934f915e6ef6d8d7026e6bd9ae51c37e5f7321f5b8ed687546
data/README.md ADDED
@@ -0,0 +1,145 @@
1
+ <div align="center">
2
+
3
+ <img width="100%" alt="header" src="https://capsule-render.vercel.app/api?type=waving&height=210&text=yuurisan&fontAlign=50&fontAlignY=36&fontSize=56&desc=Ruby%20Gem%20%7C%20ASCII%20Banner%20%7C%20Terminal%20Title%20Setter&descAlign=50&descAlignY=58"/>
4
+
5
+ <img alt="typing" src="https://readme-typing-svg.demolab.com?font=Inter&size=18&duration=3000&pause=650&center=true&vCenter=true&width=900&lines=ASCII+Banner+with+Figlet+Style+in+Ruby;Set+Terminal+Tab+Title+from+Your+Bot;One+Call+to+Show+Banner+and+Set+Title;Matches+Python+colorama+Fore%2FStyle+Colors;Works+on+Linux+%2F+macOS+%2F+Windows+Terminal"/>
6
+
7
+ <p>
8
+ <img alt="ruby" src="https://img.shields.io/badge/Ruby-3.2+-CC342D?logo=ruby&logoColor=white"/>
9
+ <img alt="gem" src="https://img.shields.io/badge/RubyGems-yuurisan-CC342D?logo=rubygems&logoColor=white"/>
10
+ <img alt="version" src="https://img.shields.io/badge/Version-1.0.2-111111"/>
11
+ <img alt="author" src="https://img.shields.io/badge/by-Yuurisandesu-111111"/>
12
+ </p>
13
+
14
+ <p>
15
+ <b>yuurisan</b> is a Ruby gem that prints a styled ASCII art banner and sets the terminal tab title for your Ruby bots and scripts.<br/>
16
+ Drop it into any Ruby project and call one method to get a clean startup banner with your bot name, community link, and timestamp -- styled with ANSI colors that match the Python colorama palette used across Yuurisandesu's projects.<br/>
17
+ Built and distributed by <b>Yuurisandesu</b>.
18
+ </p>
19
+
20
+ </div>
21
+
22
+ ---
23
+
24
+ ## Table of Contents
25
+
26
+ - [Requirements](#requirements)
27
+ - [Installation](#installation)
28
+ - [Usage](#usage)
29
+ - [API Reference](#api-reference)
30
+ - [File Structure](#file-structure)
31
+ - [Disclaimer](#disclaimer)
32
+
33
+ ---
34
+
35
+ ## Requirements
36
+
37
+ - Ruby `3.2+`
38
+ - RubyGems
39
+
40
+ ---
41
+
42
+ ## Installation
43
+
44
+ Add to your `Gemfile`:
45
+
46
+ ```ruby
47
+ gem "yuurisan"
48
+ ```
49
+
50
+ Then run:
51
+
52
+ ```bash
53
+ bundle install
54
+ ```
55
+
56
+ Or install directly:
57
+
58
+ ```bash
59
+ gem install yuurisan
60
+ ```
61
+
62
+ ---
63
+
64
+ ## Usage
65
+
66
+ Require the gem and call `Yuurisan.banner` at the top of your bot or script:
67
+
68
+ ```ruby
69
+ require "yuurisan"
70
+
71
+ Yuurisan.banner("My Bot Name")
72
+ ```
73
+
74
+ This clears the terminal, prints the ASCII art banner, and sets the terminal tab title all in one call.
75
+
76
+ To set only the terminal title without printing the banner:
77
+
78
+ ```ruby
79
+ Yuurisan.set_title("My Bot Name")
80
+ ```
81
+
82
+ Example output in the terminal:
83
+
84
+ ```
85
+ __ __ _ _
86
+ \ \ / / _ _ _ _ __(_)___ __ _ _ __ __| | ___ ___ _ _
87
+ \ V / | | | | | | '__| / __|/ _` | '_ \ / _` |/ _ \/ __| | | |
88
+ | || |_| | |_| | | | \__ \ (_| | | | | (_| | __/\__ \ |_| |
89
+ |_| \__,_|\__,_|_| |_|___/\__,_|_| |_|\__,_|\___||___/\__,_|
90
+
91
+ Welcome to Yuuri's My Bot Name
92
+ Join our community: https://t.me/Y3YuYuYo
93
+ Current time: 13-08-2026 12:00:00
94
+ ```
95
+
96
+ ---
97
+
98
+ ## API Reference
99
+
100
+ ### `Yuurisan.banner(bot_name)`
101
+
102
+ Clears the terminal, renders the `Yuurisandesu` ASCII art in cyan bold using the standard figlet font via the `artii` gem, then prints the welcome line, community link, and current timestamp. Also sets the terminal tab title.
103
+
104
+ | Parameter | Type | Description |
105
+ |---|---|---|
106
+ | `bot_name` | String | Name of your bot, shown in the welcome line and terminal title |
107
+
108
+ ### `Yuurisan.set_title(bot_name)`
109
+
110
+ Sets the terminal tab title to `<bot_name> by : 佐賀県産 (YUURI)` using an ANSI escape sequence. Works on xterm, iTerm2, GNOME Terminal, and Windows Terminal.
111
+
112
+ | Parameter | Type | Description |
113
+ |---|---|---|
114
+ | `bot_name` | String | Name of your bot, shown in the terminal tab title |
115
+
116
+ ---
117
+
118
+ ## File Structure
119
+
120
+ ```text
121
+ Yuurisan-rb/
122
+ ├── .github/
123
+ │ └── workflows/
124
+ │ └── publish.yml # CI: publish gem to RubyGems on version tag push
125
+ ├── lib/
126
+ │ ├── yuurisan.rb # Main entry point, exposes Yuurisan.banner and Yuurisan.set_title
127
+ │ └── yuurisan/
128
+ │ ├── banner.rb # ASCII art rendering and ANSI color output
129
+ │ ├── title.rb # Terminal tab title setter via ANSI escape
130
+ │ └── version.rb # Gem version constant (1.0.2)
131
+ ├── LICENSE
132
+ └── .gitignore
133
+ ```
134
+
135
+ ---
136
+
137
+ ## Disclaimer
138
+
139
+ This tool is built for educational and technical exploration purposes. Use it wisely and at your own responsibility.
140
+
141
+ ---
142
+
143
+ <div align="center">
144
+ <img width="100%" alt="footer" src="https://capsule-render.vercel.app/api?type=waving&height=120&section=footer"/>
145
+ </div>
@@ -5,23 +5,22 @@ require "artii"
5
5
 
6
6
  module Yuurisan
7
7
  module Banner
8
- # ANSI color codes — matches colorama Fore/Style used in Python version
9
8
  RESET = "\e[0m"
10
9
  BOLD = "\e[1m"
11
- CYAN = "\e[36m" # Fore.CYAN
12
- MAGENTA = "\e[35m" # Fore.MAGENTA
13
- GREEN = "\e[32m" # Fore.GREEN
14
- YELLOW = "\e[33m" # Fore.YELLOW
10
+ CYAN = "\e[36m"
11
+ MAGENTA = "\e[35m"
12
+ GREEN = "\e[32m"
13
+ YELLOW = "\e[33m"
15
14
 
16
15
  def self.show(bot_name)
17
16
  system("cls") || system("clear")
18
17
 
19
- # pyfiglet.figlet_format("Yuurisandesu", font="standard") equivalent
20
18
  ascii_art = Artii::Base.new(font: "standard").asciify("Yuurisandesu").rstrip
21
19
 
22
20
  timestamp = Time.now.strftime("%d-%m-%Y %H:%M:%S")
23
21
 
24
22
  puts "#{CYAN}#{BOLD}#{ascii_art}#{RESET}"
23
+ puts ""
25
24
  puts "#{MAGENTA}#{BOLD}Welcome to Yuuri's #{bot_name}#{RESET}"
26
25
  puts "#{GREEN}#{BOLD}Join our community: https://t.me/Y3YuYuYo#{RESET}"
27
26
  puts "#{YELLOW}#{BOLD}Current time: #{timestamp}#{RESET}"
@@ -1,10 +1,7 @@
1
- # frozen_string_literal: true
2
-
3
1
  module Yuurisan
4
2
  module Title
5
3
  def self.set(bot_name)
6
4
  title = "#{bot_name} by : 佐賀県産 (YUURI)"
7
- # Works on most terminals: xterm, iTerm2, GNOME Terminal, Windows Terminal
8
5
  print "\e]0;#{title}\a"
9
6
  $stdout.flush
10
7
  end
@@ -1,5 +1,3 @@
1
- # frozen_string_literal: true
2
-
3
1
  module Yuurisan
4
- VERSION = "1.0.1"
2
+ VERSION = "1.0.3"
5
3
  end
data/lib/yuurisan.rb CHANGED
@@ -1,19 +1,13 @@
1
- # frozen_string_literal: true
2
-
3
1
  require_relative "yuurisan/version"
4
2
  require_relative "yuurisan/banner"
5
3
  require_relative "yuurisan/title"
6
4
 
7
5
  module Yuurisan
8
- # Sets terminal title and prints the ASCII banner
9
- # Usage: Yuurisan.banner("My Bot")
10
6
  def self.banner(bot_name)
11
7
  set_title(bot_name)
12
8
  Banner.show(bot_name)
13
9
  end
14
10
 
15
- # Only sets the terminal tab title
16
- # Usage: Yuurisan.set_title("My Bot")
17
11
  def self.set_title(bot_name)
18
12
  Title.set(bot_name)
19
13
  end
data/yuurisan.gemspec CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
20
20
  spec.metadata["source_code_uri"] = "https://github.com/Yuurichan-N3/yuurisan-lib"
21
21
 
22
22
  # Include all lib files
23
- spec.files = Dir.glob("lib/**/*.rb") + ["yuurisan.gemspec", "LICENSE"]
23
+ spec.files = Dir.glob("lib/**/*.rb") + ["yuurisan.gemspec", "README.md", "LICENSE"]
24
24
 
25
25
  spec.require_paths = ["lib"]
26
26
 
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.1
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuurisandesu
@@ -32,6 +32,7 @@ extensions: []
32
32
  extra_rdoc_files: []
33
33
  files:
34
34
  - LICENSE
35
+ - README.md
35
36
  - lib/yuurisan.rb
36
37
  - lib/yuurisan/banner.rb
37
38
  - lib/yuurisan/title.rb