artsy 0.3.1 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/artsy.rb +4 -0
- data/lib/artsy/colour.rb +29 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: efb06e8dcaa16d78fd779f2c875721b2e14dd8cb1df13386173c1d0a754147e7
|
4
|
+
data.tar.gz: 2cb275e3f3040e436e1d4c002e3a275c3aef8266c81bf5d5c37dab477624e435
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5de59059c5daaf5648e240dfda3e58eda0bff02363333f77f49b840bfe2f0af278f0cf305f5e0aebc3d9472b773c7f79f2c3460714c96e538101b00611516a1
|
7
|
+
data.tar.gz: 4acb92f51402f01e23160303ce5646ecde15f8b8f66d0c7e1a3bc6689b2b1609890aaa4db62541f0d30058ea23ee6cf4772d80535826d5f2c1b500136bf6cae9
|
data/lib/artsy.rb
CHANGED
@@ -4,6 +4,9 @@
|
|
4
4
|
### Make your Ruby terminal programs look nice! ###
|
5
5
|
### Developed by Brett (https://github.com/notronaldmcdonald) ###
|
6
6
|
#################################################################
|
7
|
+
### Licensed under the GNU LGPLv3 license. See the LICENSE in ###
|
8
|
+
### the project root for more information. ###
|
9
|
+
#################################################################
|
7
10
|
|
8
11
|
class Artsy
|
9
12
|
# main class
|
@@ -124,3 +127,4 @@ end
|
|
124
127
|
|
125
128
|
# load any other gem components
|
126
129
|
require 'artsy/menu'
|
130
|
+
require 'artsy/colour'
|
data/lib/artsy/colour.rb
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#########################################################################
|
2
|
+
### colour.rb ###
|
3
|
+
#########################################################################
|
4
|
+
### Provides a way for users to define their own custom colour values ###
|
5
|
+
### Developed by Brett (https://github.com/notronaldmcdonald) ###
|
6
|
+
#########################################################################
|
7
|
+
require 'json' # needs json rubygem for loading schemes
|
8
|
+
|
9
|
+
class Color
|
10
|
+
# class containing all colour manipulation functions, and variables
|
11
|
+
class Schemes
|
12
|
+
# colour schemes. namespaced under Color.
|
13
|
+
# these are essentially the same functions as above, but storing multiple colours in the hash
|
14
|
+
def initialize(filepath = "None")
|
15
|
+
# create a new colour scheme
|
16
|
+
@scheme = Hash.new
|
17
|
+
end
|
18
|
+
|
19
|
+
def setSColor(name, r, g, b)
|
20
|
+
# set scheme colour
|
21
|
+
@scheme["#{name}"] = "\033[38;2;#{r};#{g};#{b}m"
|
22
|
+
end
|
23
|
+
|
24
|
+
def out(text, colour)
|
25
|
+
# print using a scheme colour
|
26
|
+
puts "#{@scheme[colour]}#{text}\033[0m"
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: artsy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brett
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-05-
|
11
|
+
date: 2021-05-18 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Enables you to make good looking terminal programs with colors and text
|
14
14
|
formatting.
|
@@ -18,11 +18,12 @@ extensions: []
|
|
18
18
|
extra_rdoc_files: []
|
19
19
|
files:
|
20
20
|
- lib/artsy.rb
|
21
|
+
- lib/artsy/colour.rb
|
21
22
|
- lib/artsy/devel/handler.rb
|
22
23
|
- lib/artsy/menu.rb
|
23
24
|
homepage: https://github.com/notronaldmcdonald/artsy
|
24
25
|
licenses:
|
25
|
-
-
|
26
|
+
- LGPL-3.0
|
26
27
|
metadata: {}
|
27
28
|
post_install_message:
|
28
29
|
rdoc_options: []
|