Arabic-L:GEN:Unix hack for Arabic Web Pages

Dilworth B. Parkinson Dilworth_Parkinson at byu.edu
Mon Oct 29 19:08:33 UTC 2001


----------------------------------------------------------------------
Arabic-L: Mon 29 Oct 2001
Moderator: Dilworth Parkinson <dilworth_parkinson at byu.edu>
[To post messages to the list, send them to arabic-l at byu.edu]
[To unsubscribe, send message to listserv at byu.edu with first line reading:
           unsubscribe arabic-l                                      ]

-------------------------Directory-------------------------------------

1) Subject: Unix hack for Arabic Web Pages

-------------------------Messages--------------------------------------
1)
Date:  29 Oct 2001
From: dparvaz at unm.edu
Subject: Unix hack for Arabic Web Pages

Sometimes all you have is a UNIX terminal window. Here's a quick hack
that will grab a web page and display it in a transliteration system
based on Arabic morse code. In this transcripion the alphabet looks
like this:

ABTCJHODZR;S:XVUY"GFQKLMN?WI, and E=hamza.

Here's the two-line shell script:

#!/bin/sh
curl -Ls $1 | tr "A-Z" "a-z" | tr "\r\n" "  " | sed  -e "s/<p>/||/g"
-e "s/<.tr>/|/g" -e "s/<br>/||/g" -e "s/<[^>]*>//g" -e "s/ / /g"
| tr
"\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\
323\324\325\326\330\331\332\333\335\336\337\341\343\344\345\346\354\355"
"EAAWAEAB?TCJHODZR;S:XVUY\"GFQKLMN?WII" | tr "|" "\n" | tr -s " "

Cheers,

Dan.

--------------------------------------------------------------------------
End of Arabic-L:  29 Oct 2001



More information about the Arabic-l mailing list