Commits

Anonymous committed 8745254

Updated docs

Comments (0)

Files changed (3)

 New Features
 ============
 
-* Added *noorhtmls* interface for generating html files
-* Changing translation font for noorcgi and noorhtmls interfaces
+* handling text direction for ltr translations in noorhtmls
+* added html.fgcolor, html.bgcolor and gtk.fgcolor option
+* added cgi.url option
+* added common.arabic_numbers option
 
-The noorhtmls interface can be used to output quran in html files in a
-directory.  All you should do is to run::
-
-  noorhtmls.py output_folder
-
-The ``index.html`` file will contain the list of suras and
-``001.html`` through ``114.html`` files will contain the suras.  Note
-that the configurations specified in the ``~/.noor`` file are
-considered when generating the pages.
-
-Now you can change the translation font for noorcgi and noorhtmls
-interfaces by setting ``translation_font`` config in the ``html``
-section of ``~/.noor``::
-
-  [html]
-  translation_font = myfont
+See the `configuration file`_ section for the description of these new
+options.
 
 
 Getting Started
 ===============
 
+noorgtk
+-------
+
 For using the GTK interface you need to install Python_ and PyGTK_
 (they are installed by default in some linux distributions like
 Ubuntu).  You can start it by running ``noorgtk.py`` script either
 Noor.  After that you'll be able to run ``noorgtk.py`` in the terminal
 from any location.
 
+noorhtmls
+---------
+
+The noorhtmls interface can be used to output quran in html files in a
+directory.  All you should do is to run::
+
+  noorhtmls.py output_folder
+
+The ``index.html`` file will contain the list of suras and
+``001.html`` through ``114.html`` files will contain the suras.  Note
+that the configuration specified in the ``~/.noor`` file is considered
+when generating the pages.
+
+noorcgi
+-------
+
 Installing the CGI script, ``noorcgi.py``, is like installing any
 other CGI script.  You probably have to copy it to the ``cgi-bin``
 directory of your web server.  But before that you should either
-install noor as described in the previous paragraph or change the line
+install noor as described in the noorgtk_ section or change the line
 in ``noorcgi.py`` file which looks like::
 
   # Add noor to the python path if its not installed:
 you want to use the CGI interface you no longer need to install
 PyGTK_.
 
-
 Adding Translations
 -------------------
 
 ================  ==========================
 
 
+Configuration File
+==================
+
+You can specify configuration options in ``~/.noor`` file.  Here is
+the list of all options with a short description for some of them::
+
+  [common]
+  # the translation file
+  translation = /path/to/translation.file
+
+  # should noor use arabic aya numbers
+  arabic_numbers = 1
+
+  [gtk]
+  # the font to use
+  font = my font name 16
+  fgcolor = black
+
+  [html]
+  # the font to use
+  font = my font name 5
+  translation_font = my font name 4
+  fgcolor = black
+  bgcolor = white
+
+  [cgi]
+  # the url noorcgi.py is mapped to in the server
+  url = noorcgi.py
+
+
 License
 =======
 
 TODO
 ====
 
-* duplication for getting arabic_numbers config
 * Changing to ``A small Quran viewer``?
 * Adding a sample noorhtmls output to the homepage
 * Better noortest

noor/uihelpers.py

-# -*- coding: utf8 -*-
 import ConfigParser
 import os.path
 import unicodedata
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.