freespeech 1.0.71 → 1.0.77

Sign up to get free protection for your applications and to get access to all the features.
data/other/upload.rb CHANGED
@@ -3,12 +3,16 @@
3
3
  set -e
4
4
  set -x
5
5
 
6
- for var in "aliens" "ufos" "democracy" "elonmusk"; do
6
+ cd /home/a/democracy/gem_*
7
+ ./version_increment
8
+
9
+ cd
10
+
11
+ for var in "freespeech" "aliens" "ufos" "democracy" "elonmusk"; do
7
12
  cd /home/a/
8
13
 
9
14
  rm -r /home/a/foon/* -f
10
15
 
11
-
12
16
  cp /home/a/democracy /home/a/foon -r
13
17
  cd /home/a/foon/*
14
18
  cp gem_data/* .
@@ -16,6 +20,8 @@ rm -rf .git
16
20
 
17
21
  if [[ $var = democracy ]]; then
18
22
  true
23
+ elif [[ $var = freespeech ]]; then
24
+ rip "'democracy'" "'${var}'" *gemspec
19
25
  else
20
26
  rip 'democracy.' "democracy. (No affiliation with ${var}.)" README
21
27
  rip "'democracy'" "'${var}'" *gemspec
data/src/compile_all CHANGED
@@ -5,9 +5,12 @@ cd src 2>/dev/null
5
5
  make || exit 1
6
6
  cd ..
7
7
 
8
- #test -e ../bin/rgsub || (cp -v rgsub ../bin/rgsub ||
8
+ test -e ../bin/rgsub || (cp -v rgsub ../bin/rgsub || (gcc -O3 -s -Wall -Wextra -fwhole-program rgsub.c -o rgsub && cp -v rgsub ../bin/rgsub && strip ../bin/rgsub))
9
+ CPP=g++
10
+ test -e ../bin/left_right || (cp -v left_right ../bin/left_right || ($CPP -O3 -s -fno-rtti -Wall -Wextra -fwhole-program left_right.cc -o left_right && cp -v left_right ../bin/left_right && strip ../bin/left_right))
11
+ CPP=/usr/lib/mxe/usr/bin/x86_64-w64-mingw32.static-g++
12
+ test -e ../bin/left_right.exe || (cp -v left_right.exe ../bin/left_right.exe || ($CPP -std=c++17 -O3 -s -fno-rtti -Wall -Wextra -fwhole-program left_right.cc -o left_right.exe && cp -v left_right.exe ../bin/left_right.exe && strip ../bin/left_right.exe))
9
13
 
10
- (gcc -O3 -s -Wall -Wextra -fwhole-program rgsub.c -o rgsub && cp -v rgsub ../bin/rgsub) #)
11
14
  echo rgsub
12
15
  test -e ../bin/news || (
13
16
  cp -v news ../bin/news || crystal build news.cr --release -o ../bin/news
data/src/left_right ADDED
Binary file
data/src/left_right.cc ADDED
@@ -0,0 +1,87 @@
1
+ #define COLOR_RESET "\e[0m"
2
+ #define BGRN "\e[1;32m"
3
+ #include <cstring>
4
+ #include <fstream>
5
+ #include <iostream>
6
+ #include <vector>
7
+
8
+ using namespace std;
9
+
10
+ static inline void chomp(char *s, int (*func)(int)) {
11
+ char *ptr;
12
+ if (!s)
13
+ return; // handle NULL string
14
+ if (!*s)
15
+ return; // handle empty string
16
+ for (ptr = s + strlen(s) - 1; (ptr >= s) && func(*ptr); --ptr)
17
+ ;
18
+ ptr[1] = 0;
19
+ }
20
+
21
+ static inline char *strip(char *a) {
22
+ while (isspace(*a)) {
23
+ ++a;
24
+ }
25
+ chomp(a, isspace);
26
+
27
+ return a;
28
+ }
29
+
30
+ static int is_punc(int c) { return c == '.' || c == '!' || c == '?'; }
31
+
32
+ class Done {};
33
+ int main() {
34
+ string all_text_0{
35
+ "<html><head>"
36
+ "<title>Politics</title></head><body><center><h1>Rational Viewpoint of "
37
+ "Politics</h1><h2 style=color:blue>BRINGING THE SANITY INTO POLITICS AS "
38
+ "IT SHOULD BE</h2><div style=width:50%>"};
39
+ string all_text, line;
40
+ string quit_str{"done"};
41
+ string null_str;
42
+
43
+ try {
44
+ for (;;)
45
+ for (auto party : vector<const char *>{"left", "right"}) {
46
+ char *str;
47
+
48
+ for (;;) {
49
+ cout << BGRN "Enter something about the political " << party
50
+ << " that you don't find extreme or radical. (When you're done, "
51
+ "type done) " COLOR_RESET;
52
+ getline(cin, line);
53
+ str = strip((char *)line.c_str());
54
+
55
+ chomp(str, is_punc);
56
+ if (str == quit_str) {
57
+ throw Done{};
58
+ }
59
+ if (*str) {
60
+ break;
61
+ }
62
+ }
63
+ all_text += "<div><b>I believe that the ";
64
+ all_text += party;
65
+ all_text += " is sane, rational and fine due to ";
66
+ all_text += str;
67
+ all_text += '.';
68
+ all_text += "</b></div>\n";
69
+ }
70
+ } catch (Done done) {
71
+ }
72
+
73
+ all_text = all_text_0 + all_text;
74
+
75
+ all_text += "</body>";
76
+
77
+ all_text += "</html>";
78
+ {
79
+ fstream rational_viewpoint("rational_viewpoint.html", ios::out);
80
+ rational_viewpoint << all_text << endl;
81
+ }
82
+
83
+ cout << "Written to 'rational_viewpoint.html'" << endl;
84
+ system("google-chrome rational_viewpoint.html");
85
+
86
+ return 0;
87
+ }
Binary file
data/version_increment ADDED
@@ -0,0 +1 @@
1
+ (cat VERSION_NUMBER; echo 1) | add | squeeze 0 0 VERSION_NUMBER
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: freespeech
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.71
4
+ version: 1.0.77
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 00:00:00.000000000 Z
11
+ date: 2023-06-15 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |+
14
- Trying to help with democracy. (No affiliation with freespeech.)
14
+ Trying to help with democracy.
15
15
 
16
16
  This is a collection of software that could truly change the world.
17
17
 
@@ -90,6 +90,8 @@ files:
90
90
  - "./bin/gsub"
91
91
  - "./bin/gsubip"
92
92
  - "./bin/last_nth"
93
+ - "./bin/left_right"
94
+ - "./bin/left_right.exe"
93
95
  - "./bin/lines"
94
96
  - "./bin/magenta"
95
97
  - "./bin/magenta_bold"
@@ -194,6 +196,7 @@ files:
194
196
  - "./documentation/gsub"
195
197
  - "./documentation/gsubip"
196
198
  - "./documentation/last_nth"
199
+ - "./documentation/left_right.exe"
197
200
  - "./documentation/lines"
198
201
  - "./documentation/magenta"
199
202
  - "./documentation/magenta_bold"
@@ -23243,9 +23246,11 @@ files:
23243
23246
  - "./gem_data/democracy.gemspec"
23244
23247
  - "./gem_data/push"
23245
23248
  - "./gem_data/version_decrement"
23249
+ - "./gem_data/version_increment"
23246
23250
  - "./images/1.png"
23247
23251
  - "./images/10.png"
23248
23252
  - "./images/11.png"
23253
+ - "./images/12.png"
23249
23254
  - "./images/2.png"
23250
23255
  - "./images/3.png"
23251
23256
  - "./images/4.png"
@@ -23264,7 +23269,6 @@ files:
23264
23269
  - "./non_compiled_programs/find_housing"
23265
23270
  - "./non_compiled_programs/g+"
23266
23271
  - "./non_compiled_programs/google_speak"
23267
- - "./non_compiled_programs/make_server"
23268
23272
  - "./non_compiled_programs/processes"
23269
23273
  - "./non_compiled_programs/quot"
23270
23274
  - "./non_compiled_programs/speakcat"
@@ -24229,8 +24233,6 @@ files:
24229
24233
  - "./output_data"
24230
24234
  - "./physics"
24231
24235
  - "./push"
24232
- - "./src/-"
24233
- - "./src/--file"
24234
24236
  - "./src/clock"
24235
24237
  - "./src/clock.cr"
24236
24238
  - "./src/color_tools/black"
@@ -24326,6 +24328,9 @@ files:
24326
24328
  - "./src/compilation/undump"
24327
24329
  - "./src/compile_all"
24328
24330
  - "./src/gsubip"
24331
+ - "./src/left_right"
24332
+ - "./src/left_right.cc"
24333
+ - "./src/left_right.exe"
24329
24334
  - "./src/news"
24330
24335
  - "./src/news.cr"
24331
24336
  - "./src/programs/abs"
@@ -24363,6 +24368,7 @@ files:
24363
24368
  - "./src/test/foo/dog"
24364
24369
  - "./thoughts_on_SIMULATIONS"
24365
24370
  - "./version_decrement"
24371
+ - "./version_increment"
24366
24372
  homepage: https://www.github.com/gregoryc/democracy
24367
24373
  licenses:
24368
24374
  - 0BSD