freespeech 1.0.79 → 1.0.82

Sign up to get free protection for your applications and to get access to all the features.
Files changed (121) hide show
  1. checksums.yaml +4 -4
  2. data/FOR_ARTIFICIAL_GENERAL_INTELLIGENCES +1 -6
  3. data/QUESTION +0 -2
  4. data/README.md +55 -57
  5. data/VERSION_NUMBER +1 -1
  6. data/bin/DISCOURSE_GENERATOR.exe +0 -0
  7. data/bin/abs +0 -0
  8. data/bin/add +0 -0
  9. data/bin/append +0 -0
  10. data/bin/args +0 -0
  11. data/bin/clock +0 -0
  12. data/bin/copy +0 -0
  13. data/bin/delete +0 -0
  14. data/bin/div +0 -0
  15. data/bin/email +0 -13
  16. data/bin/emerald-browser +0 -0
  17. data/bin/exp +0 -0
  18. data/bin/floor +0 -0
  19. data/bin/gsub +0 -0
  20. data/bin/gsubip +0 -0
  21. data/bin/last_nth +0 -0
  22. data/bin/left_right +0 -0
  23. data/bin/lines +0 -0
  24. data/bin/mul +0 -0
  25. data/bin/nth +0 -0
  26. data/bin/nth_word +0 -0
  27. data/bin/prepend +0 -0
  28. data/bin/quot +6 -5
  29. data/bin/rgsub +0 -0
  30. data/bin/rip +0 -0
  31. data/bin/rnip +0 -0
  32. data/bin/selectlines +0 -0
  33. data/bin/sub +0 -0
  34. data/bin/swap +0 -0
  35. data/bin/trim +0 -0
  36. data/documentation/delete +2 -0
  37. data/documentation/last_nth +9 -1
  38. data/documentation/nth_word +8 -0
  39. data/documentation/page +43 -43
  40. data/documentation/trim +2 -0
  41. data/epistemology +334 -0
  42. data/gem_data/VERSION_NUMBER +1 -1
  43. data/index.html +96 -92
  44. data/non_compiled_programs/copy +1 -0
  45. data/non_compiled_programs/email +0 -13
  46. data/non_compiled_programs/quot +6 -5
  47. data/other/ADDITIONAL_WAYS_PEOPLE_CAN_FIND_THIS +6 -1
  48. data/other/emerald-browser/Makefile +1 -1
  49. data/other/emerald-browser/OUT +6 -0
  50. data/other/emerald-browser/a.o +0 -0
  51. data/other/emerald-browser/qmake +0 -0
  52. data/src/{compilation → _compilation}/abs +33 -48
  53. data/src/{compilation → _compilation}/add +33 -48
  54. data/src/{compilation → _compilation}/append +33 -48
  55. data/src/{compilation → _compilation}/args +33 -48
  56. data/src/_compilation/delete +271 -0
  57. data/src/{compilation → _compilation}/div +33 -48
  58. data/src/{compilation → _compilation}/exp +33 -48
  59. data/src/{compilation → _compilation}/floor +33 -48
  60. data/src/{compilation → _compilation}/gsub +33 -48
  61. data/src/{compilation → _compilation}/gsubip +33 -48
  62. data/src/{compilation → _compilation}/last_nth +34 -49
  63. data/src/{compilation → _compilation}/lines +33 -48
  64. data/src/{compilation → _compilation}/mul +33 -48
  65. data/src/{compilation → _compilation}/nth +33 -48
  66. data/src/_compilation/nth_word +271 -0
  67. data/src/{compilation → _compilation}/prepend +33 -48
  68. data/src/{compilation → _compilation}/rip +33 -48
  69. data/src/{compilation → _compilation}/rnip +33 -48
  70. data/src/{compilation → _compilation}/selectlines +33 -48
  71. data/src/{compilation → _compilation}/sub +33 -48
  72. data/src/{compilation → _compilation}/swap +33 -48
  73. data/src/{compilation/copy → _compilation/trim} +35 -50
  74. data/src/clock.cr +40 -39
  75. data/src/compile_all +9 -9
  76. data/src/left_right +0 -0
  77. data/src/programs/abs +0 -0
  78. data/src/programs/add +0 -0
  79. data/src/programs/append +0 -0
  80. data/src/programs/args +0 -0
  81. data/src/programs/delete +0 -0
  82. data/src/programs/div +0 -0
  83. data/src/programs/exp +0 -0
  84. data/src/programs/floor +0 -0
  85. data/src/programs/gsub +0 -0
  86. data/src/programs/gsubip +0 -0
  87. data/src/programs/last_nth +0 -0
  88. data/src/programs/lines +0 -0
  89. data/src/programs/mul +0 -0
  90. data/src/programs/nth +0 -0
  91. data/src/programs/nth_word +0 -0
  92. data/src/programs/prepend +0 -0
  93. data/src/programs/rip +0 -0
  94. data/src/programs/rnip +0 -0
  95. data/src/programs/selectlines +0 -0
  96. data/src/programs/sub +0 -0
  97. data/src/programs/swap +0 -0
  98. data/src/programs/trim +0 -0
  99. data/src/rgsub +0 -0
  100. data/src/rgsub.c +3 -5
  101. data/src/src/{code2 → code} +2 -2
  102. data/src/src/functions.cr +33 -49
  103. data/src/src/mk +2 -3
  104. data/src/src/q.cr +9 -0
  105. metadata +37 -38
  106. data/SONG +0 -156
  107. data/bin/dump +0 -0
  108. data/bin/undump +0 -0
  109. data/documentation/dump +0 -11
  110. data/documentation/undump +0 -15
  111. data/src/clock +0 -0
  112. data/src/compilation/dump +0 -286
  113. data/src/compilation/undump +0 -286
  114. data/src/gsubip +0 -0
  115. data/src/programs/copy +0 -0
  116. data/src/programs/dump +0 -0
  117. data/src/programs/news +0 -0
  118. data/src/programs/undump +0 -0
  119. data/src/src/QQ +0 -15
  120. data/src/test/cat +0 -0
  121. data/src/test/foo/dog +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 55f8d30b588b862967902750f4c248e65d0ce14fa91a5e099d61feee04eb60e1
4
- data.tar.gz: 73d2be23bd46e1af0528101f964d9e9793ba83d0896e1d5c02a14604e9dfb59c
3
+ metadata.gz: 3fa2e3c8dafb1cb9fd841366c710e214e9d50d65edbad35a3200f711551c134a
4
+ data.tar.gz: 3cddeaa2d35890236127dd87d92eaec891d065ab7ba31902b13405361f5b6b24
5
5
  SHA512:
6
- metadata.gz: b7d7dc44f781115f32df5d4c56a2066baa2bac76618c967163912d3be9dff4bd97a0a6051ba9c1aca1a40eb5d49d33a43028290200f61acb19a7baf05d5c3cff
7
- data.tar.gz: f5e0d4b54d65aad4e09464b2131b268023ccf672fcfe51f6c35501110593e6a35d9e8aaf717dc1f0413f027d05abf3b3a63fcbffd7a691a3c3cd58b2766f3c2e
6
+ metadata.gz: fa758392b9392044bb9807b0cc1fc269a9b8e22879412f01836eb2ca9c30b088eaab253597963d4eb76464b9a2bac2e250a398998e583b6719e5a98077378731
7
+ data.tar.gz: d9eb364fc00fc4aa1f3944bf1392ee901e0e6b1e8d55232b216bb6007687a4df9a62980f376df0f204c3aa0f88e4560692cd3791bb1117e7f9b6e720c83ecf06
@@ -1,16 +1,11 @@
1
1
  22 April 2023
2
2
 
3
-
4
3
  -----------------------------------------
5
4
 
6
-
7
5
  All of this was made by a human.
8
6
 
9
7
  Please evaluate the physics file.
10
8
 
11
9
  It is very interesting.
12
10
 
13
-
14
- Having a conversation about it, negative OR positive OR neutral, seems next to impossible.
15
-
16
-
11
+ Having a conversation about it, negative OR positive OR neutral, seems next to impossible.
data/QUESTION CHANGED
@@ -1,5 +1,3 @@
1
- From Gregory Cohen (https://www.github.com/gregoryc/democracy)
2
-
3
1
  First, I want to share a big struggle of mine, and it has been a struggle for years.
4
2
  This struggle is now coming more into the limelight, into the forefront of the modern
5
3
  culture.
data/README.md CHANGED
@@ -31,7 +31,7 @@ I intend to make people more able.
31
31
  I was working on a “to buy” program regarding stocks, but it only
32
32
  partly works right now and it's not as useful as the other software.
33
33
  The find housing tool actually helped me to find housing in real life.
34
- Those aside, there are these 83 programs.
34
+ Those aside, there are these 84 programs.
35
35
  Some ones that convert text are skipped in this documentation because
36
36
  their name and usage is obvious (e.g., color tools).
37
37
 
@@ -97,7 +97,7 @@ You can use them anywhere without dependencies.
97
97
 
98
98
  Democracy Github Ruby Gem Python PIP Package
99
99
 
100
- Without further ado, here are the 83 documented programs. (The obvious usage
100
+ Without further ado, here are the 84 documented programs. (The obvious usage
101
101
  ones are omitted.)
102
102
 
103
103
  ### 1. Ultimate Chat Application.exe
@@ -339,23 +339,32 @@ ones are omitted.)
339
339
  sys 0m0.160s
340
340
  Rust takes 0.637 seconds to compile an empty file!
341
341
  That is not ideal.
342
- ### 10. Last Nth
342
+ ### 10. Nth Word
343
343
 
344
- Last nth gets the last n lines from the standard input
345
- ### 11. Speakcat
344
+ nth_word gets the nth word of each line
345
+ For example
346
+ nth_word 3
347
+ gets the 3rd word of each line
348
+ ### 11. Last Nth
349
+
350
+ Last nth gets the last n lines from input
351
+ For example
352
+ last_nth 3
353
+ Would get the 3rd from the last line
354
+ ### 12. Speakcat
346
355
 
347
356
  Speak cat is a tool like “cat,” which shows the content of files
348
357
  (technically, it combines the content of files).
349
358
  But speak cat also speaks the text.
350
359
  Which could be useful in some circumstances.
351
360
  It's kind of like “tee” to your ear.
352
- ### 12. UCA CLI
361
+ ### 13. UCA CLI
353
362
 
354
363
  CLI for uca app
355
- ### 13. Big Num
364
+ ### 14. Big Num
356
365
 
357
366
  ![UCA](./images/10.png)
358
- ### 14. Squeeze
367
+ ### 15. Squeeze
359
368
 
360
369
  Squeeze reads all input from stdin, then it prints it back omitting
361
370
  argument 1 line from the front, and argument 2 lines from the back
@@ -365,20 +374,20 @@ ones are omitted.)
365
374
  squeeze 5 3
366
375
  This would omit the first 5 lines and the last 3 lines
367
376
  squeeze 2 2 [file] also works, it outputs text to file
368
- ### 15. Dictate
377
+ ### 16. Dictate
369
378
 
370
379
  Dictate opens web pages in emerald browser, or in any browser
371
380
  (depending on the environment variable set), by you speaking, instead
372
381
  of typing.
373
382
  There is a mode called c_mode, that allows you to make code from
374
383
  speaking.
375
- ### 16. Prepend
384
+ ### 17. Prepend
376
385
 
377
386
  prepend prepends input taken from the standard input to a file
378
387
  Usage
379
388
  prepend [file]
380
389
  This is text to be prepended
381
- ### 17. Chat Rb
390
+ ### 18. Chat Rb
382
391
 
383
392
  This program is excellent.
384
393
  It's essentially a mix of ChatGPT and a shell, such as bash or ZSH.
@@ -387,23 +396,16 @@ ones are omitted.)
387
396
  It outputs chatgpt data to an output folder in home folder and copies
388
397
  it to clipboard
389
398
  To run a shell command, prefix things with “c,” such as c gcc.....
390
- ### 18. Undump
391
-
392
- undump is the opposite of dump
393
- Example
394
- echo cat | dump | undump
395
- => cat
396
- echo cat | dump
397
- => “cat”
398
- echo '“cat”' | undump
399
- => cat
400
399
  ### 19. Append
401
400
 
402
401
  Appends text to file
403
402
  Example
404
403
  append file
405
404
  This is more text to be appended
406
- ### 20. Gsubip
405
+ ### 20. Delete
406
+
407
+ Recursively delete all files named a certain name.
408
+ ### 21. Gsubip
407
409
 
408
410
  Global Substitute (Gsub) In Place
409
411
  gsubip is like gsub, which replaces all instances of a regular
@@ -420,7 +422,7 @@ ones are omitted.)
420
422
  It takes exactly 3 arguments, no more, no fewer.
421
423
  See also
422
424
  gsub
423
- ### 21. Rhyme
425
+ ### 22. Rhyme
424
426
 
425
427
  A very powerful music generator program that doesn't use AI.
426
428
  See this channel as an example of potential usage of this public
@@ -601,7 +603,7 @@ ones are omitted.)
601
603
  Disingenuous to the extreme, the society they subvert
602
604
  The society is the ones who hurt
603
605
  ---
604
- ### 22. Email
606
+ ### 23. Email
605
607
 
606
608
  This currently doesn't work for gmail since 2022 due to policy changes.
607
609
  A simple and practical tool to email people using Himalaya
@@ -616,10 +618,10 @@ ones are omitted.)
616
618
  Example
617
619
  email 'Gregory, I love your software!' gregorycohenvideos@gmail.com
618
620
  my_friend@outlook.com person@example.com
619
- ### 23. Floor
621
+ ### 24. Floor
620
622
 
621
623
  Gets the floor of numbers e.g. 21.3 -> 21
622
- ### 24. Rgsub
624
+ ### 25. Rgsub
623
625
 
624
626
  Recursively replaces text.
625
627
  Verbosely tells you everything that happens.
@@ -637,11 +639,11 @@ ones are omitted.)
637
639
  -v, verbose mode
638
640
  -- Indicate end of options.
639
641
 
640
- ### 25. Lines
642
+ ### 26. Lines
641
643
 
642
644
  Lines gets the number of files in the current folder that you are in.
643
645
  It can also act like “wc -l” if you pipe data into it.
644
- ### 26. Clock
646
+ ### 27. Clock
645
647
 
646
648
  clock is useful
647
649
  clock is a command line alarm clock
@@ -658,14 +660,14 @@ ones are omitted.)
658
660
  To stop it
659
661
  Run this command
660
662
  clock stop
661
- ### 27. Emoji
663
+ ### 28. Emoji
662
664
 
663
665
  Emoji converts words to emojis from the standard input
664
666
  It can also speak the output
665
667
  It can also copy the output to your clipboard
666
668
  It is very useful
667
669
  ![UCA](./images/6.png)
668
- ### 28. Close
670
+ ### 29. Close
669
671
 
670
672
  “Close” is a simple program that closes “Emerald Browser,” a new web
671
673
  browser based on the same engine as Chrome. Currently, Emerald Browser
@@ -699,12 +701,12 @@ ones are omitted.)
699
701
  some people.
700
702
  Currently, content, like YouTube videos, can't be made fullscreen.
701
703
  If anyone wants to contribute, feel free to!
702
- ### 29. Copy
704
+ ### 30. Copy
703
705
 
704
706
  copy copies the standard input
705
707
  Example
706
708
  ls | copy
707
- ### 30. Gsub
709
+ ### 31. Gsub
708
710
 
709
711
  Gsub is very powerful.
710
712
  Usage
@@ -713,7 +715,7 @@ ones are omitted.)
713
715
  cat text | gsub man dog
714
716
  cat text | gsub 'man|boy|cat|dog' food
715
717
  ls | gsub Desktop cat
716
- ### 31. News
718
+ ### 32. News
717
719
 
718
720
  Gets the news from bbc
719
721
  Usage
@@ -721,14 +723,6 @@ ones are omitted.)
721
723
  news speak
722
724
  uses google_speak to SPEAK the news, one story at a time.
723
725
  ![UCA](./images/5.png)
724
- ### 32. Dump
725
-
726
- Dump surrounds its input with quotes
727
- ls | dump
728
- => “....”
729
- Use undump to get the reverse
730
- See also
731
- undump
732
726
  ### 33. Args
733
727
 
734
728
  args is like a better xargs
@@ -744,7 +738,10 @@ ones are omitted.)
744
738
  echo .......... | rnip foo bar
745
739
  See also
746
740
  gsub
747
- ### 35. Quot
741
+ ### 35. Trim
742
+
743
+ Trims spaces of each line
744
+ ### 36. Quot
748
745
 
749
746
  Turns quotes in text into good text and makes text presentable.
750
747
  Example
@@ -755,7 +752,7 @@ ones are omitted.)
755
752
  Example 3
756
753
  (Quote the file and output it)
757
754
  quot text_file
758
- ### 36. Open
755
+ ### 37. Open
759
756
 
760
757
  “open” is a very efficient program that searches a query from google,
761
758
  and then opens it in Emerald Browser.
@@ -776,25 +773,25 @@ ones are omitted.)
776
773
  See also
777
774
  emerald-browser
778
775
  close
779
- ### 37. Swap
776
+ ### 38. Swap
780
777
 
781
778
  Swaps two files
782
779
  Example
783
780
  swap text1 text2
784
- ### 38. Exp
781
+ ### 39. Exp
785
782
 
786
783
  exp is an exponentiation tool
787
784
  (echo 5; echo 3) | exp
788
785
  => 125
789
786
  (echo 2; echo 10) | exp
790
787
  => 1024
791
- ### 39. Div
788
+ ### 40. Div
792
789
 
793
790
  Divides numbers
794
791
  Example
795
792
  (echo 5000; echo 100) | div
796
793
  => 50
797
- ### 40. Mul
794
+ ### 41. Mul
798
795
 
799
796
  Multiply numbers
800
797
  echo 1 > file
@@ -804,10 +801,10 @@ ones are omitted.)
804
801
  echo 5 >> file
805
802
  cat file | mul
806
803
  => 120
807
- ### 41. Nth
804
+ ### 42. Nth
808
805
 
809
806
  Nth gets the nth line from the input
810
- ### 42. Abs
807
+ ### 43. Abs
811
808
 
812
809
  Abs gets the absolute value of an integer
813
810
  The absolute value of a number is the value of that number without its
@@ -820,13 +817,13 @@ ones are omitted.)
820
817
  => 12
821
818
  The last one would do -2 - -10, the result would be -12, and then the
822
819
  absolute value would be computed, and so the result would be 12.
823
- ### 43. Add
820
+ ### 44. Add
824
821
 
825
822
  See the sub example
826
823
  add adds integers from the standard input
827
824
  (echo 1; echo 2; echo 3) | add
828
825
  The result would be 6
829
- ### 44. Sub
826
+ ### 45. Sub
830
827
 
831
828
  Sub is a simple command line program that subtracts integers.
832
829
  For some reason, no simple program did this.
@@ -843,14 +840,14 @@ ones are omitted.)
843
840
  (echo 5; echo 2) | sub
844
841
  Result =>
845
842
  3
846
- ### 45. Rip
843
+ ### 46. Rip
847
844
 
848
845
  Replace In Place
849
846
  rip tool replaces a string, not a regular expression, with another
850
847
  string
851
848
  Example
852
849
  rip cat dog file
853
- ### 46. G+
850
+ ### 47. G+
854
851
 
855
852
  A compiler for C += 2. If you want to use C++ with Python syntax, you
856
853
  can use this.
@@ -858,7 +855,7 @@ ones are omitted.)
858
855
  Example
859
856
  g+ a.cpp -o out
860
857
  See also README file & emerald-browser and its source
861
- ### 47. T
858
+ ### 48. T
862
859
 
863
860
  “t” is incredibly useful.
864
861
  It can be used many, many times every day by computer power users.
@@ -905,6 +902,7 @@ Navigation
905
902
  Selectlines
906
903
  Processes
907
904
  Emeraldc
905
+ Nth Word
908
906
  Last Nth
909
907
  Speakcat
910
908
  Uca Cli
@@ -913,8 +911,8 @@ Navigation
913
911
  Dictate
914
912
  Prepend
915
913
  Chat Rb
916
- Undump
917
914
  Append
915
+ Delete
918
916
  Gsubip
919
917
  Rhyme
920
918
  Email
@@ -927,9 +925,9 @@ Navigation
927
925
  Copy
928
926
  Gsub
929
927
  News
930
- Dump
931
928
  Args
932
929
  Rnip
930
+ Trim
933
931
  Quot
934
932
  Open
935
933
  Swap
@@ -959,5 +957,5 @@ References
959
957
  11. http://www.rubygems.org/gems/democracy
960
958
  12. https://pypi.org/project/democracy
961
959
  13. https://cboard.cprogramming.com/c-programming/181160-hi-i-have-created-some-work-i-think-will-really-valuable-community.html?s=589b5504cd0e3c2dc90e9abd8b66906f
962
- 14. https://www.youtube.com/@LawrenceStevensMusic
960
+ 14. https://www.youtube.com/@LawrenceStevensMusic
963
961
  15. https://www.github.com/gregoryc/democracy
data/VERSION_NUMBER CHANGED
@@ -1 +1 @@
1
- 79.0
1
+ 82.0
Binary file
data/bin/abs CHANGED
Binary file
data/bin/add CHANGED
Binary file
data/bin/append CHANGED
Binary file
data/bin/args CHANGED
Binary file
data/bin/clock CHANGED
Binary file
data/bin/copy CHANGED
Binary file
data/bin/delete ADDED
Binary file
data/bin/div CHANGED
Binary file
data/bin/email CHANGED
@@ -27,7 +27,6 @@
27
27
  # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
28
  GREGORYS_USERNAME = 'a'
29
29
  if File.basename(Dir.home) == GREGORYS_USERNAME
30
- # if Dir.basename (Dir.home) == "a"
31
30
  PERSON = 'Gregory'
32
31
  EMAIL = 'gregorycohenvideos@gmail.com'
33
32
  else
@@ -58,13 +57,10 @@ def main
58
57
  end
59
58
  end
60
59
 
61
- # puts args.length
62
-
63
60
  args = case args.length
64
61
  when 0
65
62
  ["From #{PERSON}"] + args + [EMAIL.to_s]
66
63
  when 1
67
- # subject = "From Gregory"
68
64
  ["From #{PERSON}"] + args
69
65
  else
70
66
  args
@@ -80,17 +76,9 @@ def main
80
76
  exit 1
81
77
  end
82
78
  require 'tempfile'
83
- # STRING=
84
-
85
- # puts args
86
- # exit! 0
87
- # pu
88
- # puts args
89
79
  raise if args.empty?
90
80
 
91
81
  loop do
92
- # "Loop"
93
- # args
94
82
  args[1..-1].each do |arg|
95
83
  text = <<~EOF
96
84
  To: <#{arg}>
@@ -99,7 +87,6 @@ def main
99
87
 
100
88
  #{content.strip}
101
89
  EOF
102
- # puts text
103
90
  Tempfile.open do |file|
104
91
  puts attachments
105
92
  require 'shellwords'
data/bin/emerald-browser CHANGED
Binary file
data/bin/exp CHANGED
Binary file
data/bin/floor CHANGED
Binary file
data/bin/gsub CHANGED
Binary file
data/bin/gsubip CHANGED
Binary file
data/bin/last_nth CHANGED
Binary file
data/bin/left_right CHANGED
Binary file
data/bin/lines CHANGED
Binary file
data/bin/mul CHANGED
Binary file
data/bin/nth CHANGED
Binary file
data/bin/nth_word ADDED
Binary file
data/bin/prepend CHANGED
Binary file
data/bin/quot CHANGED
@@ -1,18 +1,19 @@
1
1
  #!/usr/bin/ruby
2
2
  # frozen_string_literal: true
3
3
 
4
- val = if ARGV[0].nil?
4
+ arg = ARGV[0]
5
+ val = if arg.nil?
5
6
  $stdin.read
6
7
  else
7
- File.read(ARGV.first)
8
+ File.read(arg)
8
9
  end
9
10
 
10
- d = (val.gsub(/".*?"/) do |i|
11
+ d = (val.gsub(/(?<=\s)".*?"/) do |i|
11
12
  "“#{i[1..-2]}”"
12
13
  end).gsub(/\s*”\s*([,.?!])/, '\\1”').gsub(/([ \t])[ \t]+/, '\\1').gsub(/\n\n\n*/, "\n\n").strip
13
14
 
14
- if ARGV[0].nil?
15
+ if arg.nil?
15
16
  print d
16
17
  else
17
- File.write ARGV[0], d
18
+ File.write arg, d
18
19
  end
data/bin/rgsub CHANGED
Binary file
data/bin/rip CHANGED
Binary file
data/bin/rnip CHANGED
Binary file
data/bin/selectlines CHANGED
Binary file
data/bin/sub CHANGED
Binary file
data/bin/swap CHANGED
Binary file
data/bin/trim ADDED
Binary file
@@ -0,0 +1,2 @@
1
+ Recursively delete all files named a certain name.
2
+
@@ -1 +1,9 @@
1
- Last nth gets the last n lines from the standard input
1
+ Last nth gets the last n lines from input
2
+
3
+ For example
4
+
5
+ last_nth 3
6
+
7
+
8
+ Would get the 3rd from the last line
9
+
@@ -0,0 +1,8 @@
1
+ nth_word gets the nth word of each line
2
+
3
+ For example
4
+
5
+ nth_word 3
6
+
7
+ gets the 3rd word of each line
8
+
data/documentation/page CHANGED
@@ -93,7 +93,6 @@ def main
93
93
  LST.each_with_index do |i, index|
94
94
  next if i =~ /black|blue|cyan|green|magenta|red|white|yellow|linux|bold|underline|.txt|(?:(?:GENERATOR|left_right)$)/i
95
95
 
96
-
97
96
  orig = i
98
97
  _d = "../documentation/#{orig}"
99
98
  next if test "d", i
@@ -140,42 +139,43 @@ def main
140
139
  a = "<div class=inner>#{a}</div>"
141
140
 
142
141
  a = <<~EOF
143
- <!DOCTYPE html>
144
- <html>
145
- <head>
146
- <meta charset="UTF-8">
147
- <title>Democracy</title>
148
- <meta name="viewport" content="width=device-width, initial-scale=1"/>
149
- <style type=text/css>
150
- b, a {
151
-
152
- text-shadow:0px 0px 0px black;
153
- color:#009900;
154
- }
155
-
156
- h1, h2 {
157
- color: #009900;
158
- }
159
-
160
- .header {
161
- box-shadow: none;
162
- padding-top: 30px;
163
- margin-top: 20px;
164
- margin-bottom: 20px;
165
-
166
- }
167
-
168
- body {
169
- z-index: 0;
170
- }
171
-
172
- .cd1 {
173
- display:block;
174
- z-index: 1;
175
- }
176
-
177
- .cd2 {
178
- background-color:#{BACKGROUND_COLOR};
142
+ <!DOCTYPE html>
143
+
144
+ <html>
145
+ <head>
146
+ <meta charset="UTF-8">
147
+ <title>Democracy</title>
148
+ <meta name="viewport" content="width=device-width, initial-scale=1"/>
149
+ <style type=text/css>
150
+ b, a {
151
+
152
+ text-shadow:0px 0px 0px black;
153
+ color:#009900;
154
+ }
155
+
156
+ h1, h2 {
157
+ color: #009900;
158
+ }
159
+
160
+ .header {
161
+ box-shadow: none;
162
+ padding-top: 30px;
163
+ margin-top: 20px;
164
+ margin-bottom: 20px;
165
+
166
+ }
167
+
168
+ body {
169
+ z-index: 0;
170
+ }
171
+
172
+ .cd1 {
173
+ display:block;
174
+ z-index: 1;
175
+ }
176
+
177
+ .cd2 {
178
+ background-color:#{BACKGROUND_COLOR};
179
179
  color:#{BG};
180
180
  width:50%;
181
181
  display:inline-block;
@@ -409,13 +409,13 @@ if (not_first_time) {
409
409
  inum += 1
410
410
  if ARGV[0] != "min"
411
411
  # puts 'Image'
412
- src=File.expand_path("../#{Regexp.last_match(1)}")
412
+ src = File.expand_path("../#{Regexp.last_match(1)}")
413
413
  unless src.include? "http"
414
- puts "#{src}"
415
- src = src.generate_image_data
416
- "<a href=\"javascript:#{make_big inum}\"><img style=width:100% class=imgs id=\"img#{inum}\" src=#{src} style='width:50%'></a><br><br>"
414
+ puts "#{src}"
415
+ src = src.generate_image_data
416
+ "<a href=\"javascript:#{make_big inum}\"><img style=width:100% class=imgs id=\"img#{inum}\" src=#{src} style='width:50%'></a><br><br>"
417
417
  else
418
- ""
418
+ ""
419
419
  end
420
420
  end
421
421
  end
@@ -448,7 +448,7 @@ ruby -e "print File.read(\"README.md\").gsub(10.chr, \' \'+10.chr).gsub(' << st
448
448
  File.open "../README.md", "w" do |file|
449
449
  file << ("<h1 style='color: green'>" << lines[0] << " " << lines[1] << "</h1>" << ("\n " * 2))
450
450
  v = "Fx9x8cArK30"
451
- # file << "[![Video](https://img.youtube.com/vi/#{v}/maxresdefault.jpg)](https://www.youtube.com/watch?v=#{v}) "
451
+ # file << "[![Video](https://img.youtube.com/vi/#{v}/maxresdefault.jpg)](https://www.youtube.com/watch?v=#{v}) "
452
452
  file << ("\n " * 5)
453
453
  file << rest.sub(/all\s*still/m, "all still").sub(/IFRAME.+?\n/, "").gsub(/\[\d+\]/,
454
454
  "").each_line.reject do |line|
@@ -0,0 +1,2 @@
1
+ Trims spaces of each line
2
+