Project

linux

0.0
The project is in a healthy, maintained state
https://github.com/gregoryc/democracy
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

Practical Self-Empowerment Utilities Covering Every Facet of Life

Video

These tools are for everyone

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.

I intend to make people more able.

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 90 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 gregorycohen2@gmail.com 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). My PayPal is
gregorycohen2@gmail.com. Please consider donating.

HOW TO DOWNLOAD/INSTALL

IFRAME: https://snapcraft.io/democracy/embedded?button=black

With snap ( https://snapcraft.io/democracy)

sudo snap install democracy or snap install democracy

Binaries then would be in /snap/democracy/current/bin, source code is
in /snap/democracy

With gem command (RubyGems) (preinstalled on Mac)

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

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.

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

I shared my gem online.
* https://www.rubygems.org/gem/democracy
* https://twitter.com/democracygem
* 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

(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 90 documented programs. (The obvious usage
ones are omitted.)

1. Ultimate Chat Application.exe

UCA
There is so much potential with this program.
This is a non-AI chatbot. It's not based on generative AI or AI of any
sort.
It is self-explanatory, it tries to give a better answer.
Still a work in progress.
Source code is in PP.rb
Generates a hyper optimized C program that is able to respond to
prompts locally as fast as theoretically possible using switch
statements
See also
Chat Rb

2. Discourse Generator.exe

See the “web library” folder (discourse_generator_web_library). Code in
there. BSD LICENSED.
IDEA
The use of Javascript (and possible Ruby) to create a Javascript
library (and perhaps a Chrome extension and perhaps a command line tool
and perhaps a GTK or QT program) that helps people (by using textboxes
or command line prompts) to create high quality communications, would
be wonderful.
Think of how poor quality responses to communications can be.
If someone created one or more tools that could be easily added on web
pages, that would augment someone's life to help create goal and value
oriented responses (or original communications), then there is
literally nothing that couldn't solve.
This might be the most useful library ever created. There could be a
tool that would help with democracy.
Human being + augmentive tool = civil discourse, eventually resulting
in liberty.
This would enable democracy to work. Imagine if 50% of all websites
used this library.
This would help people to be goal or value oriented, and not be coming
up with terrible communications that, for example, insult people's
mothers or education.
Alt
Alt
This is a very, very large philosophical subject.
No one person has a monopoly on it.
To use some metaphors...
In computer programming, there are commonly known functions called
“map,” “reduce” and “filter.”
In regards to human thoughts and human communications, one could think
that these functions could apply to them.
One could say that Old Twitter was a “reduce function”— it tooks
people's thoughts, and reduced the size of the set or the list, it
compacted them to 140 characters or less.
This, of course, is terrible.
Thankfully modern Twitter can use 4000 characters.
There are many “filter” functions used in modern social media, if you
will. There is content censorship.
WHAT SHOULD EXIST IS A MAP FUNCTION. A CONSTRUCTIVE MAP FUNCTION.
ONE SHOULD REALIZE THAT THIS COULD POTENTIALLY INFINGE UPON FREE SPEECH
AND HUMAN RIGHTS. ONE NEEDS TO 100%, COMPLETELY, FULLY EMBRACE THIS
POSSIBILITY, FOR SOCIETY TO IMPROVE.
THERE HAS BEEN NO “MAP” FUNCTION.
THERE HAS BEEN NO FUNCTION TO POSITIVELY TRANSFORM TEXT.
THAT IS WHAT THIS IS AND THAT IS WHAT THIS IDEA IS.
THIS IS VERY NECESSARY.
VERY NECESSARY.

3. Emerald Browser

A powerful web browser, see “other” folder.

4. Left Right.exe

This is a tool to bring sanity to politics.
UCA
It asks for viewpints from a person that see the good things in each
political side—left, right, left, right, etc.
It then makes a webpage of that and presents all of that.
Hopefully this can make people more sane, and less hyper-partisan.

5. Prepend Each

Prepends a string to each line

6. Google Speak

Google speak is really useful. It speaks a statement using the Google
Translate voice, which is probably the most authoritative and
high-quality text-to-speech voice that exists.
It's kind of like “espeak” or similar tools, but it is much better.
You need an internet connection for it to work.
It is probably limited at 100 characters.

7. Find Housing

This is a nice tool to find housing with.
It is a nice, simple command line tool. You enter the minimum and
maximum prices, and Kijiji opens with your options.
This tool kind of actually helped me to find housing in real life.

8. Selectlines

selectlines shows all nonblank lines from the input
Example
cat file | selectlines
(echo 2; echo; echo; echo) | selectlines
=> 2
The result would be 2, with no blank lines after that

9. Autocorrect

Command line offline non-AI free software BSD licensed autocorrect
using words file.
Work in progress.

10. Append Each

Appends a string to each line

11. Processes

Processes lists all processes with a certain name
For example
processes sh
processes bash
processes ruby
processes gsub

12. Gen Video

Generates a video from command line arguments.
Arguments
Usage:
outputfile duration-seconds width height song-to-play image-folder fps
Optional -s to state the start time of the song.
Example ./gen_video -s 30 file.mp4 60 1920 1080 ./mp3.mp3 ./images 30

13. Speakcat

Speak cat is a tool like “cat,” which shows the content of files
(technically, it combines the content of files).
But speak cat also speaks the text.
Which could be useful in some circumstances.
It's kind of like “tee” to your ear.

14. Speak Cb

speak_cb speaks the selection of the X11 clipboard over and over.
Similar to google_speak
Very good to focus.

15. Nth Word

nth_word gets the nth word of each line
For example
nth_word 3
gets the 3rd word of each line

16. Last Nth

Last nth gets the last n lines from input
For example
last_nth 3
Would get the 3rd from the last line

17. Emeraldc

The Ultimate C Preprocessor

18. Squeeze

Squeeze reads all input from stdin, then it prints it back omitting
argument 1 line from the front, and argument 2 lines from the back
Example
squeeze 1 1
This would omit the first line and the last line
squeeze 5 3
This would omit the first 5 lines and the last 3 lines
squeeze 2 2 [file] also works, it outputs text to file

19. Prepend

prepend prepends input taken from the standard input to a file
Usage
prepend [file]
This is text to be prepended

20. Dictate

Dictate opens web pages in emerald browser, or in any browser
(depending on the environment variable set), by you speaking, instead
of typing.
There is a mode called c_mode, that allows you to make code from
speaking.

21. Chat Rb

This program is excellent.
It's essentially a mix of ChatGPT and a shell, such as bash or ZSH.
It has a bunch of features.
It can display a file or change to a folder just by mentioning it.
It outputs chatgpt data to an output folder in home folder and copies
it to clipboard
To run a shell command, prefix things with “c,” such as c gcc.....

22. Big Num

UCA

23. UCA CLI

CLI for uca app

24. Gsubip

Global Substitute (Gsub) In Place
gsubip is like gsub, which replaces all instances of a regular
expression globally
[regular expression 1] [regular expression 2] => result
Example
gsubip . FOO file
Would make all characters in “file” become “FOO”
gsubip cat dog file
Would make all instances of “cat” “dog”
It is much cleaner than “sed.”
You don't need to have “sed” installed to run this program.
It doesn't read from the standard input
It takes exactly 3 arguments, no more, no fewer.
See also
gsub

25. Delete

Recursively delete all files named a certain name.

26. Append

Appends text to file
Example
append file
This is more text to be appended

27. Rhyme

A very powerful music generator program that doesn't use AI.
See this channel as an example of potential usage of this public
domain content
https://www.youtube.com/@LawrenceStevensMusic
The music industry is plagued with very foundational problems.
For starters, the quality of the discourse in music is very low, and
has been from the start of the popularization of modern music, as well
as during the era in which classical music was popular and before.
People aren't able to fight back, against superficiality and potential
deception in messages.
One of the greatest problems in the current world is the mainstream
scientific establishment, supported and upheld by mainstream academia.
To indicate what is already obvious, it exists in the context of a
legacy of authoritarianism and a lack of understanding of dynamism.
It is not dynamic or forceful, the “results” of it don't change the
foundation of society. True free discourse is not supported, especially
in regards to the human mind and human well-being and human freedom.
These problems should be opposed and fought, it is self-evident that
this would be the best use of ones time, for it would lead to true
freedom.
One excellent way to combat this would be to use the generated songs
generated by a computer program called Rhyme, available at
https://www.github.com/gregoryc/democracy in the SONGS folder.
These are public domain songs generated by non-Artificial Intelligence,
just a program that introduces variance, and these hit-home against the
status quo and the current state of the mainstream scientific
establishment. Taking these songs and making actual songs from such,
such as rap songs using a service such as Uberduck (no affiliation),
would be an excellent, excellent use of time.
The mainstream scientific establishment and mainstream academia must be
forced to change.
Shoving art and flippant content in ones face, is the best way of doing
such.
Accountability must always be brought about.
Is music good and desired? For sure.
USAGE OF PROGRAM
Enter basename to make songs folder in (folder/songs, num songs =
13000)
Usage rhyme [folder] (processes files “1.json” and “21.json” by
default)
Example output of a song
UCA
(NO COPYRIGHT RESTRICTIONS ON THIS CONTENT WHATSOEVER. FULLY PUBLIC
DOMAIN)
Name the song or poem as you wish, resell it, but please positively
influence culture
Subject matter
Category 1 — Abuse of philosophical universalism (making
broad claims while intentionally not trying to understand things or see
any sides of anything whatsoever, childish behavior worse
than a 3 year old, acting retarded)
VERSE
Brittle as possible, they are truly unguarded
Any novelty, they have disregarded
Their remissness is spectacular, the world they've bombarded
The clique is so insular, I swear they're retarded
Enlightenment values, they have not safeguarded
Any novel ideas, they automatically have discarded
Maybe the rebels and true communicators are off the grid
Lack of thought makes an grown-up the absolute worst kid
Can we stop this, their non sense they overdid
What horrendous non sense these creeps did
Tunnel vision, everyone and everything they forbid
They're such failures, themselves they outdid
CHORUS
They're such failures, themselves they outdid
Cutting out the conversation, putting on the lid
Don't have to do with ego or id
Running away from conversation just like a kid
Their neglect is out of this world, I swear it's avant-garde
They are failures, down at the boulevard
They don't care about your feelings, they don't regard
Having a little curiousity, cannot be hard
They are failures, down at the boulevard
They don't care about your feelings, they don't regard
They don't have decency, they automatically disregard
Having an open mind, should not be so hard
They don't care about anyone, don't need no bodyguard
Their neglect is out of this world, I swear it's avant-garde
They're a complete failure, they only neglect
This is plain, anyone can detect
They don't care about pain or the past, they don't want to recollect
This needs to be called out, one should be direct
They want man lower, lower just as if an insect
VERSE
Thinking itself resides in their territory of circumvention
Complete neglect, complete inattention
They have no genuine intention
We need change, we need intervention
Violence is second nature to them, their friends they've bombarded
Any novel ideas, they automatically have discarded
The clique is so insular, I swear they're retarded
Any novelty, they have disregarded
Any novelty, they have disregarded
Brittle as possible, they are truly unguarded
The clique is so insular, I swear they're retarded
Any novel ideas, they automatically have discarded
Enlightenment values, they have not safeguarded
Their remissness is spectacular, the world they've bombarded
They don't care about your feelings, they don't regard
Their neglect is out of this world, I swear it's avant-garde
They don't have decency, they automatically disregard
Working don't matter for this, whether day or graveyard
CHORUS
They're such failures, themselves they outdid
Cutting out the conversation, putting on the lid
Don't have to do with ego or id
Running away from conversation just like a kid
Their neglect is out of this world, I swear it's avant-garde
They are failures, down at the boulevard
They don't care about your feelings, they don't regard
Having a little curiousity, cannot be hard
They are failures, down at the boulevard
They don't care about your feelings, they don't regard
They don't have decency, they automatically disregard
Having an open mind, should not be so hard
They don't care about anyone, don't need no bodyguard
Their neglect is out of this world, I swear it's avant-garde
They're a complete failure, they only neglect
This is plain, anyone can detect
They don't care about pain or the past, they don't want to recollect
This needs to be called out, one should be direct
They want man lower, lower just as if an insect
VERSE
The truth is what they wish to disregard
Their behavior is garbage, it should be thrown in the junkyard
They act like a retard
Behaving just like in the schoolyard
In their ivory tower, with the castle and guard
Their behavior makes them charred
Thinking differently shouldn't have to be hard
Their neglect is out of this world, I swear it's avant-garde
Working don't matter for this, whether day or graveyard
They don't care about your feelings, they don't regard
They are failures, down at the boulevard
They don't have decency, they automatically disregard
They're a complete failure, they only neglect
They don't speak the language of the people or their dialect
This is not right, this is completely incorrect
The only focus on “responses,” they just want to deflect
The lies are put forth, the lies they erect
CHORUS
They're such failures, themselves they outdid
Cutting out the conversation, putting on the lid
Don't have to do with ego or id
Running away from conversation just like a kid
Their neglect is out of this world, I swear it's avant-garde
They are failures, down at the boulevard
They don't care about your feelings, they don't regard
Having a little curiousity, cannot be hard
They are failures, down at the boulevard
They don't care about your feelings, they don't regard
They don't have decency, they automatically disregard
Having an open mind, should not be so hard
They don't care about anyone, don't need no bodyguard
Their neglect is out of this world, I swear it's avant-garde
They're a complete failure, they only neglect
This is plain, anyone can detect
They don't care about pain or the past, they don't want to recollect
This needs to be called out, one should be direct
They want man lower, lower just as if an insect
VERSE
They don't have decency, they automatically disregard
They don't care about your feelings, they don't regard
Having a little curiousity, cannot be hard
Their neglect is out of this world, I swear it's avant-garde
They want the status quo, it's all they crave
The speeches of the past, they only wish to engrave
They act as bad as possible, they don't know how to behave
Their sucked in their circle, they never wave
Away from the truth, on the outskirt
With pre-thought of ideas, they automatically assert
Any progress is fleeting with them, they revert
Disingenuous to the extreme, the society they subvert
The society is the ones who hurt

28. Lines

Lines gets the number of files in the current folder that you are in.
It can also act like “wc -l” if you pipe data into it.

29. Floor

Gets the floor of numbers e.g. 21.3 -> 21

30. Emoji

Emoji converts words to emojis from the standard input
It can also speak the output
It can also copy the output to your clipboard
It is very useful
UCA

31. Email

This currently doesn't work for gmail since 2022 due to policy changes.
A simple and practical tool to email people using Himalaya
Himalaya needs to be installed first
You would need to configure the script by changing its source code.
Modes
email [no arguments]
email [yourself]
email [addr]
email one email address
email [Subject] [addr] [option more addrs]
Example
email 'Gregory, I love your software!' gregorycohen2@gmail.com
my_friend@outlook.com person@example.com

32. Close

“Close” is a simple program that closes “Emerald Browser,” a new web
browser based on the same engine as Chrome. Currently, Emerald Browser
only works on Linux and Mac (Or Windows with Windows Subsystem for
Linux or a Virtual Machine, but getting it to work might be tricky).
“close” closes the Web Browser, which is normally full-screen.
More accurately, it kills the browser, and all other copies of Emerald
Browser.
Since they are normally full screen, presumably the user would only
have one instance of the browser open.
The browser can have multiple panes (kind of like tabs) open, depending
on how the browser is compiled.
The browser can also be transparent, depending on how it is compiled.
“Close” is supposed to be used in tandem with “open,” which is a
command line tool to open the browser.
open [query] ——> [query] gets searched in google, and then opened
When you are done, you can do
close
Which closes the browser. It is a simple command.
Currently, Emerald Browser is incomplete. A program exists in this
software project that allows you to open up multiple browser tabs (one
or more tabs) simply by speaking.
Voice recognition would google the multiple sites that you say in your
query (separated by “and”)
“facebook and youtube and google”
It's hard to get more direct than that!
Emerald browser has a built in the top. The terminal is the navigation
bar.
Some more work needs to be put into the browser.
Currently, new tabs can't be opened, which might be a dealbreaker for
some people.
Currently, content, like YouTube videos, can't be made fullscreen.
If anyone wants to contribute, feel free to!

33. Clock

clock is useful
clock is a command line alarm clock
It wakes you up at 8:14, or at a time specified
Usage
clock
Runs clock
clock 15 30
Sets an alarm clock for 3:30pm
clock 9 0
Sets an alarm clock for 9 in the morning
It uses flite to wake you up
It speaks with a bunch of voices
To stop it
Run this command
clock stop

34. Trim

Trims spaces of each line

35. Swap

Swaps two files
Example
swap text1 text2

36. Rsub

Recursively replaces text.
Verbosely tells you everything that happens.
Non-regex.
Example
rsub my_email@site.com my_second_email@site.com
Would replace an email recursively in a directory.
It tries to skip non-text files and hidden files.
rsub find replace [optional list of files instead of recursive search]
If a file is “-” or stdin, read from stdin and output to stdout.
-n, -r, rename files instead of replacing contents of files. find and
replace in file and dir names instead
-v, verbose mode
-- Indicate end of options.

37. Rnip

Replace Not In Place
This is like gsub, but for strings, not for regular expressions
Example
echo .......... | rnip foo bar
See also
gsub

38. Quot

Turns quotes in text into good text and makes text presentable.
Example
$ echo 'Joe said, "One two three".' | quot
Joe said, “One two three.”
Example 2
quot < essay
Example 3
(Quote the file and output it)
quot text_file

39. Open

“open” is a very efficient program that searches a query from google,
and then opens it in Emerald Browser.
If you ever want something to “just open,” you can use it.
Example
open “cats”
An earlier version of open worked like this
open [site1] [site2] [site3] N
site1, site2, and site3 would all be opened, and the top N queries were
all shown in different panes
An even earlier version of this program used Chrome to open the sites.
The current version can open one or more sites.
Example
open “cats” “dogs” “frogs”
All of those queries would open in Emerald Browser.
Just make sure it is compiled in multipane mode if you want to open
multiple new sites at the same time.
See also
emerald-browser
close

40. News

Gets the news from bbc
Usage
news
news speak
uses google_speak to SPEAK the news, one story at a time.
UCA

41. Gsub

Gsub is very powerful.
Usage
gsub [regular expression] [replacement text]
Example
cat text | gsub man dog
cat text | gsub 'man|boy|cat|dog' food
ls | gsub Desktop cat

42. Ctit

Capitalize Title
A work in progress.
Capitalizes arguments and treats them like a title.
ctit this is my heading
==> This Is My Heading for a Document
You can also do
ctit .... | copy
To copy the title to your clipboard

43. Copy

copy copies the standard input
Example
ls | copy

44. Args

args is like a better xargs
args works properly with spaces in the name of commands
It takes exactly one argument
Example
ls | args “mv -t ../f”

45. Sub

Sub is a simple command line program that subtracts integers.
For some reason, no simple program did this.
Which is weird
Example
sub
(Input)
10
3
1
Result =>
6
Example
(echo 5; echo 2) | sub
Result =>
3

46. Rip

Replace In Place
rip tool replaces a string, not a regular expression, with another
string
Example
rip cat dog file

47. Nth

Nth gets the nth line from the input

48. Mul

Multiply numbers
echo 1 > file
echo 2 >> file
echo 3 >> file
echo 4 >> file
echo 5 >> file
cat file | mul
=> 120

49. Exp

exp is an exponentiation tool
(echo 5; echo 3) | exp
=> 125
(echo 2; echo 10) | exp
=> 1024

50. Div

Divides numbers
Example
(echo 5000; echo 100) | div
=> 50

51. Add

See the sub example
add adds integers from the standard input
(echo 1; echo 2; echo 3) | add
The result would be 6

52. Abs

Abs gets the absolute value of an integer
The absolute value of a number is the value of that number without its
sign
echo -300 | abs
=> 300
echo 200 | abs
=> 200
(echo -2; echo -10) | sub | abs
=> 12
The last one would do -2 - -10, the result would be -12, and then the
absolute value would be computed, and so the result would be 12.

53. G+

A compiler for C += 2. If you want to use C++ with Python syntax, you
can use this.
Usage is like g++
Example
g+ a.cpp -o out
See also README file & emerald-browser and its source

54. T

“t” is incredibly useful.
It can be used many, many times every day by computer power users.
It is kind of like “sed,” or perl, python or ruby.
It's the ULTIMATE shell “glue” tool.
t reads every line from the standard input, and for every line, it
evaluates a ruby expression
t a + 2
would add 2 to every line
Number automatically get converted to numbers in Ruby.
So one doesn't have to worry about that.
The “value” of the line of STDIN is any letter of the alphabet.
So choose any letter to do operations on and it will work.
You can also do
t a + 2 if a % 2 == 0
And you get a Python list comprehension sort of thing from the command
line
It is a lot simpler and easier than using awk, Ruby, Perl or Python
You could also have loops
echo “One line” | t a while true
The second line, again is a Ruby expression.
You can have really complex expressions on the second line.
You can even import modules.
cat /usr/share/dict/words | t 'a + “ is a good word.”'
That processes every word in the dictionary, and says that every word
“is a good word.”
There are other programs in this software project like “t.”
But if you do command line text filtering, t might be the best tool
that you will find.
See also
gsub
gsubip
.

References

  1. https://www.youtube.com/embed/Fx9x8cArK30
  2. mailto:gregorycohen2@gmail.com
  3. https://snapcraft.io/democracy/embedded?button=black
  4. https://snapcraft.io/democracy
  5. https://pypi.org/project/democracy
  6. https://www.rubygems.org/gem/democracy
  7. https://twitter.com/democracygem
  8. https://www.linkedin.com/in/gregory-cohen-274333261/
  9. https://www.rubygems.org/gems/democracy
  10. https://www.rubygems.org/gems/computers
  11. https://www.rubygems.org/gems/freespeech
  12. https://www.rubygems.org/gems/linux
  13. https://www.rubygems.org/gems/string
  14. https://www.rubygems.org/gems/unix
  15. http://www.github.com/gregoryc/democracy
  16. http://www.rubygems.org/gems/democracy
  17. https://pypi.org/project/democracy
  18. https://www.youtube.com/@LawrenceStevensMusic
  19. https://www.github.com/gregoryc/democracy