• Tip Jar

TTYtter Becomes Oysttyer

The CLI based Twitter program TTYtter has been forked and is now called Oysttyer. I know some of you are saying “yes, this is old news”, and it is, but I just kept right on procrastinating and that is why this took so long. now, however, the ttytterrc page you know and love has been updated and is now an oysttyerrc generation page. To create your .oysttyerrc, simply visit the new .oysttyerrc creation page. Dont forget to git clone the suite of extensions from github.
Although I rarely use Twitter any more, I know a lot of people still do, so I updated the extensions and settings generator code. Hopefully too, Oysttyer will be able to work flawlessly with GNU Social soon. I left the code in place for those type .rc files, so when that support is added, it should just work. You can follow me at https://social.stormdragon.tk/storm. If you need an account for GNU Social, why not sign up at https://2mb.social/main/register? I hope to see you soon in my timeline.

CLI Day 2016

I didn’t have much time to do anything for CLI Day this year. But, I certainly didn’t want to neglect the holiday I created, so I threw something together at the last minute.
This year being a leap year, I thought it may be of interest to show how to find out which day CLI Day falls on. CLI, or the Roman Numeral 151, is also the day the holiday is on, so most years, it would be 5/31. However, this year is a leap year, so this time it is on 5/30. So, to see which day try this command:

\date +'%j' --date="5/31"

This year, that command yields the result 152, meaning of course that CLI Day would fall on 5/30. I know it’s not much, but I’ve been struggling with getting a CLI based screen reader for my new Odroid, and CLI Day sneaked up on me. I was hoping to have compile instructions for speakup on the Odroid for this year’s CLI Day, but that just didn’t happen.
Anyway, happy CLI Day, and I can’t wait to see what everyone else comes up with, it is pretty awesome how many people participate now in the holiday I started just for fun and to push myself to learn to use the console for everything.

Mumble for Windows Users

Mumble is pretty much hands down the best voice chat software on the planet. It has awesome features, and uses the opus codec, so it doesn’t require a lot of bandwidth and yet the sound quality is very high. The problem is, Windows users who rely on a screen reader can’t use it because of some kind of keyboard conflict. So, until y’all can switch over to Linux, where this problem never existed to begin with, here’s a solution.
First, install mumble. Then, after running through the installation, run this registry file that disables some keyboard hooks that interfere with mumble. I’m not even sure why they are there to begin with, but doing this does not, so far as anyone who has tested it can tell, cause you to lose any keyboard functionality. That’s it, from now on your screen reader of choice and Mumble should live together in perfect harmony. Of course, since you’re using Windows, remember to virus scan anything you get before running it. This includes the registry file linked to above. I have the file hosted here on my server, but you can never be too careful.

Simple Orca Plugin System

Chrys has developed a plugin system for Orca. This plugin system allows you to write plugins for Orca in any language you want. Although not as powerful as a fully integrated plugin system, you can still accomplish a lot with what it can do. In fact, the included plugin manager is written in bash, and it allows you to enable and disable other plugins, as well as download and instal new plugins.
To install the simple plugin system, if you use Arch Linux or one of is derivatives, install the package simpleorcapluginsystem-git located in the AUR.
If you use another distribution, simply innstall manually by doing the following:

git clone https://github.com/chrys87/simple-orca-plugin-system.git
cd simple-orca-plugin-system
sudo cp -r SOPS /usr/share/

whether you install via package manager or manually, the final step is the same. To integrate the plugin system with Orca, run the following command:

/usr/share/SOPS/install-for-current-user.sh

Restart Orca, and the plugin system will be ready to use. By default, the simple plugin system includes the plugin manager, bound toorca+control+p, a plugin to tell you which workspace you are currently using, bound to orca+x, and a plugin to tell you what is currently in the clipboard, bound to orca+c.
Using the plugin manager, you can easily install more plugins. Just select Install New Plugins, then check the plugins you want to install and assign them a keybinding. There are several plugins available for download, and more are being added all the time.
If you need assistance, Chrys and I are usually in the #talkingarch channel on irc.netwirc.tk, also feel free to leave question in the comments, or contact me via the contact form.
Information for creating plugins is available in the docu.txt file included in the SOPS directory. Also, a file called hosting.txt is in the tools directory. If you want to host plugins yourself edit the file, placing your information in the variables, then upload the file to a directory on your server and rename it to index.php. Anything in the directory other than index.php will be listed as a plugin. If you host plugins and want them publically available, send me a link to your site so we can review the offered plugins and include the new site in the plugin manager.
If you just want to have your plugins hosted on an already available server, let me know here in the comments, or on GNU Social as @storm@social.stormdragon.tk. You can also contact me on Twitter as @stormdragon2976. Note that I do not check my Twitter all that often, so responces may be delayed.
The Simple Orca Plugin System is easy to use, and very useful. I hope you enjoy it.

Pick Your Poison

There are lots of windows managers out there, with varying degrees of accessibility with orca. The one I like most is Ratpoison. It is great because it is very Screen like. The problem is, its dialogs are not accessible. I started a project called strychnine a while back to help fix this problem. After realizing that Ratpoison’s keybindings were nothing more than macros to call ratpoison commands, I made a lot of progress with making pretty much the whole thing accessible to orca. I just replaced the built in dialogs with zenity based dialogs. So, where as contrl+t ? brought up an inaccessible list of keybindings, I just rebound it to run the help file through zenity –text-info. Of course, because so many things are modified, the help file might be more difficult to read. If this is the case, there are resources all over the internet with the list of bindings. I have changed very few of them from their defaults, with a few exceptions. Control+t w will open your web browser instead of the window list. I rebound the window list to control+t apostrophe and, instead of it being a box in which you enter the number or name you want, it brings up a list of open windows, just use the arrows to move to the one you want and press enter. I also added bindings that allow you to switch between open windows with alt+tab and shift+alt+tab. Note that these do not need to be preceeded with control+t.
Also, music player controls are built in as the following prepended with control+t:

Z
Previous Track
X
Play
C
Pause
V
Stop
B
Next Track
F11
Volume Down
F12
Volume Up

You can change the default escape key from control+t if you choose. In fact, the default option in the setup file is control+escape. To get strychnine set up, simply do the following:

git clone https://github.com/stormdragon2976/strychnine.git
cd strychnine
./setup.sh

If you want to install the default programs used by strychnine, run setup.sh with the -i or –install option. To create a .xinitrc file, needed for starting ratpoison, run setup.sh with the -x or –xinitrc option.
I use the SLiM login manager to start my X session. It is good because it sources the .xinitrc file for its instructions on what to load. Other login managers do not use it though, and so if you use one of them to manage Ratpoison, you may need to do the following:

sudo mkdir -p /usr/share/xsessions
sudo cp /etc/X11/sessions/ratpoison.desktop /usr/share/xsessions/ratpoison.desktop

For more information see https://wiki.archlinux.org/index.php/Ratpoison
Because the code for strychnine is changing rapidly, you may need to recreate the .ratpoisonrc file, (run setup.sh), frequently. For this reason, I made it so you can source the .ratpoisonrc file with control+t control+colon. So there’s no need to restart Ratpoison to apply new changes.
If you have a netbook, old laptop, or just want a lightning fast, easy to use, accessible desktop give Ratpoison with strychnine a try.

Command Line Word Tools

It is sometimes nice to have the ability to spellcheck, or find a definition for something right on the command line. There are several tools that can help you accomplish this. For spellchecking, I use a program called hunspell.

pacaur -S hunspell hunspell-en-us-large

hunspell-en-us-large comes from the aur, so if you don’t use pacaur or some other UR helper, you wil need to download and install it.
To use it, simply enter something like the following:

echo "neibor" | hunspell -d en_US-large
error: unknown encoding UTF8: using iso88591 as fallback
error: unknown encoding UTF8: using iso88591 as fallback
error: unknown encoding UTF8: using iso88591 as fallback
error: unknown encoding UTF8: using iso88591 as fallback
Hunspell 1.3.3
& neibor 1 0: neighbor

Here we see that neighbor is mispelled, but the output is a bit ugly. Plus, who want’s to type echo “blah” and pipe it through hunspell every time. Fortunately, you can write a small script, I call it spellcheck, that cuts all the extra typing out as well as cleaning up the output. Let’s see the output from the script:

spellcheck neibor
Hunspell 1.3.3
& neibor 1 0: neighbor

Much better. So, to create this script, simply add the following to ~/bin/spellcheck if you have added that to your path, or /usr/bin/spellcheck if you prefer to have it system wide.

#!/bin/bash
echo "$@" | hunspell -d en_US-large 2> /dev/null
exit 0

Save the file and remember to make it executable with chmod 755 /path/to/spellcheck
Now, you can spellcheck without seriously interupting your workflow. But, what if you come across a word and you don’t know its meaning? Never fear. There’s no need to go firing up a browser and wating for some dictionary site to load so you can wade through pages of ads just to get a one-line definition. There are two command line dictionaries I like to use. First, there is dictd:

pacman -S dictd

To use, type dict and the word you want:

dict skullduggery
1 definition found

From WordNet (r) 3.0 (2006) [wn]:

skullduggery
n 1: verbal misrepresentation intended to take advantage of you
in some way [syn: {trickery}, {hocus-pocus}, {slickness},
{hanky panky}, {jiggery-pokery}, {skulduggery},
{skullduggery}]

You may notice the result comes from something called wordnet. Which is the other dictionary program I tend to use from the CLI. It is in the UR:

pacaur -S wordnet

Usage can vary. On some distros like ubuntu, you type out the word wordnet and the word you want, whereas in arch, you type wn and the word you want. Here’s an example of usage:

wn storm -over

Overview of noun storm

The noun storm has 3 senses (first 2 from tagged texts)

1. (8) storm, violent storm -- (a violent weather condition with winds 64-72 knots (11 on the Beaufort scale) and precipitation and thunder and lightning)
2. (3) storm, tempest -- (a violent commotion or disturbance; "the storms that had characterized their relationship had died away"; "it was only a tempest in a teapot")
3. storm -- (a direct and violent assault on a stronghold)

Overview of verb storm

The verb storm has 5 senses (first 2 from tagged texts)

1. (2) ramp, rage, storm -- (behave violently, as if in state of a great anger)
2. (1) storm, force -- (take by force; "Storm the fort")
3. storm -- (rain, hail, or snow hard and be very windy, often with thunder or lightning; "If it storms, we'll need shelter")
4. storm -- (blow hard; "It was storming all night")
5. storm, surprise -- (attack by storm; attack suddenly)

Finally, you may need to solve an anagram. Or perhapse you’re one of those people who likes playing around with words. Either way, wordplay is for you. Just install it from the UR:

pacaur -S wordplay

Of course there are lots of options so you can refine what you are lookind for, but in its simplest form, wordplay looks like this:

wordplay dragon
Wordplay Version 7.22 03-20-96, 1991 by Evans A Criswell
University of Alabama in Huntsville criswell@XX.XXX.edu

Candidate word list : no
Anagram Generation : yes
Adjacent duplicates : no
Vowel-free words OK : no

Max anagram depth : 32
Maximum word length : 128
Minimum word length : 0

Word list file : "/usr/share/wordplay/words721.txt"
String to anagram : "DRAGON"

Initializing. Please wait while words are being loaded
and unnecessary words are being filtered out ...

42 words loaded (4096 byte block). Longest kept: 6 letters.

Anagrams found:
1. DANG OR
2. DRAGON
3. GRAD ON
4. GRAD NO
5. DRAG ON
6. DRAG NO
7. RAND GO
8. DARN GO
9. NAG ROD
10. RANG DO
11. RAG NOD
12. RAG DON
13. RAN GOD
14. RAN DOG

Note I Xed out the email address. I have no clue if it is still in use, but I don’t want to send anyone spam because of an article here. Armed with these powerful word tools, you should be able to do pretty much anything you need right from the CLI without bothering to open a browser. If you have any other useful tips for word related command line apps, please leave a comment. Thanks for reading.

CLI Day 2015

For CLI Day this year, I have put together a collection of one-line games. You can copy and paste these games directly into your terminal and play them, or you can put them into a file, one per file, and run them that way as well. These were a lot of fun to make, and even more fun to play. If you follow @storm@social.stormdragon.tk you have seen a few previews. Here are the games. I hope you enjoy them as much as I do. If you have any to contribute please leave them in the comments.

#Match the letter
s=99;while [ : ];do t=$(shuf -n1 -e {a..z});read -t0.$s -n1 -p " $t " p;if [ "$t" != "$p" ];then play -nV0 synth pi fade q 0 1 0.5;break;else play -nV0 synth .05 tri C8:C3 norm -7;fi;((s--));done
#guess 1 to 10
read -p"Guess from 1 to 10 " num;if [ $num -eq $(seq 10|shuf -n1) ]; then echo "Yay!";else echo "Boo!";fi
#order the numbers 1-9 type the number to reverse the string from that number to the right
c=0;n=$(shuf -i 1-9|tr -d "\n");while [ $n -ne 123456789 ]; do read -n1 -p$n i;l=${n%$i*};l=${#l};a=${n:0:$l};b=$(echo ${n:$l}|rev);n=$a$b;echo;((c++));done;echo "$n $c tries"
#spelling game with changable list
l=(champagne neighbor tortoise);clear;s="espeak -v en-us -a 200";for i in ${l[@]};do $s $i;read w;if [ "$w" = "$i" ];then $s "Got it!";else c=0;while [ $c -lt ${#i} ];do $s ${i:$c:1};((c++));done;fi;done &> /dev/null
#Simple configurable math game, change o for different types, set n min and x max numbers used.
n=0;x=10;o=+;m=0;r=0;s=5;t=0;a=-;while [ "${a^}" != "Q" ];do p="$(shuf -n1 -i$n-$x)$o$(shuf -n1 -i$n-$x)";read -t$s -p "$p " a;if [ $a -eq $(($p)) ] ; then echo "Yay!";((r++));s=$(echo "scale=2;$s-0.05" | bc);else echo "Wrong: $(($p))";((m++));fi 2> /dev/null;((t++));done;echo -e "\n$r right and $(($m-1)) missed of $(($t-1)) total."
#Pig dice game. any letter to roll, space or enter to bank.
c=0;p=0;s=0;t=$(shuf -n1 -e c p);while [ $c -lt 100 -a $p -lt 100 ];do if [ $t = c ];then a=$(shuf -n1 -i0-6);case $a in 0)c=$(($c+$s));s=0;t=p;echo "CPU banked $c.";;1)echo "CPU Pigged\!";s=0;t=p;;*)s=$(($s+$a));echo "CPU $s : $c";esac;else read -n1 -p "? " a;if [ -z $a ];then t=c;p=$(($s+$p));echo "You banked $p.";s=0;else a=$(shuf -n1 -i1-6);if [ $a -eq 1 ];then s=0;t=c;echo "You Pigged\!";else s=$(($s+$a));echo "You $s : $p";fi;fi;fi;done;echo "CPU $c : You $p"
#Shoot down the eroflcopter you hear when sound is centered. Random speeds.
h=0;n=1;s=20;while [ $n -eq 1 ];do x=9;y=0;while [ $x -gt 0 ];do espeak --stdout [[schXh | play -qV0 - norm remix v0.$x v0.$y&read -st0.$s -n1 p;if [ -n "$p" ]; then if [ $x -eq 5 -a $y -eq 4 -o $x -eq 4 -a $y -eq 5 ];then x=9;y=0;play -nqV0 synth pi fade h 0 1 1 pad 0 1 reverb overdrive riaa speed 32 repeat 2;play -nqV0 synth pi fade h 0 1 1 norm -18 pad 0 1 reverb overdrive riaa;((h++));s=$(seq 10 20|shuf -n1);else n=0;fi;fi;((x--));((y++));done;done;echo "You shot down $h eroflcopters."
#Talking CLIcat (pitch shifter).
e="norm pitch 1000";echo "Hold down control+c to exit.";f=$(mktemp -u);while :;do rec -q $f.wav silence 0 1 0:00:00.5 25% && play -qV0 $f.wav $e;done
# Small polyphonic music synthesizer.
n=CDEFGAB;l=asdfghj;while read -n1 k;do x=$(tr $l $n< <<$k);play -qn synth pl ${x}3 fade 0 .7 & >/dev/null;done

Charm Works Again

This is just a quick post to test the GNU Social Comments plugin. I decided to try charm again to post this, and was pleasantly surprised to find it works again. Something in the last wordpress updates broke it, but now it’s back.
Just as a reminder, CLI Day 2015 is approaching quickly. GNU Social users can join the CLI Day Group. Don’t have a GNU Social account? Get one at social.2mb.solutions. Let’s make this year the biggest CLI Day ever!

A Better Way to Microblog – GNU Social!

GNU Social is extremely cool. Not only can you have your own microblog, under your terms, with your rules, but you can also follow other people who have their own microblog as well. Not up to running your own? No problem, because there are plenty of public nodes out there already set up and waiting for you to make an account. I personally recommend 2mb.social or social.mayfirst.org, but those are just two of the ones I know of. There’s also Quitter.se, or gnusocial.net. All you have to do to get microblogging in a matter of a couple minutes is go sign up at one of the sites listed above. But, if you wanna take the bull by the horns, you can install GNU Social by downloading it from its git repository or from the .tar.gz file.
To follow a person, go to their page, https://social.stormdragon.tk/storm, for example and click on subscribe. Enter your webfinger (the full URI to your account) into the box, you@wherever.whatever, then click subscribe. You will be presented with a page to confirm your subscription.
You can also follow people from your own page. To do so, click on profile, remote, and enter the person’s webfinger into the box and confirm you want to subscribe to them.
As with other microblogging services, hash tags are used. In fact, you can see a list of trending tags right on the site. However there is another aspect to GNU Social not available in other microblogging options. If you prefix a word with an exclamation point, it will post to a group, so long as you are subscribed to said group. People in a group see things posted by everyone in that group regardless of following status. You may choose to post your currently playing music track to the !listening group, which gasher, (see below), does for you automatically. Here are some groups I recommend:

Alter Aeon>
Keep up with happenings on the game Alter Aeon.
Listening
Listening to something awesome? Post it here!

When you are setup and ready to rock, you may be interested in some clients for GNU Social. I am currently developing a command line client called Gasher. It is very functional so far and contains features you won’t likely find in most other clients, including the ability to post your currently playing song or the ability to record and post sound clips right from the program itself. For Arch Linux users, Gasher is available in the AUR as gasher-git.
The previous version of TTYtter also works well as a client, so long as you add a few things to your .ttytterrc before launching it. First, install the required version of TTYtter:

sudo wget -O /usr/bin http://www.floodgap.com/software/ttytter/dist2/2.0.00.txt

Then, create ~/.ttytterrc with the minimum of the following settings. Note, for the following example, I’m going to use https://social.2mb.solutions:

apibase=social.2mb.solutions/api
authtype=basic
linelength=512
user=USERNAME:PASSWORD
ssl=1
vcheck=0

You are now ready to use GNU Social with TTYtter, awesome! You may have noticed we had to set the line length in the above example. That’s because GNU Social does away with that silly 140 character limit, allowing the site administrator to set the character limit to whatever they wish. So, prepare to get used to being able to say what you want to say without running out of space.
BitlBee is another option as a GNU Social client. It’s been available since back when Identica was actually good. The third parameter in the account add line isn’t really needed, so just put whatever you want there. To add your account:

account add identica foo
account identica set base_url https://social.2mb.solutions/api
account identica set oauth false
account identica set message_length 512
account identica set username USER
account identica set password PASSWORD

If you would like an extra layer of protection, so you don’t accidently post something you don’t mean to, then do the following:

account identica set commands strict

With this option set, you have to type post then the text you want to post. Finally, to enable the account:

account identica on

For those of you who aren’t into the command line, there is a nice graphical app called Yaics which may or may not be in your distro’s repositories. For Arch Linux, it is available in the AUR. The source is available at https://gitlab.com/stigatle/yaics. It is accessible with orca, but you will have to use flat review almost exclusively. During configuration, if you find text boxes that don’t say what they are, just press orca+numpad5 for desktop layout, or orca+k for laptop layout, and it will tell you what the box is.
For Android users, the application Mustard is a great way to connect to your GNU Social account. Install it from the Playstore. Setup is straight forward and easy.

Easily Load Books from Bard on to Your Cartridge

So you’ve just downloaded several books, for hours of reading enjoyment from the BARD service, and now you have to create a folder on your cartridge or pendrive for each book, extract the book to its folder, and remove the zip file. Wouldn’t it be much easier if it were automated?
Well, now it is. just grab the bookloader.sh script, place it on your drive where you want the books loaded, and then type:

bash bookloader.sh

The script creates a folder called book# where # is the number of the book it is currently extracting, e.g. book1. The script next extracts the zipfile containing the book to the newly created folder. Finally, the script removes the .zip file. When the prompt returns, simply unmount the drive, and put it in your book player. Very easy, and I hope useful.

  • Tip Jar