New Projects - Fresh from the Labs
I've highlighted a few language programs in this column, but so far they've been for Japanese, Chinese and German—all languages spoken by large populations. So a dictionary program for a language like Serbian jumped right out at me. According to the SourceForge page: “Serbian Dictionary is a bidirectional Serbian-English dictionary. It currently contains only a command-line interface. It supports only *nix-based operating systems at this moment. Tested on Linux, *BSD and Cygwin.”
I found only a source tarball at the Web site at the time of this writing, although the installation still is quite easy. Also, the home page is in Serbian, and I had to use a translator (Chrome's translator handled this well). The download page at least is called “Download”, so that was easy. The download page takes you to a basic SourceForge file list, which should be localized into your own language.
Grab the latest tarball, extract it, and open a terminal in the new folder. Compiling this program is easy, just enter:
If your distro uses sudo, enter:
$ sudo make install
And, if your distro uses root, enter:
$ su # make install
Using SerbDict also is very easy (at least, once I'd translated the documentation). If you want to translate something from English into Serbian, enter:
$ serbdict -e word
If you want to translate a Serbian word into English, enter:
$ serbdict -s word
SerbDict appears to query a database of words and terms, and it outputs everything, including extensions of your queried word. For instance, querying the word “entire” gave me not only translations for entire, but also for entirely and entirety.
If you speak Serbian (and I don't), there's a man page with instructions on how to extend the program, available with the command:
$ man serbdict
One thing I managed to pick up from the man page is that if you skip the -s and -e extensions, any query you make will output any matches in both English and Serbian at the same time.
Below your outputted text will be a message saying, “Ukupno: x prevoda”. After querying those words, it turns out Ukupno means altogether. And although “prevoda” didn't return any matches, prevod means rendering, translation or version, so I'm guessing prevoda would be some kind of plural form of these words.
Well, that covers Serbian, but if anyone has written a program for a really rare or dying language, send me an e-mail. I'd love to cover it.
You know I love niche projects, but this is the first project I've come across that genuinely made me laugh out loud and exclaim, “I've got to cover that!” To quote the Web site: “ ebook2cw is a command-line program (optional GUI available) that converts a plain text (ISO 8859-1 or UTF-8) e-book to Morse code MP3 or OGG audio files. It works on several platforms, including Windows and Linux.”
Quoting the documentation:
1) Binaries: statically compiled binaries are available at the project Web site, for Linux (i386) and Win32. Those should be suitable for most users.
2) Source: a Makefile is included; it compiles both under Linux and Windows (with MinGW).
Library requirements are mostly minimal, but for the source, you will need the development packages (-dev) installed for the lame and ogg libraries.
If you're running with the source, grab the latest tarball, extract it, and open a terminal in the new folder. Compiling this program is also easy. Again, just enter:
If your distro uses sudo, enter:
$ sudo make install
If your distro uses root, enter:
$ su # make install
ebook2cw is a command-line program and using it is fairly simple, although you'll want to keep the man pages at the ready for using something other than the default parameters. The basic syntax is as follows:
$ ebook2cw textfile.txt -o outputfile
Here, the textfile.txt obviously represents whichever text file you want to convert to Morse code. The -o switch is for specifying the output file, followed by the output file's name. Notice I haven't given the output file an extension, such as mp3. ebook2cw does this for you automatically, and I actually recommend against doing so, as the resulting filename becomes rather messy.
I don't have the space to go into detail on ebook2cw's command-line switches, but I can at least highlight a handful that will be the most useful to the majority of users.
If you want to switch from MP3 output to Ogg, use the switch -O (note the uppercase letter).
The sample rate is set by default to 11khz @ 16kbps—perfectly adequate for a series of dots and dashes, but sometimes it's a bit clippy and horrid to listen to. If you want to change the sample rate to 44khz, for instance, use the switch: -s 44100. To change the bitrate, using this combination, set the bitrate at 64kbps: -b 64.
You can work things out from here, but I hope you enjoy the results. Maybe the works of Dickens are even better, slowly spelled out one letter at time? Either way, this project has probably given me the biggest grin since I started this column. I'm sure it'll be very useful—to someone.
John Knight is the New Projects columnist for Linux Journal.
Practical Task Scheduling Deployment
July 20, 2016 12:00 pm CDT
One of the best things about the UNIX environment (aside from being stable and efficient) is the vast array of software tools available to help you do your job. Traditionally, a UNIX tool does only one thing, but does that one thing very well. For example, grep is very easy to use and can search vast amounts of data quickly. The find tool can find a particular file or files based on all kinds of criteria. It's pretty easy to string these tools together to build even more powerful tools, such as a tool that finds all of the .log files in the /home directory and searches each one for a particular entry. This erector-set mentality allows UNIX system administrators to seem to always have the right tool for the job.
Cron traditionally has been considered another such a tool for job scheduling, but is it enough? This webinar considers that very question. The first part builds on a previous Geek Guide, Beyond Cron, and briefly describes how to know when it might be time to consider upgrading your job scheduling infrastructure. The second part presents an actual planning and implementation framework.
Join Linux Journal's Mike Diehl and Pat Cameron of Help Systems.
Free to Linux Journal readers.Register Now!
- SUSE LLC's SUSE Manager
- My +1 Sword of Productivity
- Managing Linux Using Puppet
- Murat Yener and Onur Dundar's Expert Android Studio (Wrox)
- Non-Linux FOSS: Caffeine!
- Tech Tip: Really Simple HTTP Server with Python
- Doing for User Space What We Did for Kernel Space
- Parsing an RSS News Feed with a Bash Script
- SuperTuxKart 0.9.2 Released
- Rogue Wave Software's Zend Server
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide