02.10.07
Posted in Projects, radio.py at 9:00 am by Guy
radio.py is a little script that makes it very easy to listen to radio under Linux (and maybe other OSs too) with mplayer. All you need to do is to call radio.py with the name of the station you want to listen to. For example:
radio.py Radio Paradise
or
radio.py BBC3
To read more about radio.py go to the first post discussing radio.py.
What’s New
Here are some of the things that have changed in radio.py-0.4 compared to the previous release (0.3). Read the rest of this entry »
Permalink
15.09.07
Posted in C/C++, Projects at 10:51 pm by Guy
After dealing with the seeding of srand(), I’ve realized that rand() just doesn’t give strong enough random numbers for some of my needs (e.g. strong password generator), so I decided to find a better solution. The solution came in the form of Random, a cryptography strong pseudo-random number generator class.
Read the rest of this entry »
Permalink
17.08.07
Posted in Projects, Python, radio.py at 1:44 pm by Guy
Download radio-0.3.tar.gz.
Update: radio.py-0.4 is now available.
I like listening to music and radio while working, and fortunately there are numerous ways to do that. Unfortunately, most ways that allow you to listen to radio are very resource consuming/memory hogs (such as listening to streaming-media via web-browsers) or very unfriendly to users (listening via mplayer for example). So, I set out to find a way that will use as little system resources as possible while keeping it user-friendly. One other requirement that I had, that I will be able to do all that from the command-line, so it will work great with GNU Screen and won’t require an X server (if I work without one).
I used for some time mplayer for listening to radio. I had a file with a list of web-radio streams URLs which I would copy and pass to mplayer -playlist. This method answered two of the requirements (minimal resources and command-line interface), but wasn’t really user friendly. So, I wrote a little wrapper script in python around mplayer - radio.py. After quick installation (download and extract the tar archive and copy radio.py to somewhere in you PATH), radio.py will allow you to listen to stations easily, and it will also do couple more things for you.
To listen to a station just call radio.py with the station’s name, e.g. in the command-line enter radio.py BBC1 to listen for BBC radio channel 1. To view a list of know stations run radio.py --list. Currently there aren’t many stations (just stations I thought that are needed or I listen to). You can easily edit radio.py to add new stations (the script is documented and very clear). If you do so, please write a comment or email me so I will be able to add those stations to next release by default.
So, as you seen radio.py allows you to easily listen to radio, as easy as writing the station’s name. But, as I said, it can do more things that I thought should be in a radio script. It has both a sleep feature (that turns off the radio after specified amount of time) and a wake-up feature (that starts the radio after a specified amount of time). This two features can be used together, and practically allow you to use radio.py as an alarm clock.
You can find more information about radio.py options by calling radio.py --help. I hope you will find this script useful as I do.
Download:
radio-0.3.tar.gz.
Permalink
26.07.07
Posted in Projects, Python at 8:43 pm by Guy
I use KDevelop as my main IDE and I’m pretty satisfied. KDevelop can create a source archive of the project’s source code automatically for you which simplifies the distribution of the project. Unfortunately the archive created isn’t ready for distribution. The user can’t just run ./configure ; make as he needs to run all the automake tools before. Not ideal for distributing. So you need to convert this source archive to a source package which is ready for the user to compile immediately
Read the rest of this entry »
Permalink
08.12.06
Posted in LaTex, Projects at 10:35 am by Guy
This guide is base on a guide published by Dekel Tsur that can be found here. Dekel Tsur’s guide was very good but now it is outdated since it doesn’t work with teTex 3.0. In this guide I addressed this issue and updated the instructions and scripts so it will work with teTex 3.0.Since the quality of the Hebrew metafonts that comes with the Hebrew LaTeX is quite poor, alternative fonts are needed. The best quality free Hebrew fonts are TrueType fonts (for example, the times new/arial/courier new fonts). Using TrueType fonts with TeX is somewhat complicated, but it is quite easy with pdfTeX, as pdfTeX has native support for TrueType fonts. This document explains how to use TrueType fonts with pdfTeX. Since Hebrew requires the use of the eTeX engine, you need to have the pdfelatex program. It is available in teTeX 1.0 (which comes with recent Linux distributions). The instruction below allows using nikud, although the result is quite poor as the nikud glyphs are not aligned correctly (but it is better than nothing).
Read the rest of this entry »
Permalink