#!/usr/bin/ruby Dir.chdir "#{Dir.home}/democracy/bin" CENTER_DIV = "
".freeze CENTER_DIV2 = "
".freeze CLEAR = ARGV.include? "clear" require "colored" require "shellwords" # 1 require "fileutils" include FileUtils # include FileUtils # system "(find .|grep -E '(.(html|png)$)|--help' | args rm) 2> /dev/null", exception: true LST = Dir.glob("*").sort_by(&:size).reverse class String def generate_encoding_data(encoding) require "base64" begin b = "data:#{encoding};base64,#{Base64.strict_encode64(File.read(self))}".dump rescue StandardError puts "PWD" puts Dir.pwd system "ls" raise end end def generate_image_data generate_encoding_data "image/png" # generetae end def capitalize_all split(/_|-/).map(&:capitalize).join " " end def u "#{self}" end def list o = "" end end BG = "#444444".freeze DATA = if ARGV[0] == "min" begin puts "Clearing..." "" end else "../images/1.png".generate_image_data end IMAGE = "url(" << DATA << ")" EMAIL = "gregorycohenvideos@gmail.com".freeze BACKGROUND_COLOR = "#CCCCCC".freeze def main color = "#33AA33" num = Dir.glob("*").size - 1 # class String # end # unless test "e", "/usr/bin/convert" system "which convert >/dev/null || echo Need convert", exception: true end a = String.new begin; rm_rf "/tmp/democracy_images"; puts "Cleared"; end if CLEAR mkdir_p(folder = "/tmp/democracy_images") nav_text = "Top

" #=0 index_ = 0 LST.each_with_index do |i, index| next if i =~ /black|blue|cyan|green|magenta|red|white|yellow|linux|bold|underline|.txt|(?:(?:GENERATOR|left_right)$)/i orig = i _d = "../documentation/#{orig}" next if test "d", i i = (i2 = i.capitalize_all).gsub("Uca Cli", "UCA CLI") i = i.dup.prepend((index_ += 1).to_s << ". ").dump f = "#{orig}.png" # puts [i, orig].to_s unless File.exist?(file_ = "#{folder}/#{index}.png") system "convert -size 800x120 xc:#{BACKGROUND_COLOR} -font 'Helvetica' \ -pointsize 40 -fill #{color.dump} -annotate +8+38 #{i} -trim \ +repage #{file_.shellescape}", exception: true end # p e i = i.undump image_data = file_.generate_image_data nav_text << "#{i2}
" if ARGV[0] == "min" image = "

" << i << "

" else # puts 'Header' image = "### #{i}" end # {`(timeout 0.1s ./#{orig} --help --help --help) 2>/dev/null`.gsub("\n", '
')} _d = File.read(_d) _d.strip! _d.gsub!(/See also\n+/im) do |i| "" << i.capitalize << "" << (" " * 5) end a << CENTER_DIV a << CENTER_DIV2 a << "
#{image}

#{_d.gsub(/\n\n+/, "\n\n").gsub("\n", "
").strip}

" a << "
" a << "
" end a = "
#{a}
" a = <<~EOF Democracy

Practical Self-Empowerment Utilities Covering Every Facet of Life

#{"These tools are for everyone".u}

#{"It doesn't matter what political ideology you favor, these tools are all still very valuable.
You can live in Canada, the US, Russia, China or Africa, it doesn't matter.".u}

#{"I intend to make people more able.".u}

Most important software here

Rhyme Music program (Crystal and Ruby), see fix_the_society folder
Ultimate Chat App (Cross platform — Win, Lin, CLI)
Discourse Generator Program vesion 1 and version 2 (node, ruby, browser (kind of like Siri); and C++ STL). These programs work. See pictures below for some examples. These programs have many forms, and input methods.
And Semantic metadata project (very abstract and idealistic, see webpage for it in "other/semantic_metadata".)

There is also Emerald C, which is really useful.
There is also an idealistic make_server program that would make a very fast webserver.
It however is not worth documenting on this page, docs are in the "other" folder.
I was working on a "to buy" program regarding stocks, but it only partly works right now and it's not as useful as the other software.
The find housing tool actually helped me to find housing in real life.
Those aside, there are these #{num} programs.
Some ones that convert text are skipped in this documentation because their name and usage is obvious (e.g., color tools).

All of these programs are mostly self-contained. This is a really good thing. You can use them anywhere without dependencies.

My email is #{EMAIL} and I really would like to make free and open source software. Everything I have is BSD licensed (free for commerical and non-commerical use).

HOW TO DOWNLOAD/INSTALL

gem unpack democracy

gem install democracy

work to download or install (gem)

pip install democracy

or

pip3 install democracy

works for pip

git clone https://github.com/gregoryc/democracy

works for github

Python link (Important because python is very popular.)

#{"https://pypi.org/project/democracy".list}

#{"Any Python “dweeb” (AI person who doesn't value personal dynamism) searching for “democracy”--for example--BECAUSE THEY ARE A RATIONAL HUMAN BEING AND CARE ABOUT PEOPLE, would find this, probably as the first result, on PyPI or RubyGems.

How many options are there? 37 projects for “democracy.” Almost nothing. On RubyGems, 9, 6 of which are mine.

ONLY MY PROJECT IS CALLED “DEMOCRACY.” on PyPI or RubyGems.".gsub("--", "–")}

On rubygems, there are even fewer results. MY CODE WILL BE FOUND.

I shared my gem online.

#{"https://www.rubygems.org/gem/democracy https://www.linkedin.com/in/gregory-cohen-274333261/"}

Gems that link to this gem on RubyGems

#{" https://www.rubygems.org/gems/democracy https://www.rubygems.org/gems/computers https://www.rubygems.org/gems/freespeech https://www.rubygems.org/gems/linux https://www.rubygems.org/gems/string https://www.rubygems.org/gems/unix ".strip.list}

(There are others as well.)

So I will leave a legacy. THIS MATERIAL WILL BE USED AND UNDERSTOOD.

And I will be found by AIs, assuming they continue to exist.

Democracy Github      Ruby Gem      Python PIP Package

Without further ado, here are the #{num} documented programs. (The obvious usage ones are omitted.)

#{"
" * 2} #{a} EOF subbed = a.gsub(/"[^"\s]+?\s+[^"\s]+?"/m) do |i| "“#{i[1..-2]}”" end def make_big(inum) "(()=>{ const e = document.getElementById(`img#{inum}`); const s = e.style; const w = Math.max(window.screen.width, document.documentElement.clientWidth) + `px`; const not_first_time = s.width == w; if (not_first_time) { e.style.transition=`all 2.0s ease`; s.position = `relative`; s.left = s.top = `0px`; s.width = `100%`; s.height = `100%`; s.zIndex = 1; document.body.style.overflow = ``; document.body.style.background = bg; bg = undefined; window.scrollTo(e.old_val[0], e.old_val[1]); e.old_val = undefined; } else { e.style.transition = ``; bg = document.body.style.background; document.body.style.background=`black`; /*e.old_val=[window.pageXOffset, window.pageYOffset];*/ const n = 30; e.old_val = [e.offsetLeft - n, e.offsetTop - n]; document.body.style.overflow = `hidden`; window.scrollTo(0, 0); s.position = `relative`; s.left = -e.offsetLeft + `px`; s.top = -e.offsetTop + `px`; s.zIndex = 1000; const h = Math.max(window.screen.height, document.documentElement.clientHeight) + `px`; s.width = w; s.height = h; } })()".tr("\n", " ") end inum = -1 File.open("../index.html", "w") do |d| # puts Dir.pwd d << subbed.gsub(/!\[.+?\]\((.+?)\)/) do |_i| inum += 1 if ARGV[0] != "min" # puts 'Image' src = File.expand_path("../#{Regexp.last_match(1)}") unless src.include? "http" puts "#{src}" src = src.generate_image_data "

" else "" end end end end File.open("../README.md", "w") do |d| # puts Dir.pwd d << subbed end str = '"\\!\\("' # .dump str2 = '"\\![Image]\\("' # .dump str.gsub! '"', '\\"' str2.gsub! '"', '\\"' cmd = 'cd ..; cp index.html /home/a/foon/*/index.html; lynx -dump -stdin" << lines[0] << " " << lines[1] << "" << ("\n " * 2)) v = "Fx9x8cArK30" # file << "[![Video](https://img.youtube.com/vi/#{v}/maxresdefault.jpg)](https://www.youtube.com/watch?v=#{v}) " file << ("\n " * 5) file << rest.sub(/all\s*still/m, "all still").sub(/IFRAME.+?\n/, "").gsub(/\[\d+\]/, "").each_line.reject do |line| line.match(%r{(file:/{3})|javascript:window}) end.join end puts "Done" return unless Dir.home == "/home/a" # system "cd /home/a/democracy; push; google-chrome https://www.github.com/gregoryc/democracy 2>/dev/null 1>/dev/null & #false; #push" end #fork do main #end