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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6fc9491b4fce47f35c9169cada5aa9f17c64c230f1e8d82946ac1fa7f8f448a7
4
- data.tar.gz: b064d18f993760700a51d4dfb1edc47439ceec32506c4dca9207ab5f23e714d4
3
+ metadata.gz: 8ca1788110ca471e3592a78b3f91285af91338551836a6b39addf9f6a4b4049c
4
+ data.tar.gz: db0162ba573ac6498c0356d0f91264998f460aa1b903a79a1d9edccdfd1ce923
5
5
  SHA512:
6
- metadata.gz: d4e9bbb7c99ad5a004a75e5c5f256ccbdd3d15ab2b7679b7760fcc2ffa4800fa569d7c2ca08d4ab06645225254c5313e711cee9cfd8f4c6a2a4e9732d325d834
7
- data.tar.gz: 2fa9b749fa9cefb19979d88b86d2c1372bb5671d81fbbda5a26d3ee2d864153c6410ae1e49bf836c493d0ca87f8ed6cf2b068c61ea516fe65e5c4028dbfe462b
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
- # Use local file
4
- require_relative '../lib/pipetext'
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
- # Use gem install
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 float seconds ||[#.#z]
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)