skip to main content - dyslexic font - mobile - text - print

Hacker Public Radio

Your ideas, projects, opinions - podcasted.

New episodes Monday through Friday.

Correspondent

Jon Kulp


Host ID: 238

Music professor, open-source software enthusiast, Lafayette, LA.
http://jonathankulp.org


email: jonlancekulp.nospam@nospam.gmail.com
episodes: 39

hpr1834 :: Password Cards

Released on 2015-08-13 under a CC-BY-SA license.

How to Hide a Password Using a Password Card

It's okay to write your password down and keep it in your wallet, but it's best to try to hide it as well. Here's how to keep your password secure and handy at the same time by embedding it in a password card.

Method 1

Generate a fancy symbol-and-color-coded password card at passwordcard.org: http://www.passwordcard.org/en. Follow the directions there on how to use it best.

Method 2

Make your own. Use the password generation package pwgen on Linux to generate a whole bunch of random passwords. In the following example, the -s flag tells it you want secure passwords that are generated randomly, not suitable for human memory. The -y flag tells it to include special characters, and 24 indicates how many characters each password should contain.

pwgen -sy 24

Then either use one of the passwords that was generated from this command or embed your own existing password somewhere inside the giant block of gibberish such that only you will know where your password begins and ends. You can put a copy of this in your wallet.

4b$0<k=#;?MJ^K:Uw\6zmP5s
Y;4T3G+jUwJ!R+DT{2=6-^$"
!]""YmR%x.2uG"MGhm)TLyJA
}L)xpxG\1n"\]bC#+/t<a1*@
'3^B`&mSHP@2p1s0;.Rrz_8k
skXLD!YAq|Ic!Y9(?DZKD:Oq
;#/)sCz7PEbly7>/W|KlbveO
a0}amC@^{+aKhnHMgc$qq$XX
A#!o2FhIkD1Fu(K?nE!Szru4
iDAw2=MIa~KE)q'C>S|`A*q.
Y=g'_0i{BOXr8O4N11f8&yRf
~+r^kB%#4o;zs:HWA/a'4U#`
3":6E$PQ:y%D=^ENM5;!q^n4
i"n~oy"4KT/XYY2IV_A%3Sg\
/evf,L5NSX$2-5b;OvZuhN$_
ds4ZD.t/!0yqcey.1?%P'M!u
'GDS-jBN+'NB}cr7~Wy=;JSE
aI&7Byy$79Yf#gU|>@x_3IY2
-jyziY2pZ5M*#iL?9p+^F%PO
QUj&|HVDw2#x+t`1&zW"'Rp{

If you want extra security make two columns or increase the character count.

ra;aH5v"}2lF()\;K0f-G;YT 3XGq>wQ6")UvSU#NpYfr,M(h
PCgM%L)O[mra3vgsX{"0rV"0 7>qSluuegS<#;V-nI"uyc$bX
JE+4MxT/[t&i0\(ndpE(z\%@ }ZS\3<xdG1]G%wf9;k6*_94%
FFZ}gR9hyZ=EsC6QgMz:n$=U h&-O+Wz7L8LmehF&znhF8#Ig
p`4C3PN^1F"AmlQe=[pkz<EM /,FOfQtR|"c8EzN8ug?i359=
a%i;X3~g0SqbKM|]#{hReCmP }.#EOVPxCX)b!r_>o@V9J_^9
H-<FAQ4I]SPlX!$o#I?~2ACy -<JE82-'YV@bl;O_>(nxPgVH
PNHYp2_[-q9G?$Z:m?yZiAH. Xj(mZ0,7EabI-TL4-7RWK]n9
HCmiaZV{8EHREpS5Ppi_^SCl DTzK!CkZ#.c<3I;#}A#D(n$c
<koQz[`F99"{/vB~GcSt@n,* :J&*}n~.#F%{ErSs7j:}eyly
=!F:m65sA5utY,<AU\8~Omz2 @P"*SIR/\Ln0H;1JjM7P"{[0
8hk%p-)_3(P>;p.ROtRevNX_ BbwP00-Vq-5:38O.Z9MGom-n
9,txEI%j+'7=7T@?X7^j^*`U ;!R<$|r3(QuJmsZe6}C(7%&s
X]`(;_6S@@<}Ia[&fZ3*naG7 fij5f)Mkp;EDO.CP""*~8{-^
S2_'(C8Fn&[%nJ%`S3&r.N2< *$o\Nrl*vJ0;zq7G3}wtMd0h
%is{8%'^[b$Cu;a5_RYpy]LM k-=7(<\uQ|hQH-m9.WYq6tx+
Vmb&c!$.@P>\`1;1@ln(B#GY eQu\~"L'*xX%_)CTl*}8#2oD
=6I'>(_nIsu=D2J{l4a4tf5x 3/7J1Rm.G.Hwo=Xm=Lv"o}jF
RYV/lC1|t&;!]@4#2r-h<88/ o[B[qZq@;=/MD8hX|nnZ-0$j
5k`x|:.0G{sra@WiuhHr^aU> Dy@Df^op.WCT)3jD(|T,I7E"

Links


hpr1829 :: My "New" Used Kindle DX

Released on 2015-08-06 under a CC-BY-SA license.

I talk about my latest gadget, a used Kindle DX, which is a discontinued model with a 9.7 inch epaper screen. I talk about its features, limitations, how to navigate it, and I demonstrate its text-to-speech capabilities. Incidentally I really low-balled the original price of the Kindle DX. Looking around a little bit, I find that the original retail price was $479, which was then reduced to just under $400. Mine now seems like a bargain at $128 used.


hpr1824 :: I'm Learning Some Python

Released on 2015-07-30 under a CC-BY-SA license.

I'm Learning Some Python

Lately I'm finally getting around to learning some Python. I wouldn't go as far as to say I'm learning it properly—that's not really my way—I'm kind of poking around in the dark learning things on an "as-needed" basis, but I'm finding that it's incredibly powerful and making me much more efficient in my daily life. In this podcast I discuss some of my favorite ways of using it and some of the cool modules and libraries that I've found that make things surprisingly easy in Python that used to be difficult for me in bash.

What I Use It For

  1. Website build scripts, both for the School of Music and for my personal website. Converted from bash, tested and working fine on Windows and Mac.
  2. Text manipulation scripts, used in conjuction with blather. These do things like change text case, remove spaces, and so forth.
  3. Text entry. Voice commands insert various kinds of text templates or canned email responses for my classes. Also used in conjunction with blather.
  4. Adding or stripping HTML tags to/from selected text.
  5. Getting current weather conditions and forecasts, having results spoken back to me using system text-to-speech engine.
  6. Fun blather commands where I interact with my computer and have it talk back to me.

Favorite Python Modules/Libraries

pyperclipA cross-platform clipboard module for Python. (only handles plain text for now) https://pypi.python.org/pypi/pyperclip/1.5.11
pyttsxA Python package supporting common text-to-speech engines on Mac OS X, Windows, and Linux. https://pypi.python.org/pypi/pyttsx
bs4HTML parsing library. Beautiful Soup Documentation
htmlminA configurable HTML Minifier with safety features. https://pypi.python.org/pypi/htmlmin/
smartypantssmartypants is a Python fork of SmartyPants, which easily translates "plain" ASCII punctuation characters into “smart” typographic punctuation HTML entities.
titlecaseChanges all words to Title Caps, and attempts to be clever about SMALL words like a/an/the in the input. https://pypi.python.org/pypi/titlecase
swnamerA name generator that uses Star Wars characters, species and planets to create un fisique names. https://pypi.python.org/pypi/swnamer/0.1.0

Demo Screencasts


hpr1819 :: LibreOffice Tips: Horizontal Lists and Headless Operation

Released on 2015-07-23 under a CC-BY-SA license.

LibreOffice Tips: Horizontal Lists

One of these things is how to create horizontal lists in LibreOffice. This is something that I wanted to do, I think it was maybe a year ago that I was really trying to find out how to do this. What I mean by that is I wanted to be able to do in LibreOffice the equivalent of an in-line list in HTML and CSS. There's a way in CSS to tell the browser to display a series of list items in-line rather than vertically—and this is used all the time for footers and headers and things of that sort—and I wanted to be able to do that in LibreOffice because it would ease the process of creating the exams that I make in my classes, where I have a numbered list for all of the questions, and the answers for each question are also done in a numbered list but at the 2nd level—usually done with a, b, c and d, whereas the numbers of the questions are 1, 2, 3, 4, and so forth. What I wanted to be able to do was have the ordered list a, b, c, d spread out horizontally across the page without having to do it manually. So in other words I wanted to be able to type a word for an answer and then press enter, and instead of having it go into a new line, have it simply move over to the right a little bit with a new letter in place for the next item in the ordered list. I hope it's clear what I'm after here.

Anyway I never did find a way to do this. I searched online and there were a couple of other people who were interested in doing the same thing but they were all told this is impossible. Well, sort of. I found a workaround for this and it's not all that elegant but in a pinch it could work, and I don't think I would want to do it for an entire test but I thought it was kind of a cool way to do it.

So what you do his make up the ordered list just like usual. I have here on my computer right now opened a document with a single question, question no. 1. And then it has at the 2nd level of ordered list a series of 4 options: red, purple, green, and blue. And each one of these is in a font color of the same name, so that the word "Red" is red, the word "Purple" is in purple, "green" is in green. I do this because it makes it easier to see how these things move up and down. There are little buttons down at the bottom of the screen where if you click on the arrow up or the arrow down, it will move the list item up or down. So right now red is in the 1st position, but if I click the down arrow it will go down to the 2nd position and the one that was formally 2nd is now 1st. So purple and red have switched places.

I want to have this kind of flexibility going horizontally as well, and the way I found to do this was to use columns. I select the 4 items and then under the Format menu choose Columns and tell it I want 4 columns because I have 4 items, and I click OK and suddenly these things are distributed across the screen horizontally. Now if I click the up arrow, the item moves left and right!

The bad thing about using columns is that the columns are of uniform width, so they do not dynamically change according to the number of characters that are in the word the way it would do in HTML with CSS.

Headless Operation

To convert a Word .docx file to HTML, run the following command (LibreOffice must not be open in a graphical environment when you try to do this):

libreoffice --headless --convert-to html foobar.docx

To convert the same document to .odt format, run this command.

libreoffice --headless --convert-to odt foobar.docx

Links


hpr1814 :: Custom Context Menus in GNU/Linux GUI File Managers

Released on 2015-07-16 under a CC-BY-SA license.

On Nautilus

On Nautilus you have to put your scripts into the Nautilus scripts folder, which on my system is located here:

~/.local/share/nautilus/scripts

You can either put copies of the scripts in there, or you can do like I did and make symlinks from the Nautilus scripts folder to your /home/bin folder. (I prefer to make symlinks instead of copying the files in there, just in case I make any changes to my scripts. If I have made a symlink instead of copying the file, then I only have to change original script and the symlink will automatically use the updated version.) Once you've done that, you right-click on a file and choose scripts then <yourscriptname> to run your script on the file.

Thunar

On Thunar you don't have to put your scripts anywhere special. It actually handles custom actions much better than Nautilus, in my opinion. What you do is go to the Edit menu and choose Configure custom actions. Then you get a dialog box with two tabs. The first tab is where you can give your custom action a name and then tell it what command to run, and also tell it whether to apply the custom action only to the selected file, to all files in the directory, or to all selected files. On the other tab you choose the context in which this custom action will appear. You can select categories of files—like images, audio files, or text files, and so forth—or you can specify filetypes by extension, so that your custom action will only appear if you right click on a file that has the extension.

Links


hpr1812 :: Headphones and a $2 Microphone

Released on 2015-07-14 under a CC-BY-SA license.

In this episode I use a http://www.amazon.com/gp/product/B005DJOIHE $2 microphone to record as I walk from home to my office. The topic is the 5 pairs of headphones I have and their various features, qualities, drawbacks, etc.

Headphones Mentioned in Podcast

  • Neewer 3.5mm Hands Free Computer Clip on Mini Lapel Microphone
  • Bose Quiet Comfort 15
  • Sennheiser HD 550A
  • Aftershokz Sportz M2 Bone-Conduction Headphones
  • Sony MDR-J10 H ear headphones with non-slip design
  • Howard Leight 1030110 sync noise-blocking stereo earmuffs

hpr1809 :: My "New" Used Kindle Touch

Released on 2015-07-09 under a CC-BY-SA license.

In this show I talk about why I like to buy stuff used whenever possible, whether it be printers, routers, shirts, books, or my latest acquisition, a used Kindle Touch, which in many ways is much better than my (much newer) Kindle paperwhite. Just for fun, I allow the Kindle Touch itself (using its built-in text-to-speech capabilities) to tell me the ways in which it's better than the Kindle Paperwhite.


hpr1804 :: What's in my Bicycle Repair Tool Box

Released on 2015-07-02 under a CC-BY-SA license.

Tools Mentioned

Unless otherwise stated, all are made by Park Bicycle Tools: http://www.parktool.com/

  • SPA-1: Pin Spanner: Green
  • SPA-6: Adjustable Pin Spanner
  • SW-7: Triple Spoke Wrench
  • XLC bike tools crank tool TO-C02 (Crankarm removal tool): http://www.amazon.com/XLC-bike-tools-crank-tool/dp/B000NU2WAS/
  • SCW-13, SCW-15: 13mm, 15mm Shop Cone Wrenches
  • DCW-1: Double-Ended Cone Wrench
  • FR-1, 2, 5, 6: Freewheel Remover tools
  • BBT-22: Bottom Bracket Tool
  • CN-10: Professional Cable and Housing Cutter
  • Avenir "Third Hand" Cable Puller: 94-27-403 (http://www.avenirusa.com/parts-and-accessories/tools/cable-tools/third-hand-cable-puller.html)
  • HCW-5: Crank and Bottom Bracket Wrench
  • CT-3: Chain tool
  • HCW-15: Headset Wrench
  • Ferrules for cable housing
  • Cable End Caps
  • TW-1: Torque Wrench
  • SR-1: Sprocket Remover / Chain Whip
  • Vise Grips (small and large)
  • Adjustable wrenches: 6", 8", 10", 12"

hpr1799 :: Posting From the Command Line on Open Social Networks

Released on 2015-06-25 under a CC-BY-SA license.

Posting From the Command Line on Open Social Networks

You can post to your open social media timelines from the command line using API access. Why would you want to do this?

  • Script automated postings.
  • Bots
  • Post from terminal environments.
  • Post from wherever else you are without having to go to the social media site or to the client that you use to access it.
  • Trigger postings via voice command (what I do).

On GNU Social

Here is the basic format for the command to post a message to a Statusnet / GNU Social timeline:

curl -s --basic --user <username:password> --data status="Hello World" --output /dev/null http://instance.domain.com/api/statuses/update.xml

And here is the script I use to post a message to my timeline, launched by a blather voice command:

#!/bin/bash

# SN account info
user=johndoe
pass='password123'

# a place to store the text message 
text=/tmp/message.txt

# Virtual keystrokes to copy selected text to the clipboard
xdotool key Control+c

# pipe text out of clipboard into the text file
xclip -o > $text

# rest for half a sec
sleep .5

curl -s --basic \
--user $user:$pass \
--data status="$(cat "$text")" \
--output /dev/null \
http://instance.domain.com/api/statuses/update.xml 

rm $text

exit 0

On Pump.io

On pump.io you have to install the pump.io software on your computer. You don't have to be running a server, you just have to have the binaries so that you can run the commands. I will not go into how this is done on this podcast, but there's a link to the pump.io website below and there should be installation instructions available there. Once you have the software installed, you also have to allow command-line access to your account and get the token for authentication, maybe authorize the user too:

pump-register-app -s instance.domain.com -P 443 -t CLI
pump-authorize -s instance.domain.com -P 443 -u username

Finally you can post to your timeline from the command line:

pump-post-note -s instance.domain.com -P 443 -p -u username -n "Hello World."

My script to post a message to the pump.io timeline, launched by a blather voice command:

#!/bin/bash

# a place to put the text. 
text=/tmp/message.txt

# --------------------------------
# Since markdown is possible, I run 
# the text through markdown to get
# a bit of formatting and save it
# as a separate file 
# --------------------------------
pump=/tmp/pump.txt

# Virtual keystrokes to copy selected text to the clipboard
xdotool key Control+c

# pipe text out of clipboard into the text file
xclip -o > $text

# run Markdown
markdown $text > $pump

# Post message
pump-post-note -s instance.domain.com -P 443 -p -u username -n "$(cat $pump)"

sleep 1

rm $text
rm $pump

exit 0

Links


hpr1794 :: 12-Tone Music and My Random 12 Tone Row of the Day

Released on 2015-06-18 under a CC-BY-SA license.

12-Tone Music (Dodecaphony) and My Random 12 Tone Row of the Day

In this episode I cover a bit of music theory as well as some bash scripting. The topic is the Twelve-Tone System of music composition and the scripting of a random 12-tone row to be generated daily. For a full transcript of the show click here.

randomly generated 12-tone
 row

Links


hpr1789 :: The Ubuntu Quickly Ebook Template and Ebooks in General

Released on 2015-06-11 under a CC-BY-SA license.

Ubuntu Quickly Ebook Template

I recorded this conversation with Mike Hingley about a year ago (12 June 2014) but never released it because I thought the audio didn't sound very good and I didn't feel like editing it at the time. Honestly I forgot all about it until now when the HPR queue is low again. I apologize for the slightly clippy quality of my audio, I must have had my microphone too hot on the mumble. It's really interesting to listen to this conversation a year later because I have worked out so many of the problems that I was mentioning to Mike, including the automation of the entire build process using command-line tools from Calibre.

Links

Credits


hpr1784 :: Intro to the Fugue and the Open Well-Tempered Clavier

Released on 2015-06-04 under a CC-BY-SA license.

Intro to the Fugue

This episode of HPR is inspired by the recent release of a new recording by Kimiko Ishizaka of J.S. Bach's Well-Tempered Clavier, Book I. This is a very special recording because it is free and open, licensed to be shared freely forever. The recording was crowdfunded and immediately released with a public license after editing. This allows for legal remixing and sharing, and also makes it perfect for stuff like I do in this episode—cutting the recordings up for inserting as musical examples and then presenting the whole thing for your listening enjoyment.

Full Show Notes

Please see the full show notes for detailed descriptions of the parts of a fugue and a few musical examples as well.

Links


hpr1779 :: Cowsay and Figlet

Released on 2015-05-28 under a CC-BY-SA license.

Basic commands

Make default cow speak:

cowsay "Hacker Public Radio"

Result:

 _____________________
< Hacker Public Radio >
 ---------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

Modes

  • -b Borg mode;
  • -d dead;
  • -g greedy mode;
  • -p causes a state of paranoia to come over the cow;
  • -s makes the cow appear thoroughly stoned;
  • -t yields a tired cow;
  • -w is somewhat the opposite of -t, and initiates wired mode;
  • -y brings on the cow's youthful appearance.

Use "tired" cow mode:

cowsay -t "Ken is tired of begging for shows"

Result:

 ___________________________________
< Ken is tired of begging for shows >
 -----------------------------------
        \   ^__^
         \  (--)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

Specify different images with -f

Threaten someone with a dragon:

cowsay -f dragon 'record and upload a show OR ELSE!'

Result:

 ___________________________________
< record and upload a show OR ELSE! >
 -----------------------------------
      \                    / \  //\
       \    |\___/|      /   \//  \\
            /0  0  \__  /    //  | \ \    
           /     /  \/_/    //   |  \  \  
           @_^_@'/   \/_   //    |   \   \ 
           //_^_/     \/_ //     |    \    \
        ( //) |        \///      |     \     \
      ( / /) _|_ /   )  //       |      \     _\
    ( // /) '/,_ _ _/  ( ; -.    |    _ _\.-~        .-~~~^-.
  (( / / )) ,-{        _      `-.|.-~-.           .~         `.
 (( // / ))  '/\      /                 ~-. _ .-~      .-~^-.  \
 (( /// ))      `.   {            }                   /      \  \
  (( / ))     .----~-.\        \-'                 .~         \  `. \^-.
             ///.----..>        \             _ -~             `.  ^-`  ^-_
               ///-._ _ _ _ _ _ _}^ - - - - ~                     ~-- ,.-~
                                                                  /.-~

On Linux, praise Ahuka with a Random Cow:

echo 'Ahuka Rocks!' | cowsay -f $(locate *.cow | shuf -n1)

One Result:

 ______________
< Ahuka Rocks! >
 --------------
        \    ,-^-.
         \   !oYo!
          \ /./=\.\______
               ##        )\/\
                ||-----w||
                ||      ||

               Cowth Vader

Figlet

Make ASCII banner text with figlet. This one uses the default font and wraps the lines at 45 characters:

figlet -w 45 "Hacker Public Radio"

Result:

 _   _            _             
| | | | __ _  ___| | _____ _ __ 
| |_| |/ _` |/ __| |/ / _ \ '__|
|  _  | (_| | (__|   <  __/ |   
|_| |_|\__,_|\___|_|\_\___|_|   
                                
 ____        _     _ _      
|  _ \ _   _| |__ | (_) ___ 
| |_) | | | | '_ \| | |/ __|
|  __/| |_| | |_) | | | (__ 
|_|    \__,_|_.__/|_|_|\___|
                            
 ____           _ _       
|  _ \ __ _  __| (_) ___  
| |_) / _` |/ _` | |/ _ \ 
|  _ < (_| | (_| | | (_) |
|_| \_\__,_|\__,_|_|\___/ 
                          

Use an alternate font with -f option:

figlet -f digital "Community News"
+-+-+-+-+-+-+-+-+-+ +-+-+-+-+
|C|o|m|m|u|n|i|t|y| |N|e|w|s|
+-+-+-+-+-+-+-+-+-+ +-+-+-+-+

Links


hpr1774 :: Router Hacking

Released on 2015-05-21 under a CC-BY-SA license.

Router Hacking

What

  • Flashing a router with alternate firmware

Why

  • Provide additional features
  • Improve performance
  • Privacy (gets rid of unwanted spyware)
  • Fun

Where

How: Steps for My Latest Hack

  1. Find used Netgear WNDR3400 router on shelf at local Goodwill store, priced at $3.99.
  2. Use my smartphone to check the dd-wrt database to see if this router is hackable.
  3. Grin broadly upon seeing the green "Yes" beside router WNDR3400.
  4. Double-check that power supply is included, find an AC outlet and plug in to be sure it powers on and my phone sees its ESSID. Yep and yep.
  5. Take router to cashier and purchase.
  6. Do hard reset of router to clear any previous configuration.
  7. Hook a laptop up to router using ethernet patch cable (turning off WiFi adapter on laptop).
  8. Access router's configuration in web browser at default router address of 192.168.1.1 just to confirm that it works.
  9. Go back to the dd-wrt router database and find the router again, then download the corresponding "mini" and the "mega" versions of dd-wrt firmware (The mega version has the most features—including USB support, which I wanted—but on many routers, including this one, you have to install the mini version first or else you could brick the router)
  10. Read over the dd-wrt wiki page for this specific router just to see if there's anything unusual about the hack. There's not.
  11. Go to the router's stock configuration page again and find the "Firmware upgrade" button.
  12. Click the button and choose the "mini" version of the dd-wrt firmware, and click upgrade, then wait while crossing fingers until it says firmware successfully upgraded.
  13. Refresh the configuration page at 192.168.1.1 and see the new dd-wrt configuration interface.
  14. Pat myself on the back because I have just hacked another router. Hray!
  15. Find the upgrade firmware area on the new dd-wrt interface, and this time choose the "mega" firmware file and submit, then wait and cross fingers as before. Celebrate when it works.
  16. Configure newly hacked router as wireless bridge (this is NOT going to be my main router), enable the USB and printer support, hook up our formerly-usb-only printer to the router, and configure household computers to be able to print wirelessly to the newly-networked printer.
  17. Enjoy kudos from appreciative family.

hpr1771 :: Audacity: Label Tracks

Released on 2015-05-18 under a CC-BY-SA license.

Label Tracks in Audacity

I don't know if I'm ignorant and everyone else already knows about this, but I decided to record a quick show about Audacity "Label Tracks," something I discovered while working on another HPR episode today.

The label track is one of the most useful things I've found in a long time. It allows you to annotate your audio project so that you can quickly see important spots or summarize the contents of whole segments and see at a glance what they are about without hunting all over the place and playing things back, trying to find the part where you were talking about X,Y, or Z. You can also export the labels as a plain text file with exact timestamps. I have not tried this, but according to the documentation you can also use labels to mark the beginnings of separate songs in a long track and export multiple separate files at once from a single source based on the labels.

To add a label track, go to the Tracks menu and select Add New --> Label Track, and it will add the label track to the bottom of your list of tracks. To add a label, either stick the cursor where you want the label to be and press ctrl+b to add text, or select a region to label by clicking and dragging over a region in the label track, then do ctrl+b to start typing the label text.

Links


hpr1770 :: The OpenDyslexic Font

Released on 2015-05-15 under a CC-BY-SA license.

In this episode I talk about how you can take advantage of the OpenDyslexic font as a user, and also how as a content provider you can use it to help your readers. Incidentally, we also talked about this for a while during episode 1418, one of the 2013 New-Year shows.

Links


hpr1769 :: A Demonstration of Dictation Software on my Office Computer

Released on 2015-05-14 under a CC-BY-SA license.

Transcript Performed by Dragon Dictate [dumped "as is"]

Hi everybody! This is John Kulp In Lafayette, Louisiana. I am going to do a rather strange episode today. What I'm doing is demonstrating the dictation software that I use on the office computer that I have here at work. If you listen to my previous episodes, then you have heard me speak of the blather speech recognition program that I use on my Linux desktop, but as you may also remember, blather is not a dictation tool. Blather is a tool where you have to set up commands that will run other commands. In other words, you have to configure everything from scratch. I do have some capabilities for dictation on my Linux desktop, but they involve using the Google Web speech API and a special dictation box that I have set up, and these are not at all good for longform dictation. For serious dictation, such as writing letters and memos and other longform text, you really need a proper dictation tool. These are available built into the operating systems of Windows and Mac OS 10, but I normally use the Dragon naturally speaking software instead. I have found that it is more accurate and more powerful than the built-in versions that you can get on either Windows or Mac. That doesn't mean you shouldn't try out the built-in speech recognition on Windows and Mac, you definitely should, because I think you would be very impressed with him. I know for sure that the version on Windows learns from your voice and from the corrections that you make to the text that you were spoken, and eventually becomes very powerful in recognizing your speech. The biggest problem that I had with the Windows speech recognition was that it was a huge memory hog and frequently brought my system to a grinding halt. This is not good. Blather never does that, but then again bladder cannot take dictation. The latest system that I use for dictation is on a fairly recent Mac Mini running the nuance Dragon Dictate software. This is a very powerful dictation program that learns from your speech patterns and you can also add words to the vocabulary so that it will get them right when it hears them. This is especially important to do if you have frequently used unusual words, such as a name with an alternate spelling from what is normally in the program's dictionary. One of the great things about the Mac Dragon Dictate program, also, is its ability to do transcriptions of audio files. In fact the reason I am speaking this way is that I plan to use the transcription of this recording as the show notes verbatim without any corrections. The difficulty that most people have with dictation software at least initially is doing things like punctuation and capitalization. You have to remember to do these things or else your transcript will come out without any punctuation or capitalization, unless the words that you are speaking are known proper nouns. It also capitalizes automatically at the beginning of the sentences, so that if you use periods frequently then you will have capitalized words after those periods. You can see that I'm having trouble speaking this text in a fluent way, and this is one of the other difficulties that people have when initially using transcription software. It works best when you can express complete thoughts without pausing, because it learns from the context of your words. It has algorithms that calculate the possibility of one word or another based on the context, and so it is much better to speak entire sentences at one than it is to pause while trying to gather your thoughts. This is a major difference from trying to write at the keyboard, where it does not matter at all if you pause for seconds or even minutes while you think of what you want to write next. Anyhow, I highly recommend using some kind of dictation software if you suffer from repetitive strain injuries like I do. This will save you many thousands of keystrokes. Even if it's only using the speech recognition that's available on your phones over the web, that's better than nothing. The disadvantage of any of these services that have to send your recording over the web to get a transcription and then send it back into your device is that they will never learn your voice and your particular speech patterns. In order for that to work best, you really have to use a dedicated standalone speech recognition program that resides locally on your computer and saves your profile and learns from your speaking. Well, I guess that is about it for today, I hope you have enjoyed hearing this brief lesson on dictation. See you next time!

Links

Credits

------------------------------------------------------------

hpr1760 :: pdftk: the PDF Toolkit

Released on 2015-05-01 under a CC-BY-SA license.

Hacking Apart and Re-Assembling PDFs

Extract pages 3–5 from file foobar.pdf:

pdftk foobar.pdf cat 3-5 output excerpt.pdf

Same thing but also grab the cover page:

pdftk foobar.pdf cat 1 3-5 output excerpt.pdf

Combine multiple PDFs:

pdftk file1.pdf file2.pdf file3.pdf cat output combined.pdf

Reassemble a 50-page document with all of the pages in reverse order (I once actually did this for my wife and she was very grateful—she had scanned an article at the library and it ended up with all of the pages in the wrong order from last to first. This command solved her problem in about one second.):

pdftk wrongorder.pdf cat 50-1 output rightorder.pdf

Check the pdftk man page for all kinds of other manipulations you can do, including "bursting" a PDF into its component pages, rotating pages in any direction, applying password protection, etc.

Embedding “Bookmarks” as a Table of Contents

You can also use pdftk to embed a table of contents in a flat PDF file. This is incredibly useful, as it can make large, unwieldy files very easy to navigate. All you have to do is add some bookmark data in a fairly straightforward format as shown below. As a starting point you should that dump the current metadata content of the file with this command:

pdftk foobar.pdf dump_data_utf8

Save the contents of this data dump in a text file and then add bookmark information just below the NumberOfPages value. Here is an excerpt from the huge anthology of public-domain scores I assembled for my music history class:

InfoBegin
InfoKey: ModDate
InfoValue: D:20150106100000-06'00'
InfoBegin
InfoKey: CreationDate
InfoValue: D:20150106100000-06'00'
InfoBegin
InfoKey: Creator
InfoValue: pdftk 2.02 - www.pdftk.com
InfoBegin
InfoKey: Producer
InfoValue: itext-paulo-155 (itextpdf.sf.net-lowagie.com)
PdfID0: ece858bf9affbcad3b575cf3891a187f
PdfID1: 23f89459e103dd43c6e7bc92028245c0
NumberOfPages: 765
BookmarkBegin
BookmarkTitle: Beethoven: Symphony no. 5 in C minor Op. 67
BookmarkLevel: 1
BookmarkPageNumber: 205
BookmarkBegin
BookmarkTitle: Beethoven 5: I. Allegro con brio
BookmarkLevel: 2
BookmarkPageNumber: 205
BookmarkBegin
BookmarkTitle: Beethoven 5: II. Andante con moto
BookmarkLevel: 2
BookmarkPageNumber: 235
BookmarkBegin
BookmarkTitle: Beethoven 5: III. Allegro
BookmarkLevel: 2
BookmarkPageNumber: 256
BookmarkBegin
BookmarkTitle: Beethoven 5: IV. Allegro
BookmarkLevel: 2
BookmarkPageNumber: 275

And here is the command to update the PDF with the table of contents embedded. This tells it to take the input file foobar.pdf and update its metadata using the file foobar.info (with utf8 encoding) and output the results as foobar_with_toc.pdf.

pdftk foobar.pdf update_info_utf8 foobar.info output foobar_with_toc.pdf

Links

Update

I made a screencast as a follow-up, showing the process of embedding bookmarks to make a table of contents: https://m.youtube.com/watch?v=5dv_02v0zzc


hpr1754 :: D7? Why Seven?

Released on 2015-04-23 under a CC-BY-SA license.

In this episode I respond to one of the community-requested topics ("Music Theory") and try to explain what seventh chords are and why they are used. Below are some of the terms that I use in the course of the discussion.

  • Interval: The distance between two pitches (sounded either consecutively or simultaneously)
  • Consonance: Relatively stable sound between two or more pitches
  • Dissonance: Relatively unstable sound between two or more pitches. Dissonance often needs a "resolution" to consonance
  • Chord: three or more notes sounded together
  • Chord progression: a succession of chords
  • Triad: a chord with 3 pitches, the adjacent pitches separated by the interval of the 3rd.
  • Seventh chord: a chord with 4 pitches, the adjacent pitches separated by the interval of the 3rd.
  • Tonality: harmonic system that governs the use of major and minor keys
  • Tonic: the central tone of a piece of music
  • Mode: major or minor [e.g. Symphony no. 5 in C minor]
  • Modulation: the process of changing keys within a piece of music
  • Scale: Ascending or descending series of notes that define a key or tonality, with a specific arrangements of half-steps and whole-steps. Major and Minor scales are most common in Western music

Free public-domain music reference book: Music Notation and Terminology by Karl Wilson Gehrkens: http://www.gutenberg.org/ebooks/19499 (see ch. 18)

Free Online Music Dictionary: http://dictionary.onmusic.org/


hpr1750 :: xclip, xdotool, xvkbd: 3 CLI Linux tools for RSI sufferers

Released on 2015-04-17 under a CC-BY-SA license.

Basic commands

Type the words "foo bar" with xvkbd:

xvkbd -xsendevent -secure -text 'foo bar'

Types out the entire contents of the file "foobar.txt" with xvkbd:

xvkbd -xsendevent -secure -file "foobar.txt"

Send text to the clipboard:

xclip -i

Send clipboard contents to standard output:

xclip -o

Do virtual Ctrl+C key combination with xdotool:

xdotool key Control+c

Save this complicated command as an environment variable—then the variable "$KEYPRESS" expands to this command.

export KEYPRESS="xvkbd -xsendevent -secure -text"

Examples

With virtual keystrokes and CLI access to the clipboard, you're limited only by your imagination and scripting ability. Here are some examples of how I use them, both for the manipulation of text and for navigation. The words in bold-face are the voice commands I use to launch the written commands.

Capitalize this. Copies selected text to the clipboard, pipes it through sed and back into the clipboard, then types fixed text back into my document:

xdotool key Control+c && xclip -o \
| sed 's/\(.*\)/\L\1/' \
| sed -r 's/\<./\U&/g' \
| xclip -i && $KEYPRESS "$(xclip -o)"

Go to grades. This example takes advantage of Firefox "quick search." I start with a single quote to match the linked text "grades" and press the Return key (\r) to follow the link:

$KEYPRESS "'grades\r"

First Inbox. From any location within Thunderbird I can run this command and it executes the keystrokes to take me to the first inbox and put focus on the first message:

xdotool key Control+k && $KEYPRESS "\[Tab]\[Home]\[Left]\[Right]\[Down]" && sleep .2 && xdotool key Tab

single ex staff. Type out an entire Lilypond template into an empty text editor window:

xvkbd -xsendevent -secure -file "/path/to/single_ex_staff.ly"

Paragraph Tags. Puts HTML paragraph tags around selected text:

#!/bin/bash

KEYPRESS='xvkbd -xsendevent -secure -text'

xdotool key Control+c

$KEYPRESS '<p>'
xdotool key Control+v
$KEYPRESS '</p>'

Launching commands with keystrokes in Openbox

I normally use blather voice commands to launch the scripts and keystroke commands, but I have a handful of frequently-used commands that I launch using keystroke combos configured in the Openbox config file (~/.config/openbox/rc.xml on my system). This block configures the super+n key combo to launch my examplelink.sh script.

<keybind key="W-n">
  <action name="Execute">
	<startupnotify>
	  <enabled>true</enabled>
	  <name>special</name>
	</startupnotify>
	<command>examplelink.sh</command>
  </action>
</keybind>

Links


hpr1732 :: Renovating another Public-Domain Counterpoint Textbook

Released on 2015-03-24 under a CC-BY-SA license.

I mistakenly referred to episode 1516 while I was speaking. I meant to say 1512. The two musical bumpers I used in the show are by J.S. Bach, examples 90 and 91 in the textbook "Applied Counterpoint," by Percy Goetschius. These are my own MIDI renditions so they have no copyright burden upon them.

My html-to-epub conversion command (requires calibre):

ebook-convert foobar.html foobar.epub \
--output-profile=tablet \
--disable-font-rescaling \
--smarten-punctuation \
--change-justification=left \
--preserve-cover-aspect-ratio \
--cover=./pathto/cover.jpg \
--use-auto-toc \
--level1-toc "//h:h1" \
--level2-toc "//h:h3"

Links


hpr1657 :: Hacking Gutenberg eBooks

Released on 2014-12-09 under a CC-BY-SA license.

Links to stuff I mentioned in the podcast:


hpr1568 :: Blather Speech Recognition for Linux

Released on 2014-08-06 under a CC-BY-SA license.

Blather Speech Recognition for Linux: Jon has a conversation with his computer

In this episode I have a blather conversation with my computer. This is a sort of appendix to an episode I released earlier (hpr 1284 http://hackerpublicradio.org/eps.php?id=1284) which was a conversation with Jezra, the lead developer of the blather speech recognition program for Linux. The current episode will make much more sense if you listen to the previous one first.

For the most part I use blather as an accessibility tool, to manipulate my desktop and generally to save myself hundreds of keystrokes a day. This is important because of my repetitive strain injuries. Blather allows me to do many “productivity” tasks using only my voice. I also like to have fun with it, though, and this “conversation” is an example of the sort of goofy stuff I like to do. When the computer hears me say certain predefined phrases, it runs commands. For example when I say “what’s for dinner,” it shuffles the contents of a plaintext file that has about 20 options for dinner, chooses the top option and pipes it through my default text-to-speech program, which is either espeak or festival, depending on what I set as the environment variable in my blather startup script. When it hears me ask for certain other information, such as “what day is it?” and “what’s today’s date?”, it runs the appropriate system command and pipes the output through the text-to-speech program. For information about blather, the various back-end things that make it work, examples of my blather scripts and configuration files, visit the links below.


Links


hpr1538 :: Overhauling the School of Music website

Released on 2014-06-25 under a CC-BY-SA license.

I discuss the process of overhauling a badly out-of-date website to make it conform to accessibility standards and give it a responsive design. I also discuss how I came up with my own content management system by Bash scripting.

Links


hpr1512 :: Adopting and Renovating a Public-Domain Counterpoint Textbook

Released on 2014-05-20 under a CC-BY-SA license.

In this episode I discuss the problem of increasingly expensive college textbooks, and share with you the solution I devised to combat the problem in my counterpoint class at the University of Louisiana at Lafayette.

Part of the solution is to adopt a public-domain textbook that's more than 100 years old, and to give the text a 21st-century makeover that I believe will make it even better-suited for the digital age than any other comparable book in the market at any price.

http://jonathankulp.org/gratis.html: The counterpoint page on my website, with source files and information about my creative-commons counterpoint workbook, "Gratis ad Parnassum," as well as links to the 1910 counterpoint textbook by Percy Goetschius: http://en.wikipedia.org/wiki/Percy_Goetschius entitled "Exercises in Elementary Counterpoint."

My html version of the Goetschius textbook (in progress): http://jonkulp.net/350/Goetschius/goetschius.html


hpr1368 :: How to Fold a Fitted Sheet

Released on 2013-10-30 under a CC-BY-SA license.

How to Fold a Fitted Sheet

In this episode I try to teach you how to fold a fitted sheet, something that could earn you sheet-folding duties for the rest of your life. See the photo gallery at http://hackerpublicradio.org/eps/hpr1368/.

[Pictures recovered and uploaded to HPR 2015-06-19]


hpr1349 :: Melissa Dupreast helps me with Audio Compression

Released on 2013-10-03 under a CC-BY-SA license.

I impose upon Melissa Dupreast to help me learn about audio compression and I make a recording of our session for HPR. Missy is a professional audio engineer, working locally for radio and live sound reinforcement. She is also a recent graduate of our masters program at the University of Louisiana at Lafayette and is currently teaching 3 classes for us as an adjunct instructor.


hpr1339 :: Legacy Technology: My Victrola

Released on 2013-09-19 under a CC-BY-SA license.

I talk about and demonstrate my wonderful 1917 Victrola, purchased in Austin, Texas sometime around 1993 from a private individual.

Photo Gallery: https://pics.jonkulp.net/index.php?/category/14


hpr1313 :: How I Manage Contacts

Released on 2013-08-14 under a CC-BY-SA license.

How I Manage Contacts

About a year ago I decided to try to clean up my contacts.

The problem: CRUFT!

  • Importing, exporting re-importing in different accounts and in different email clients and several computers etc over span of ~10 years.
  • 1200+ gmail contacts
  • Many duplicates

What I wanted:

  • 1 set of contacts across platforms with single source file from which all others are generated
  • plain-text format, easy to use w/scripting & text editor
  • No duplicates
  • no cruft
  • easy to maintain
  • easy to import/export in T-bird, ownCloud
  • sync with phone

Steps to Success:

  1. Turn off Gmail default setting that saves every incoming email address in your address book
  2. Deleted all extraneous contacts (went from ~1200 down to about 400)
  3. Tedious part here: compare duplicates, consolidate info
  4. Decide on source-file format
  5. T-bird = LDIF
  6. OwnCloud = vCard
  7. LDIF wins b/c found script to convert to vCard, but not good script for other direction
  8. Convert all disparate contacts lists to LDIF, begin consolidating into one file
  9. LDIF ready? Import to T-bird
  10. Perl script to convert LDIF to vCard –> import to ownCloud
  11. CardDAV-sync to sync from o.c. to phone
  12. Bash script to create new LDIF entries, convert to vcf, add to master file easily

Wishlist

  1. Make t-bird sync w/owncloud (t-bird SOGO extension broken)
  2. CLI API to update owncloud contacts via a script instead of having to use the web interface

Links


hpr1304 :: Jon Kulp and His Son Talk Hacking

Released on 2013-08-01 under a CC-BY-SA license.

I chat with my son about the concept of hacking, Linux, Blacksmithing, and about some of the other stuff he does that smacks of hacking.


hpr1301 :: Conversation with Nybill and Jon Kulp

Released on 2013-07-29 under a CC-BY-SA license.

While I am on vacation near New York City, fellow HPR host NYbill drives down from upstate and we meet for the first time face-to-face. Of course we have to record a conversation for posterity. Topics include activities at LUG meetings, Cory Doctorow, Neal Stephenson, blather speech recognition (a live demonstration!), guitars, and more. Outtakes after the outro.

Links


hpr1299 :: What’s in my Bag

Released on 2013-07-25 under a CC-BY-SA license.

I go through the usual stuff in my bag. One thing I forgot to say is that my laptop is a Toshiba Satellite with i3 processor, 6gb of RAM, 750gb hard drive running Crunchbang Linux. Here are links to two of the items mentioned in the episode.


hpr1284 :: Blather Speech Recognition for Linux: Interview with Jezra

Released on 2013-07-04 under a CC-BY-SA license.

Jon's Recumbent Bicycle
A conversation with Jezra, sometime HPR host and the lead developer of the Blather speech recognition program for Linux.

Links:


hpr1282 :: My Homemade Recumbent Bicycle

Released on 2013-07-02 under a CC-BY-SA license.

Jon's Recumbent Bicycle
The Green ♲ Machine

In this episode I discuss my experience building a Recumbent Bicycle from donor bikes. A couple of things I forgot to mention while recording the podcast. First of all I had to use tandem bicycle cables for the brakes and the rear derailleur because they had to be very long. I also forgot to talk about the time when I was in a panic that the rear triangle was a bit out of alignment with the front, such that it would make the bike turn a little bit to the left by default. I called Andrew Carson and asked him if there was anything I could do to fix it and his solution was just awesome. What he told me to do was to put a spare hub in the rear triangle to keep the seat- and chain stays from collapsing together, lay the frame on the ground with the front end propped up on a step or something, and then just stand on it, jumping up and down slightly on it if necessary until I could feel it bend back a little bit. This actually worked! It straightened the frame right out. :) Finally, the total cost for this project was under $300. The most expensive single part of it by far was the powder coat, which cost $120. Here are links to resources mentioned in the podcast or simply of general interest.


hpr1280 :: Homemade Antennas for OTA Hi-Def TV

Released on 2013-06-28 under a CC-BY-SA license.

In this episode I discuss my experience building and using antennas for over-the-air hi-def TV.

Here are pictures of my two main antennas:

Bow-Tie style

Jon's bow-tie antenna

Gray-Hovermann style

Jon's gray-hoverman antenna


hpr1276 :: Two Hacker Public Radio hosts meet face-to-face for the first time

Released on 2013-06-24 under a CC-BY-SA license.

I have known windigo for more than 4 years as a virtual acquaintance, first on the Linux Outlaws forums, then on identica, and finally on the Federated Statusnet network. It was awesome when he and his girlfriend stopped by my house today to visit while on a massive road trip around the United States. We took advantage of the opportunity to record a brief conversation for Hacker Public Radio. Here's a photo of windigo, me, and Dingle the cat between us.

windigo, dingle, and Jon Kulp

Links


hpr1270 :: Fathers Day Special: Jon Kulp interviews his Dad

Released on 2013-06-14 under a CC-BY-SA license.

While my parents are visiting from Tennessee I take advantage of the opportunity to talk to my dad for awhile about his early days of computing. He has a PhD in statistics and has been using computers since the 1960s. we talk about his programming in Fortran and Cobol, about building Heathkit projects, about his duties as a VP for information technology at a small private university in Nashville, and about his more recent programming in Windows.


hpr1247 :: Recording Terrestrial Radio with bash scripts and cron jobs

Released on 2013-05-14 under a CC-BY-SA license.

In this episode I talk about my solution for capturing terrestrial radio so that I can listen to it at my own convenience. I use a bash script, cron jobs, and the streamripper package. here are some links to things I mentioned in the podcast.

Jezra's command-line audio player sap (simple audio player): http://www.jezra.net/projects/sap

Streamripper: http://streamripper.sourceforge.net/

Radio station KRVS 88.7 FM, Lafayette, Louisiana, USA http://krvs.org/

And you can see the whole radio-recording script here: http://jonathankulp.org/archives/647


hpr1197 :: What I do with bash scripts

Released on 2013-03-05 under a CC-BY-SA license.

In this episode I talk about the way I use shell scripting on a day-to-day basis. I am not employed in a technical field, so the fact that I use shell scripts at all surprises most people. I am just a music history professor with an enthusiasm for Linux and free software. Although I have dabbled a bit with Python, I don't feel nearly as comfortable with Python as I do with bash, so all of the scripts I mention in this episode are written for bash.

Here are links to blog posts about some of the scripts mentioned in the show.

markdown2latex: http://jonathankulp.org/archives/570

Cowsay stuff: http://jonathankulp.org/archives/346

"stick" scp script: http://jonathankulp.org/archives/441

MyIP: http://jonathankulp.org/archives/620


Become a Correspondent