freespeech 1.0.87 → 1.0.91
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/README +2 -0
- data/README.md +55 -36
- data/VERSION_NUMBER +1 -1
- data/bin/ctit +44 -0
- data/documentation/ctit +7 -0
- data/documentation/page +6 -0
- data/gem_data/README +2 -0
- data/gem_data/VERSION_NUMBER +1 -1
- data/images/STORE.png +0 -0
- data/images/STORE2.png +0 -0
- data/index.html +62 -53
- data/non_compiled_programs/ctit +44 -0
- data/other/beautify_html_in_heredocs +8 -0
- data/other/communicate +88 -0
- metadata +10 -2
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
#!/usr/bin/ruby
|
|
2
|
+
# This is a work in progress.
|
|
3
|
+
|
|
4
|
+
ROMAN = /^([limcdvx]|[[:punct:]])+$/i
|
|
5
|
+
|
|
6
|
+
def capitalize(a)
|
|
7
|
+
a = a.gsub(/\s*(-|–|—|:)(-|–|—|:)*\s*/, "\\1 ")
|
|
8
|
+
w = a.split
|
|
9
|
+
not_major = /^(?:to|a|an|the|on|in|of|at|and|or|but|nor|for|yet|so)$/i
|
|
10
|
+
w = w.map do |i|
|
|
11
|
+
case i
|
|
12
|
+
when ROMAN
|
|
13
|
+
i.upcase
|
|
14
|
+
when /^(?:not|no|be|is|are|was|were|have|has|had|do|does|did|that|it|my|me|we|our|you|he|his|she|her|they|them|who)$/i
|
|
15
|
+
i.capitalize
|
|
16
|
+
when /(-|–|—|:)/
|
|
17
|
+
i.capitalize
|
|
18
|
+
when not_major
|
|
19
|
+
i.downcase
|
|
20
|
+
else
|
|
21
|
+
i.capitalize
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
w = w.to_a
|
|
25
|
+
if w.size == 0
|
|
26
|
+
w = [" "]
|
|
27
|
+
end
|
|
28
|
+
if w[0].match(ROMAN)
|
|
29
|
+
w[0] = w[0].upcase
|
|
30
|
+
else
|
|
31
|
+
w[0] = w[0].capitalize
|
|
32
|
+
end
|
|
33
|
+
if (w[-1].match(ROMAN))
|
|
34
|
+
w[-1] = w[-1].upcase
|
|
35
|
+
else
|
|
36
|
+
w[-1] = w[-1].capitalize
|
|
37
|
+
end
|
|
38
|
+
w = w.join(" ")
|
|
39
|
+
w = w.gsub "- ", "-"
|
|
40
|
+
w
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
print (capitalize ARGV.join(" "))
|
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
# frozen_string_literal: true
|
|
3
3
|
|
|
4
4
|
PROG1 = %w[htmlbeautifier clang-format][1]
|
|
5
|
+
puts PROG1
|
|
6
|
+
print "OK ? "
|
|
7
|
+
response = ""
|
|
8
|
+
response = STDIN.readline.strip while response.empty?
|
|
9
|
+
if response.match /[nN]/
|
|
10
|
+
abort
|
|
11
|
+
end
|
|
12
|
+
|
|
5
13
|
PROG2 = "rufo"
|
|
6
14
|
|
|
7
15
|
require "tempfile"
|
data/other/communicate
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# frozen_string_literal: false
|
|
3
|
+
|
|
4
|
+
# BSD 2-Clause License
|
|
5
|
+
#
|
|
6
|
+
# Copyright (c) 2023, Gregory Cohen
|
|
7
|
+
# All rights reserved.
|
|
8
|
+
#
|
|
9
|
+
# Redistribution and use in source and binary forms, with or without
|
|
10
|
+
# modification, are permitted provided that the following conditions are met:
|
|
11
|
+
#
|
|
12
|
+
# 1. Redistributions of source code must retain the above copyright notice, this
|
|
13
|
+
# list of conditions and the following disclaimer.
|
|
14
|
+
#
|
|
15
|
+
# 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
16
|
+
# this list of conditions and the following disclaimer in the documentation
|
|
17
|
+
# and/or other materials provided with the distribution.
|
|
18
|
+
#
|
|
19
|
+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
20
|
+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
21
|
+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
22
|
+
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
23
|
+
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
24
|
+
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
25
|
+
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
26
|
+
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
27
|
+
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
28
|
+
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
29
|
+
require 'colored'
|
|
30
|
+
|
|
31
|
+
str = 'Enter '
|
|
32
|
+
|
|
33
|
+
$old_str = ''
|
|
34
|
+
def puts__(str, ack = false)
|
|
35
|
+
# def puts.old_str
|
|
36
|
+
return unless ENV['C_CODE'].nil?
|
|
37
|
+
# if ENV["C_CODE
|
|
38
|
+
# if
|
|
39
|
+
# requi
|
|
40
|
+
return if $old_str == str
|
|
41
|
+
|
|
42
|
+
str = str.to_s
|
|
43
|
+
def str.colorify
|
|
44
|
+
bold.send ''.colors.sample
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def str.ack
|
|
48
|
+
['Thank you. '][0]
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
str.prepend str.ack if ack == true
|
|
52
|
+
print "#{str.colorify}\n"
|
|
53
|
+
|
|
54
|
+
system "echo '#{str}' | flite -voice slt "
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
alias :say puts__
|
|
58
|
+
|
|
59
|
+
count = 0
|
|
60
|
+
# speak str
|
|
61
|
+
|
|
62
|
+
def $stdin.readline
|
|
63
|
+
Dir.chdir Dir.home
|
|
64
|
+
Dir.chdir 'nerd-dictation'
|
|
65
|
+
res = ''
|
|
66
|
+
while res.strip == ''
|
|
67
|
+
res = %x(
|
|
68
|
+
./nerd-dictation begin --vosk-model-dir=`printf "%s\n" ./vosk-model-small-en-us* | head -n 1` --timeout 1.0 2>&1 --output STDOUT)
|
|
69
|
+
|
|
70
|
+
res = '' if res.downcase.include?('no text')
|
|
71
|
+
# STDOUT.print res
|
|
72
|
+
end
|
|
73
|
+
res
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
loop do
|
|
77
|
+
puts__ ARGV[0], ack = false
|
|
78
|
+
$text = $stdin.readline
|
|
79
|
+
|
|
80
|
+
class Object
|
|
81
|
+
def eval(*_args)
|
|
82
|
+
text = $text
|
|
83
|
+
Kernel.eval to_s
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
ARGV[1..-1].map(&:eval)
|
|
88
|
+
end
|
metadata
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: freespeech
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.91
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Gregory Cohen
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-06-
|
|
11
|
+
date: 2023-06-18 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: |+
|
|
14
14
|
Trying to help with democracy.
|
|
15
15
|
|
|
16
|
+
https://snapcraft.io/democracy
|
|
17
|
+
|
|
16
18
|
This is a collection of software that could truly change the world.
|
|
17
19
|
|
|
18
20
|
All of these programs are mostly self-contained. This is a really good thing.
|
|
@@ -69,6 +71,7 @@ files:
|
|
|
69
71
|
- "./bin/clock"
|
|
70
72
|
- "./bin/close"
|
|
71
73
|
- "./bin/copy"
|
|
74
|
+
- "./bin/ctit"
|
|
72
75
|
- "./bin/cyan"
|
|
73
76
|
- "./bin/cyan_bold"
|
|
74
77
|
- "./bin/cyan_bold_underline"
|
|
@@ -176,6 +179,7 @@ files:
|
|
|
176
179
|
- "./documentation/clock"
|
|
177
180
|
- "./documentation/close"
|
|
178
181
|
- "./documentation/copy"
|
|
182
|
+
- "./documentation/ctit"
|
|
179
183
|
- "./documentation/cyan"
|
|
180
184
|
- "./documentation/cyan_bold"
|
|
181
185
|
- "./documentation/cyan_bold_underline"
|
|
@@ -23265,12 +23269,15 @@ files:
|
|
|
23265
23269
|
- "./images/7.png"
|
|
23266
23270
|
- "./images/8.png"
|
|
23267
23271
|
- "./images/9.png"
|
|
23272
|
+
- "./images/STORE.png"
|
|
23273
|
+
- "./images/STORE2.png"
|
|
23268
23274
|
- "./index.html"
|
|
23269
23275
|
- "./install.sh"
|
|
23270
23276
|
- "./non_compiled_programs/big_num"
|
|
23271
23277
|
- "./non_compiled_programs/chat_rb"
|
|
23272
23278
|
- "./non_compiled_programs/close"
|
|
23273
23279
|
- "./non_compiled_programs/copy"
|
|
23280
|
+
- "./non_compiled_programs/ctit"
|
|
23274
23281
|
- "./non_compiled_programs/dictate"
|
|
23275
23282
|
- "./non_compiled_programs/email"
|
|
23276
23283
|
- "./non_compiled_programs/emoji"
|
|
@@ -23291,6 +23298,7 @@ files:
|
|
|
23291
23298
|
- "./other/best_programming_language/example.c"
|
|
23292
23299
|
- "./other/best_programming_language/out_0.c"
|
|
23293
23300
|
- "./other/cleanup"
|
|
23301
|
+
- "./other/communicate"
|
|
23294
23302
|
- "./other/democracy.gemspec"
|
|
23295
23303
|
- "./other/discourse_generator_desktop_widget/.qmake.stash"
|
|
23296
23304
|
- "./other/discourse_generator_desktop_widget/a.cpp"
|