pipetext 0.1.4 → 0.1.6
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 +4 -4
- data/bin/pipetext +16 -7
- data/lib/pipetext/pipetext.rb +901 -0
- data/lib/{substitute_emoji_names.rb → pipetext/substitute_emoji_names.rb} +1 -0
- data/lib/pipetext/version.rb +9 -0
- data/lib/pipetext.rb +10 -831
- metadata +15 -11
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8ca1788110ca471e3592a78b3f91285af91338551836a6b39addf9f6a4b4049c
|
|
4
|
+
data.tar.gz: db0162ba573ac6498c0356d0f91264998f460aa1b903a79a1d9edccdfd1ce923
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b197769b04cb90d36106524f18d7e8459ad0dd96358a6a7bbc350c3c4572fcd204ff25834f67c730b0676a4e4f3b55462a120367a9e23d5e93e93fd3a8754aba
|
|
7
|
+
data.tar.gz: 27a1232cfb0ad1be0d5d6b641ee633e44846200a1ba69c42f28f997c5cf6b0769923171aee4bb764f9aab6f0a58be973fcb8b3a6d403e06431d053fbcc8eef05
|
data/bin/pipetext
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
|
+
# frozen_string_literal: true
|
|
2
3
|
|
|
3
|
-
#
|
|
4
|
-
require_relative
|
|
4
|
+
# Allow older versions of Ruby to respond to the require_relative method
|
|
5
|
+
if(!Kernel.respond_to?(:require_relative))
|
|
6
|
+
module Kernel
|
|
7
|
+
def require_relative(path)
|
|
8
|
+
require File.join(File.dirname(caller[0]), path.to_str)
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
5
12
|
|
|
6
|
-
|
|
7
|
-
#require 'pipetext'
|
|
13
|
+
require_relative '../lib/pipetext.rb'
|
|
8
14
|
|
|
9
15
|
pipe = Class.new.extend(PipeText)
|
|
10
16
|
|
|
@@ -27,12 +33,14 @@ pipetext_example = '|| pipe |||| && ampersand &&&& Toggle (&) backgrou
|
|
|
27
33
|
|G&rbright green with red background&n |n||G&&r |xCrossed out|x ||x
|
|
28
34
|
|n&nnormal color and background ||n&&n Escape sequence ||\\
|
|
29
35
|
|
|
36
|
+
Center text using current position and line end number ||{text to center}
|
|
30
37
|
Add spaces to line end ||; Set line end ||]#
|
|
31
38
|
Set current x,y cursor position ||[x,y] Terminal bell ||[bell]
|
|
32
39
|
Move cursor up 1 line ||^ Hide cursor ||h
|
|
33
40
|
Move cursor down 1 line ||v Unhide cursor ||H
|
|
34
|
-
Move cursor forward 1 character ||>
|
|
35
|
-
Move cursor back 1 character ||< Sleep timer in
|
|
41
|
+
Move cursor forward 1 character ||> Sleep timer in seconds ||[#s]
|
|
42
|
+
Move cursor back 1 character ||< Sleep timer in milliseconds ||[#ms]
|
|
43
|
+
|
|
36
44
|
|
|
37
45
|
Emojis: https://unicode.org/emoji/charts/full-emoji-list.html
|
|
38
46
|
||[Abbreviated CLDR Short Name] |[smiling face with heart-eyes] ||[smiling face with heart-eyes] or
|
|
@@ -71,11 +79,12 @@ if(ARGV[0] == nil && STDIN.tty? == true)
|
|
|
71
79
|
puts
|
|
72
80
|
puts "pipetext '|-|50-'"
|
|
73
81
|
puts
|
|
74
|
-
puts "pipetext '|]50Insert spaces until end (50)|;Add After'"
|
|
82
|
+
puts "pipetext '|]50Insert spaces until end (50)|W|{centered}|n|;Add After'"
|
|
75
83
|
puts
|
|
76
84
|
puts "pipetext '|10~ &r|----|O> ALL YOUR |kBASE|n |3\\~ARE|3\\~ BELONG TO US. <|----|O&n|\\n~|n'"
|
|
77
85
|
puts
|
|
78
86
|
pipe.paint(pipetext_example)
|
|
87
|
+
pipe.paint("PipeText Version |c#{PipeText::VERSION}|n")
|
|
79
88
|
else
|
|
80
89
|
if(STDIN.tty? == false)
|
|
81
90
|
pipe.paint(STDIN.read)
|