Sep 29, 2010

Blog theme up for grabs.

I'm not sure if anybody actually really wants to use this but a couple of guys asked me in the comments so I'm putting this up for download. It's a bit messy and hackish in some ways but it works I guess.

It relies heavily on fancybox and jQuery so you'll need to add those. Also uses syntaxhighlighter. If you look closely you'll find that there's a very rough, custom brush for syntaxhighlighter in here that's used for chordpro highlighting.


Download Template Here

Sep 22, 2010

Dhivehi for alQuran on iPhone is now LIVE!

grab it while it's fresh boys... in relation to my previous post here, Afxal an I have finally managed to push through the bundle to the public. Now this process is a wheeeeeeee hweeeeeeenee weeensy teeeeenee tiny bit risky so if you're very very unsure about it let somebody else help you out in installing.

Well there it is folks. Add to your cydia sources and enjoy!

As always, the release is issued under the terms of GNULesser license agreement.

Sep 21, 2010

Overhauling again

I decided that I needed to change the look of the page again. While I loved the pyrmont theme that I was using before, it appears that a lot of other people LOVE it too - not to mention most of them being blogs that I frequent. It was, in effect, beginning to get confusing.

SO! welcome to the new layout. I've made some changes and optimized things a bit and added a few nice features like adding automatic lightboxing to all pictures. Now it hardly uses any images to do the layout, and also relies heavily on jQuery. I'm quite pleased with how this one came out. I wanted to phase out as much of the distractions as possible and make it as clean and elegant as I could.

Do let me know if something is broken though :)

Sep 20, 2010

iPhone Dhivehi Quran Translation

After much hacking away at the iPhone's file system over the last two days, I've finally managed to get Unicode thaana stuff to display properly on the iPhone iOS 4.x

THE BAD NEWS is that people using older 2G iphones running 3.x firmware are still outta luck on the unicode front. I'm working on it though...

anyway as a by product of the aforementioned success, I've managed to put together a little hack that'll add the Dhivehi translation of the Quran (as found on ) into the alQuran app from

the package will be available from afxals cydia repo at so just add that up and you'll be good to go. also depends on afxals thaana package for iOS, and erica utilities. Also you'll need to have alQuran installed. *if you needed me to tell you that then....well...what the hell..?*

here are some screenshots of it in action! (I KNOW that the text appears on the wrong side...I CAN fix it I just chose not to for reasons of...elegance lets say)

on the licensing side, since this will inevitably "mix" with non-free code, I am releasing it under GNULesser/LGPL

Now if you're curious on how I got the "dhivehi" to appear on the keyboard selection popup ... well let's just say I'm working on it.


Sep 11, 2010

Experimental Thaana Spell-checking with Hunspell

During our (MOSS) recent meeting with the presidents office about the Zekr translation project, we came to realize that "spell checking" thaana writing is something that people really want - especially in government offices. This gave me incentive to follow up on my previously failed experiments with this.

[NOTE: I am aware that this feature is available in "Xiosis Scribe", however their approach to this appears to be somewhat lacking and IMHO disappointing. Also, the closed source nature of their system pisses me of]

I decided to try and implement this by building a custom dictionary for hunspell. This approach has several advantages too great to be ignored. a) it eliminates the need to write the spell-check engine from the ground up. b) It provides immediate integration into software like openoffice and firefox (and potentially even MSWord) to name a few. Of course there is the risk that it might not be able to handle dhivehi's "rules" - but as I always say if the Arabs and the Hebrews can do it - and it has been done - then so can we.

So I used the scripts I wrote for The Radheef project to generate words, and wrote a simple affix file to munch it down with. Using a dictionary comprising of all the "headwords" in the Radheef, and this affix file I was able to obtain some promising results - enough to convince me that it just may be possible to achieve reasonable results using Hunspell.

and the saga continues...

The contents of the Affix file

The test file to run the spell check on

We give hunspell a chance to process it...

and this is the resulting output ("misspelled" words with their suggestions)

I hope I got the attention of some talented young out there and hope that you take an interest in this.

Sep 9, 2010

Get rid of MV Boli on Windows 7/Vista/Xp

some time ago our dear friend MoyaMeeha wrote on how to "get rid of the damned boli font" on Windows XP and whatnot. Unfortunately Windows Vista broke the tool that was used..and it remained broken in windows 7.

Sadly though, MV Boli remains to haunt us.

FORTUNATELY though, it appears to be a relatively simple task to rid ourselves of this menace!

WARNING: Always make a backup of your registry before editing it.

The fix involves changing out two registry keys. I'm not entirely sure if changing the first one is absolutely necessary, but we'll do it anyway for good measure.

in the start menu search bar, type "regedit" and open it. (XP users type regedit in the Run dialog)
Once in the registry editor navigate to

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts]

Here you'll see a listing for a bunch of fonts. Scroll down until you find the name of your REPLACEMENT font (eg MV Faseyha). Double click this, and copy the value. Now scroll to where it says "MV Boli", double click it and paste the value you just copied into the dialog box. Click ok. Also make a note of the NAME of the replacement font. Choose the replacement font wisely. It has to be a good unicode font. I recommend MV Faseyha, Faruma or one of the fonts from the Iyyu or Elaaf family of fonts.

Now navigate over to
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes]
from here find the key "MV Boli", double click it and change the value to the name of the replacement font exactly as it was in the previous list (without the "(open type)" bit) eg. "MV Faseyha","MV Iyyu Formal" etc...

save and exit. Then restart your system. Boli should be replaced now.

IF you're feeling super lazy, I've put together a small registry patch file that should do the work for you. However I do not recommend using this as the font file name and stuff may differ between systems.

Download HERE

thanks apo and ÎĦΣçҜәѓ™ for the help testing this out.

Dict Database for Dhivehi Radheef Update

I'm releasing a minor update to the previously released database.

by minor I mean a complete overhaul - I had to rewrite the entire conversion script because of the recent "hard drive crash". I've managed to fix the "number reversal" problem, and also changed the formatting a little. Also included in the dictionary now are additional information about the words like "kan ithuru","nan ithuru" and so on....

Otherwise everything is pretty much the same. Installation instructions can be found on the previous post HERE

updated files are here:
RAW zip:
deb :

Sep 6, 2010

Zekr: Changing Translation Display Font

Since I wrote about the availability of Dhivehi translation text for Zekr: The open source quranic study software, I've received numerous complaints about being unable to change the font that is used to display the text. Brother Mohsen of the Zekr project was kind enough to help us out.

(This article also titled: getting rid of or changing MV Boli font in Zekr) - that DAMNED boli font!

in Zekr, goto Tools->Options and select "View" from the side column. From here click the add (+) button to add a new setting key and call it "trans_dv_fontName" and click OK. You can now change the value assigned to this key and add "MV Faseyha" (or any other font you like).

You can also add "trans_dv_fontSize" to specify the size of the translation text.

On a side note, if you want the Quranic text to display nicely, download and install the me_quran font from

Sep 4, 2010

ADSL Usage checker update

I took some time today to revamp the ADSL usage checking script I wrote some time ago and added a few more features like the ability to output more detailed information.

I added a few more options like the ability to customize the output string, check for updates, and so on and so forth. Here's the updated script. It's a bit lengthy...

# Ugly Dirty yet functional script to check ADSL
# usage statistics for Dhiraagu subscribers.
# type ./dslusage -h for options
# This script is provided as is, without liabilities
# or guarantee.
# 2010 KudaNai -

username= #your login name
password= #your password here
package_allowance=20 #must be specified

#End of configuration section.
fmtstring="DSL Usage:\tGBUSEDGb / GBALLOWGb ( GBLEFTGb remaining)" #Default format string

function pusage() {
 echo -e "\tUSEAGE: ${0} "
 cat ${0} | tail -n 23 | sed "s/#//g;s/VERSION/${version}/g"

function error() {
 echo -e "ERROR: $1\n"
 if [ -z $2 ];then pusage;fi
function checkupdate() {
 if [ -z $(which curl) ];then error "This functionality requires cURL. Please install it and try again" 1;fi
 local ver=$(curl --silent
 if [ $(expr ${ver} \> ${version}) -eq 1 ]
  echo "A newer version ${ver} is available online."
  echo "You are probably using the latest version."

while getopts 'vVUhu:p:f:' OPTION
 case $OPTION in
  u) username=${OPTARG};;
  p) password=${OPTARG};;
  a) package_allowance=${OPTARG};;
  v) fmtstring="Dhiraagu ADSL Usage Details as on\n`date`\n\nCustomer:\tSUBSCRIBER (USERID)\nPackage:\tPACKAGE_NAME\nusage period:\tBILLING_START to BILLING_END (BILLING_CYCLE)\n\nDSL Usage:\tGBUSEDGb / GBALLOWGb ( GBLEFTGb remaining)";;
  V) cat $0 | tail -n 5 | sed "s/#//g;s/VERSION/${version}/g";exit;;
  f) fmtstring=${OPTARG};;
  U) checkupdate;exit;;
  h) pusage;;
  ?) pusage;;

if [ -z $(which img2txt) ]; then error "You need to install caca-utils before proceeding" 1;exit;fi
if [ -z $(which wget) ];then error "You don't have wget installed...seriously?" 1;exit;fi
if [[ -z ${username} || -z ${password} || -z ${package_allowance} ]]; then error "You need to specify username and password";fi

cd /tmp # ---------------here on down everything is done inside temp
wget --quiet --no-cache --post-data "web_user=${username}&web_pass=${password}" -p
if [ ! -f "" ];then error "Invalid username/password" 1;fi

OIFS="{$IFS}"; IFS=$'\n'
for LINE in $(sed -n 's/.*"#000080" size="2">\([^<]*\).*/\1/p';sed -n 's/.*through \(.*\) to \([^<]*\)<.*/\1\n\2/p'

gstring=$(img2txt -H 400 -W 4 -d none -f ansi
gtotal=$(echo "${gstring}" | grep 44 | wc -l)
gused=$(echo "${gstring}" | grep 43 | wc -l)
gbused=$(echo "scale=3;${gused} / ${gtotal} * ${package_allowance}" | bc -l)
gbleft=$(echo "scale=3;${package_allowance} - ${gbused}" | bc -l)

echo -e "${fmtstring}" | sed "s/SUBSCRIBER/${ARR[0]}/g;s/USERID/${ARR[1]}/g;s/PACKAGE_NAME/${ARR[2]}/g;s/BILLING_CYCLE/${ARR[3]}/g;s/BILLING_START/${ARR[4]}/g;s/BILLING_END/${ARR[5]}/g;s/GBUSED/${gbused}/g;s/GBLEFT/${gbleft}/g;s/GBALLOW/${package_allowance}/g;"

rm -r
# -a Specify package allowance for limited connections.
# -f Define custom format string.
# -h Print this help.
# -p Specify password.
# -u Specify username.
# -U Check for updates.
# -v Verbose output. Print more details.
# -V print version information and exit.
# The format string can by anything containing any of the following
# special variables which will be substituted with appropriate values.
# use \n,\t for newlines and tabs.
# Dhiraagu DSLUsage checker
# 2010 - KudaNai [ ]