We started producing shows as Today with a Techie 9 years, 9 months, 25 days ago. Our shows are produced by listeners like you and can be on any topic that "are of interest to Hackers". If you listen to HPR then please consider contributing one show a year. If you record your show now it could be released in 13 days.
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
What I Use It For
- 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.
- Text manipulation scripts, used in conjuction with blather. These do things like change text case, remove spaces, and so forth.
- Text entry. Voice commands insert various kinds of text templates or canned email responses for my classes. Also used in conjunction with blather.
- Adding or stripping HTML tags to/from selected text.
- Getting current weather conditions and forecasts, having results spoken back to me using system text-to-speech engine.
- Fun blather commands where I interact with my computer and have it talk back to me.
Favorite Python Modules/Libraries
|A cross-platform clipboard module for Python. (only handles plain text for now) https://pypi.python.org/pypi/pyperclip/1.5.11|
|A Python package supporting common text-to-speech engines on Mac OS X, Windows, and Linux. https://pypi.python.org/pypi/pyttsx|
|HTML parsing library. Beautiful Soup Documentation|
|A configurable HTML Minifier with safety features. https://pypi.python.org/pypi/htmlmin/|
|smartypants is a Python fork of SmartyPants, which easily translates "plain" ASCII punctuation characters into “smart” typographic punctuation HTML entities.|
|Changes 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|
|A name generator that uses Star Wars characters, species and planets to create un fisique names. https://pypi.python.org/pypi/swnamer/0.1.0|
Ryan Sipes: KLF Organizer; Systems Administrator, Northeast Kansas Library System; Organizer of Lawrence (KS) Linux User Group; with Ikey Doherty, Ryan is a developer for Solus (formerly Evolve OS); a contributor to Vulcan text editor, written in Vala (Ryan's KLF talk, "How to Write a GTK/Gnome Application", was pretty much a tutorial in Vala)
Ryan's projects and employer
KLF related interviews with Ryan Sipes
Evolve OS related interviews
- Lawrence Center for Entrepeneurship http://www.Larryville.com
- Free/Libre Open Source and Open Knowledge Association of Kansas http://openkansas.us
- In an effort to reduce the inventory of loneley beers waiting in my refridgerator for review, I've decided to add beer reviews to each of my tech episodes (hey, nobody complained when Dmitri did it).
Some tips on using ImageMagick
I like to use images in HPR shows if I can. I have experimented with various ways of preparing them since I first started contributing, but I'm particularly impressed with what I am able to do using ImageMagick.
ImageMagick system contains an enormous range of capabilities, enough for a whole series of shows. I thought I would talk about some of the features I use when preparing episodes to give you a flavour of what can be done.
I'm the rawest amateur when it comes to this kind of image manipulation. Just reading some of the ImageMagick documentation (see links) will show you what an enormous number of possibilities there are. I am only using a few in this episode.
I have prepared longer show notes and demonstrated some scripts to explain how I process images. These can be found here.
- Full show notes: http://hackerpublicradio.org/eps/hpr1822_full_shownotes.html
- EXIF Wikipedia page: https://en.wikipedia.org/wiki/Exchangeable_image_file_format
- exiftool: http://www.sno.phy.queensu.ca/~phil/exiftool
- Krita: https://krita.org/
Frank describes James Beard's simple and almost infallible recipe for making Hollandaise sauce with a blender.
The recipe from the _Theory_and_Practice_of_Good_Cooking_, used copies of which can be readily found via a web search. According to Amazon.doc, new copies are also available. Frank's copy is a first edition dating from 1977, though it's been used too much to be a collector's item.
From the LAMP Stack break-fix competition, to the breakfast buffet they funded on Sunday, the Rackspace crew presented their organization as the managed hosting company that puts the customer first, by making sure no customer has to wait in a long queue before taking to a human, and to staying on the line as long as it takes to make sure all problems are solved and all questions are answered. This kind of commitment to service naturally requires are larger number of people working tech support, and by the end of the weekend I think it was clear to everyone Rackspace was in Kansas to recruit. I was impressed when one of the Rackspace representatives told me, "We can teach people tech. We can't teach people to want to help other people". Rackspace dedicates a significant part of employee time to training and improving the skills of their help desk staff. If there is a drawback it's that when one shift is training, the other two are expected to pull extra hours to cover the third shift.
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.
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
- Convert Word documents to Clean HTML: http://word2cleanhtml.com/
The Hacker Public Radio network owns a Zoom H1 digital voice recorder. If you are going to attend an open source event and think you would like to record interviews for Hacker Public Radio, make inquires to the mailing list and the correspondent with the recorder in their possession (currently FiftyOneFifty) will send it to you. This episode is a review of the devices features and how to use them.
How to use the H1 as an USB Mic https://www.youtube.com/watch?v=GG8hZ6PvfrQ
The web site that started this all:
Big Muff Pi:
Picture of the gathered parts:
When I made the reference to "two red lips" regarding resistor colors I didn't quite explain what that meant. It was a way I learned, way back when, to remember which color was which number on a resistor. I hadn't thought about it in years. It used rhyming and references scheme to line the colors up with values.
0- Black - It's a "no" color, a zero 1- Brown - 'brow-one' 2- Red - Two red lips 3- Orange - Orange tree 4- Yellow - Yell for help 5- Green - a five dollar bill is green 6- Blue - Blue and sick 7- Violet - Violet heaven 8- Gray - Great 9- White - White wine
As you know, HPR asks for tags to be added to the episodes we contribute. These are intended to be used to produce some kind of improved topic search at some point in the future.
I find it difficult to decide what tags to add to my shows, and I expect many people feel the same way about it. Should I use common tags like Linux or does that not differentiate it enough? How many tags should I add, should the words be plural or singular?
We have recently been asked to contribute to the task of adding tags to previous shows, so it's very much a hot topic at the moment.
In thinking about this I wondered if there was a way in which existing tags could be represented in a visual way to help with the process of choosing and rationalising tags. It was the type of thought that occurs to you in the shower or while out for a walk.
In my last job I occasionally used a package called GraphViz to generate graphical representations. I used it to generate a chart showing how the organisation (a university) was divided up into schools, departments, sections and so on in a hierarchical manner. I wondered if it could be used for this task.
I decided to use my currently preferred scripting language, Perl, and found there was a module which let me access GraphViz. I started putting together a script.
The script was created in an evening and is still rather rough. It performs a very simple query on the database to obtain the show numbers of shows with tags, their titles and their tags. It then uses a CSV parser to parse the tag list and builds a hash table indexed by tags, where the contents per tag are the show numbers that use this tag.
Having built this hash table it is used to generate GraphViz data by making each tag and each show number a node and joining them together.
Finally the script processes the graph to produce output in SVG format which is available to view.
Bear in mind that this is not a finished project - it may never be finished! The script may not be ideal. My understanding of GraphViz may be insufficient, and the rendering of the SVG may not be good (I got various results on different browsers).
However, you might find it interesting or even useful. Feedback on the idea is welcome.
- GraphViz Wikipedia entry: https://en.wikipedia.org/wiki/Graphviz
- Graphviz website: http://graphviz.org/
- Perl script to visualise tags (HTML version): http://hackerpublicradio.org/eps/hpr1816_tag_visualise.html
- Output from the
tag_visualisescript as an SVG file: http://hackerpublicradio.org/eps/hpr1816_tag_visualise.svg
In the previous tutorial we looked at Presentation Styles, and I started with them because they were mostly similar to what we already covered in Writer when we looked at Paragraph styles. But Impress is a graphical product, so we need to wrap our heads around a different set of issues here. and that brings us to Drawing Object Styles.
For more go to http://www.ahuka.com/?page_id=1182