Assalamu `alaykum,

Alhamdulillah, I’ve created bok2tex:

A Python tool to convert a المكتبة الشاملة .bok file to xetex/PDF.

Requires MDB tools (mdbtools).
Requires the Scheherazade font from SIL.
Requires a recent version of XeTeX (e.g. via TeXLive).

Right now the tool generates a PDF sized for Kindle DX’s screen, and works only on GNU/Linux because of the mdbtools dependency. Unfortunately, Maktaba Shamila uses the dreadful Microsoft Access Database file format (.bok, ie. mdb), so mdbtools is needed to convert it to the platform independent and Free/Libre/Open Source SQLite database file format.

Home page of the project:
http://bitbucket.org/edin1/bok2tex

You can install it with:
pip install http://bitbucket.org/edin1/bok2tex/get/tip.zip

Here’s an example generated PDF file of the Risala al-Mustarshidin of Imam Haris al-Muhasibi:
risala-al-mustarshidin.bok

Note that there’s also a projects that aims to provide a shamela like experience on GNU/Linux systems called Thawab.

This script allows you to edit files in one, and only one, Emacs frame (window). Save this as an executable somewhere in your path (i.e. as ~/bin/e).

#!/bin/bash
export GDK_NATIVE_WINDOWS=1
if [ "$(pgrep emacs)" ]
then
  exec emacsclient -n "$@" 2>/dev/null
else
  exec emacs "$@" & disown
fi

In addition, you have to call (server-start) in your .emacs file.

You can call this script as an executable (don’t forget to run chmod 755 ~/bin/e) from anywhere you like (e.g. e ~/myfile.txt), and it will open the file for editing in a new or existing Emacs frame. If you call this in a terminal, it won’t wait for the Emacs server, but will immediately return to your terminal session.

Guangzhou

April 6, 2010

God willing, next week, I’ll set out for Guangzhou, in order to visit the Canton Fair. Here’s some useful stuff I collected on the net:

Learning the spoken Cantonese language

Update: Don’t bother learning Cantonese, learn Mandarin instead.

Yes, people in China speak in different dialects/languages, and Cantonese is spoken in Guangzhou. There’s plenty of resources on the net for this language, even some videos, but the most natural way of learning for a beginner, that I stumbled upon, is perhaps the course Learn Cantonese at learnchineseez.com.

This course teaches you the language from the ground up, well… almost. You start by learning simple words, than simple phrases composed of those same words. In this way, you build a firm foundation, and get instant gratification.

This method is very similar to the way a child learns to speak. First you learn to speak tones/syllables, than words, than sentences etc. The only thing which I found problematic with learnchineseEZ.com, is that you don’t get to learn the basic tones of the language. But still, this would require a lot of dedication on part of the student, and isn’t crucial.

Hotels

There are a lot of hotels in Guangzhou, but if you want the best hotels during the Fair, you have to book very early.

Other tips
Be sure to check-out the TripAdvisor Guangzhou forums

These are some tips I got from a very friendly Guangzhou-informed person I contacted via TripAdivsor:

Mosques – as far as I know, probably just 2-3 or them – are all in the same area (west part of the city centre).

Huan Shi Zhong Lu is the street where a lot of halal restaurants are.

Do you need to be “very” careful with pickpockets in GZ? Oh yes, I’d be over-alerted rather than otherwise. It happened to me twice – lost a brand-new mobile phone on a bus (another time almost lost it but managed to scare the thief to hand it out before he tried to get off) and lost my wallet as I was walking in the street and someone (Urguis) unzipped my bag! It can be avoided easily though, just try not to use rucksacks, keep your valuables (DC, mobile phone, passport, wallet) in sights at all times. Walk alone – that’s okay, as long as it’s not too late – say later than 11pm. Just keep away from small and dark streets, you’ll be fine.

Eternal Bash history

March 22, 2010

After reading “Bash eternal history” (I think I picked it up via FriendFeed) I put the following lines in my .bashrc file:

export HISTTIMEFORMAT="%s "
PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND ; }"'echo $$ $USER "$(history 1)"|python -c "import sys,time;cli = sys.stdin.read().split(None,4);print \" \".join([cli[0], cli[1], cli[2], time.strftime(\"%Y-%m-%d %H:%M:%S\", time.localtime()), cli[4]])," >> ~/.bash_eternal_history'

The Python bits I added put a human readable timestamp in the file, instead of the standard UNIX timestamp.

Watch out of putting your passwords on the command line!

Just a quick post, maybe I’ll expand it later. (2010-03-11)

With the recent proliferation of social networks (the latest buzzword is Buzz), RSS, file-sharing, I think the Internet will converge to a pay per byte model, where you would pay for data-bytes that you get from someone you “follow”, or receive “messages” from.

The telecoms would act as a mere mediators.

This would also help the regular Joe out there easily charge for the content he produces. Web sites wouldn’t get in the ridiculous situation where the more hits you have, the more *you* have to pay to the ISPs.

This would in turn remove adds from web “pages” (better yet: services) and help the spreading of Free/Open Source “content”, because every time you’d download something, you’d pay for it. No adds also means no bias towards some companies.

OpEdNews – Article: Member of the Swiss Political Party that Pushed for Minaret Ban Converts to Islam.

John McCreessh of MeallDubh.org writes:

When I compiled the OpenOffice.org Strategic Marketing Plan for the Community back in 2004, I wrote on the back cover:

What do you do if you have a product that’s as good as anything on the market, but you want to give it away?

And what if your major competitor already has a virtual monopoly in the market, and spends between $5,000-$10,000 million per annum on advertising?

With cento milioni downloads this year, OpenOffice.org hasn’t done too badly against Microsoft Office, and with new releases of both products due in 2010 the battle will continue. Microsoft are clearly gearing up for the contest. One of our marketing volunteers spotted an interesting Microsoft job advert – I’ll quote from it below in case they pull the ad:

Job Category: Marketing

Location: United States, WA, Bellevue

Job ID: 700901 9914

Division: Marketing

Linux and Open Office Compete Lead, US Subsidiary (CSI Lead)

If you’re looking for a new role where you’ll focus on one of the biggest issues that is top of mind for KT and Steve B in “Compete”, build a complete left to right understanding of the subsidiary, have a large amount of executive exposure, build and manage the activities of a v-team of 13 district Linux & Open Office Compete Leads, and develop a broad set of marketing skills and report to a management team committed to development and recognized for high WHI this is the position for you!

The Commercial Software Initiative (CSI) Lead plays a pivotal role for the Subsidiary GM, the BG leads and the BMO by building a discipline within the US that is focused on competing against. The core mission of CSI is to win share against Linux and OpenOffice.org by designing and driving marketing programs, changing perceptions, engaging with Open Source communities and organizations, and drive internal readiness on how to compete with Commercial Linux and participate with Open Source Communities.

(my emphasis)

If you share our belief that several hundred marketing volunteers around the world can be more than a match for 14 hired hands in the US (and how many more worldwide?) and want to join in the fray, please join the OpenOffice.org Marketing Project and have a great 2010!

via Meall Dubh » Blog Archive » Race against the machine.

Cairo has deported British lawmaker George Galloway, following clashes between a Gaza-bound aid convoy he was accompanying and Egyptian police.

The lawmaker was planning to return to Gaza via the Rafah crossing early Friday when several Egyptian plainclothes security forces detained him and bundled him into a plane and flew him to London.

via Egypt deports British lawmaker Galloway.

وَلِلَّهِ عَلَى ٱلنَّاسِ حِجُّ ٱلْبَيْتِ مَنِ ٱسْتَطَاعَ إِلَيْهِ سَبِيلًا ۚ وَمَن كَفَرَ فَإِنَّ ٱللَّهَ غَنِىٌّ عَنِ ٱلْعَـٰلَمِينَ

…and pilgrimage to the House is incumbent upon men for the sake of Allah, (upon) every one who is able to undertake the journey to it; and whoever disbelieves, then surely Allah is Self-sufficient, above any need of the worlds.

Hodočastiti Hram dužan je, Allaha radi, svaki onaj koji je u mogućnosti; a onaj koji neće da vjeruje – pa, zaista, Allah nije ovisan ni o kome.

The Holy Qur’an, sura Ali-Imran: 97

لَبَّيْكَ اللَّهُمَّ لَبَيْكَ, لَبَّيْكَ لَا شَرِيكَ لَكَ لَبَّيْكَ. إِنَّ الْحَمْدَ وَ النِّعْمَتَ لَكَ وَ الْمُلْكَ, لَا شَرِيكَ لَكَ.

The Distributed Proofreaders (Europe) project has restarted the proofreading process of the Edward William Lane’s Arabic-English lexicon.

The DP project gathers book enthusiasts from around the globe, and gives them a nice and intuitive web interface for proofreading (i.e. converting to plain text) out-of-copyright books. Up until now, several hundred books were posted to Project Gutenberg from DP.

The second round of proofreading the Lane’s lexicon is going rather slowly, because of lack of proofreaders. Unfortunately, potential proofreaders are usually discouraged by the requirement that they proofread 50 pages from easier first round projects, before being allowed to proofread a second round project, such as the Lane’s lexicon.

If you have spare time, please consider contributing to the project.

DP forum thread dedicated to the project:
http://dp.rastko.net/phpBB2/viewtopic.php?t=1854
Proofreading page (requires registration and proofreading of at least 50 pages from first round projects):
http://dp.rastko.net/tools/proofers/proof.php?project=projectID4ac8cbe491c31

Follow

Get every new post delivered to your Inbox.