04.05.08

spass 1.1 - Secure Password Generator

Posted in C/C++, Projects, spass at 11:14 pm by Guy

This is a new version of my /dev/random based secure password generator - spass. The new version doesn’t have new features, it’s mainly a bug-fix release. The package now uses autotools, which means it has the standard configure script and makefile. I also fixed some typos in the help message. Overall the new version doesn’t offer anything new compared to the old one, except for easier installation.
Read the rest of this entry »

30.04.08

mctext 0.2 - A Markov Chain Text Generator

Posted in C/C++, Projects, mctext at 8:41 pm by Guy

This is the second release of my Markov Chain text generator - mctext. This text generator takes existing sample text, and generates a new text using Markov Chains.

The main new thing in the version in that it allows the users to specify via the command line how many words should be considered when generating the next one. The bigger the step number the closer the generated text is to the original one. The value used in mctext-0.1 was 2, and this is also the default in this one. The number of steps can be set using the --steps command line switch.
Read the rest of this entry »

19.03.08

Scanning Documents Written in Blue Ink - biscan

Posted in Projects, biscan at 1:08 am by Guy

After writing the post on converting PNMs to DjVu I’ve ran into some trouble scanning documents written in blue ink. The problem: XSane didn’t allow me to set the threshold for converting the scanned image to line-art (B&W). So, I tried scanning the document in grayscale and in color and convert it afterwards to bitonal using imagemagick. This ended up with two results. When I used the -monochrome command line switch, the conversion looked good, but it used halftones (dithering), when I tried to convert it to DjVu it resulted in a document size twice as large as normal B&W would. The other thing that I tried is using the -threshold switch. The DjVu compressed document size was much better now, but the document was awful looking, either it was too dark, or some of the text disappeared. After giving it some thought I knew I can find a better solution.
Read the rest of this entry »

11.03.08

Convert PNMs to DjVu

Posted in Bash, Projects at 11:47 pm by Guy

I’ve decided to scan some notebooks. After researching a bit, I’ve decided to use DjVu (instead of PDF which I normally use). I’ve chose to use DjVu because it offered great quality with very good compression rate (~26KB per page) in lineart (black and white).

While XSane can natively save a multipage project into PDF it can’t do so for DjVu. So, the solution is to use the PNMs generated by XSane and convert them using the command line tools offered by DjVuLibre to bundle them together to a DjVu file. As you can guess doing this manually is pretty hard work. To make this task easier I’ve written a small bash script to automate the process.
Read the rest of this entry »

01.03.08

Backup Directories To Amazon S3 Script

Posted in Bash, Linux, Projects, Tips at 11:12 pm by Guy

This is a small script I wrote today, to automate my backups, which I do on Amazon S3. This is fairly short, yet useful bash script that utilize the s3cmd to do the actual sending of the files.
Read the rest of this entry »

10.02.08

Fixing the Home Link in the Telem System (OpenU)

Posted in Greasemonkey, Projects at 11:55 am by Guy

This post can be helpful for students of the Open University of Israel. As a student there, I found it very annoying that the link to the courses’ homepage in the Telem system is a JavaScript link. This prevents it from opening in a new tab, and thus require various workarounds to get back to the homepage in a different tab. So, a little while ago I wrote a little Greasemonkey script to fix it.

// telem.user.js
// version 0.1 
// 2008-01-01
// Copyright (c) 2008, Guy Rutenberg
// Released under the GPL license
// http://www.gnu.org/copyleft/gpl.html
//
// ==UserScript==
// @name          OpenU's Telem - Fix Home Button
// @namespace     http://www.guyrutenberg.org/
// @description   Fixes the home button link in the telem system of the OpenU.
// @include       http://maagar.openu.ac.il/opus/*
// ==/UserScript==
 
 
home = document.getElementById('home');
if (home) {
	re = /javascript:find_home_page\('(.*?)','(.*?)',/
	match = re.exec(home.href)
	home.href = 'http://telem.openu.ac.il/courses/'+match[2]+'/'+match[1]
}

This script changes the link to a regular non-JavaScript link. I’ve tested it for more than a month now, without finding any bugs. However if you find something, or have any suggestion, please comment.

Update: See A Greasemonkey Fix to the Top Menu in Sheilta (Open University), it has a fix for the top menu bar in the Sheilta system

29.01.08

mctext - Using Markov Chains to Generate Text

Posted in Projects, mctext at 10:37 am by Guy

mctext is a new project of mine, focusing on text generation using Markov Chains. This little utility reads a sample text file, preferably a large one, and generates new text based on the semantics given in the sample text.
Read the rest of this entry »

28.12.07

Convert CSS layout to RTL - cssrtl.py

Posted in Projects, Python at 11:28 am by Guy

This is a re-release of a script of mine that helps convert CSS layouts to RTL. I originally released it about a year ago but it was lost when I moved to the new blog. The script, cssrtl.py, utilizes a bunch of regular expressions to translate a given CSS layout to RTL.

Read the rest of this entry »

20.10.07

spass - A Secure Password Generator Utility

Posted in Linux, Projects, spass at 9:22 pm by Guy

spass is a secure password generation tool. spass was designed under the assumption that a password generator is as good as its random number generator, so spass uses the Random class, a /dev/random based cryptography strong random number generator class. As always, I tried to make a user-friendly as possible command-line interface (as much as a command-line interface can be friendly).
Read the rest of this entry »

02.10.07

radio.py-0.4 - Listening to Radio the Easy Way

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 »

« Previous entries