team4alfanous team mailing list archive
-
team4alfanous team
-
Mailing list archive
-
Message #00051
[Branch ~team4alfanous/alfanous/alfanous-git] Rev 233: minor fixes in output script:
------------------------------------------------------------
revno: 233
git commit: 0f90c5f5d37d0b52c32fc98f05a22dabf5b44436
committer: Assem Chelli <assem.ch@xxxxxxxxx>
timestamp: Wed 2012-06-06 23:48:15 +0100
message:
minor fixes in output script:
- fix the initial value of a CPT
- add identifiers section to results
- disable highlight for sura name and sura type
modified:
src/alfanous/outputs.py
--
lp:~team4alfanous/alfanous/alfanous-git
https://code.launchpad.net/~team4alfanous/alfanous/alfanous-git
Your team Alfanous team is subscribed to branch lp:~team4alfanous/alfanous/alfanous-git.
To unsubscribe from this branch go to https://code.launchpad.net/~team4alfanous/alfanous/alfanous-git/+edit-subscription
=== modified file 'src/alfanous/outputs.py'
--- src/alfanous/outputs.py 2012-06-06 08:46:25 +0000
+++ src/alfanous/outputs.py 2012-06-06 22:48:15 +0000
@@ -395,12 +395,18 @@
output["interval"] = {"start":start + 1, "end":end, "total":len( res )}
output["translation_info"] = {}
### Ayas
- cpt = start
+ cpt = start - 1
output["ayas"] = {}
for r in reslist :
cpt += 1
output["ayas"][ cpt ] = {
+ "identifier": {"gid":r["gid"],
+ "aya_id":r["aya_id"],
+ "sura_id":r["sura_id"],
+ "sura_name":keywords( r["sura"] )[0],
+ },
+
"aya":{
"id":r["aya_id"],
"text": Gword_tamdid( H( V( r["aya_"] ) ) ) if script == "standard"
@@ -426,9 +432,9 @@
"sura": {} if not sura_info
else {
- "name":H( keywords( r["sura"] )[0] ),
+ "name":keywords( r["sura"] )[0] ,
"id":r["sura_id"],
- "type":H( r["sura_type"] ),
+ "type": r["sura_type"] ,
"order":r["sura_order"],
"stat":{
"ayas":r["s_a"],
@@ -446,8 +452,9 @@
else {
"manzil":r["manzil"],
"hizb":r["hizb"],
- "rubu":r["rub"] % 4,
- "page":r["page"]
+ "rub":r["rub"] % 4,
+ "page":r["page"],
+ "ruku":r["ruku"],
},
"theme":{} if not aya_theme_info
@@ -472,7 +479,7 @@
}
}
- return {"search":output}
+ return {"search": output}