Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move to amiri font #23

Merged
merged 1 commit into from
Sep 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ PREFIX?=$(DESTDIR)/usr
datadir?=$(PREFIX)/share
INSTALL=install
PYTHON=/usr/bin/python3

SOURCES=$(wildcard *.desktop.in)
TARGETS=${SOURCES:.in=}
TEST_DEPS=0

all: $(TARGETS) icons othman-data/ix.db

Expand All @@ -23,7 +23,7 @@ pos:
make -C po all

install: all
$(PYTHON) -c 'import gi; gi.require_version("Gtk", "3.0")'
[ $(TEST_DEPS) == "1" ] && $(PYTHON) -c 'import gi; gi.require_version("Gtk", "3.0")'
rm othman-data/quran-kareem.png || :
$(PYTHON) setup.py install --prefix=$(PREFIX)
$(INSTALL) -d $(datadir)/applications/
Expand All @@ -37,7 +37,5 @@ install: all
intltool-merge -d po $< $@

clean:
rm -f $(TARGETS) othman-data/ix.db
for i in 96 72 64 48 36 32 24 22 16; do \
rm -f icons/Othman-$${i}.png; \
done
rm -f othman-data/ix.db

15 changes: 15 additions & 0 deletions Othman.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[Desktop Entry]
Type=Application
Name=Othman Quran Browser
Name[ar]=مصحف عثمان الإلكتروني
Name[de]=Othman Koran Browser
GenericName=Electronic Mus-haf
GenericName[ar]=المصحف الإلكتروني
GenericName[de]=Elektronischer Mus-Haf
Terminal=false
TryExec=othman-browser
Exec=othman-browser
Icon=Othman
Categories=X-Islamic-Software;X-Quran;GTK;
StartupNotify=false

Binary file added icons/Othman-16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/Othman-22.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/Othman-24.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/Othman-32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/Othman-36.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/Othman-48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/Othman-64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/Othman-72.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/Othman-96.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added locale/ar/LC_MESSAGES/othman.mo
Binary file not shown.
Binary file added locale/de/LC_MESSAGES/othman.mo
Binary file not shown.
Binary file modified othman-data/quran.db
Binary file not shown.
7 changes: 5 additions & 2 deletions othman.spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: othman
Version: 0.3.0
Version: 0.6.0
Release: 1%{?dist}
Summary: Othman Electronic Quran Browser

Expand All @@ -9,7 +9,7 @@ URL: http://othman.ojuba.org
Source: http://git.ojuba.org/cgit/%{name}/snapshot/%{name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: python3, python3-gobject
BuildRequires: python3
Requires: islamic-menus, arabeyes-core-fonts
Requires: python3-gobject
Requires: python-othman
Expand Down Expand Up @@ -74,6 +74,9 @@ a python package that provides access to Quranic text with a fast search index
%{_datadir}/othman/*

%changelog
* Sat Sep 28 2019 Muayyad Saleh AlSadi <alsadi@ojuba.org> - 0.6.0-1
- python3

* Mon Jun 4 2012 Muayyad Saleh AlSadi <alsadi@ojuba.org> - 0.2.8-1
- port to gtk3

Expand Down
1 change: 1 addition & 0 deletions othman/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = '0.6.0'
6 changes: 4 additions & 2 deletions othman/gtkUi.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,10 @@ def __init__(self):
#self.cells[0].set_property("foreground","#204000")
#self.cells[0].set_property("alignment",Pango.ALIGN_CENTER)
self.cells[0].set_property("wrap-mode", Pango.WrapMode.WORD)
self.cells[0].set_property("wrap-width", 500)
self.cells[0].set_property("font", "Simplified Naskh 32")
# TODO: on-max-min also readjust this value
self.cells[0].set_property("wrap-width", 300)
self.cells[0].set_property("font", "Amiri Quran 32")
#self.cells[0].set_property("font", "Simplified Naskh 32")
#self.cells[0].set_property("font","KFGQPC Uthmanic Script HAFS 32")
self.cells[0].set_property("scale", self.scale)
self.cols[0].set_sizing(Gtk.TreeViewColumnSizing.AUTOSIZE)
Expand Down
Binary file added po/ar.mo
Binary file not shown.
32 changes: 16 additions & 16 deletions po/ar.po
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: othman 0.2.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-04 05:56+0200\n"
"POT-Creation-Date: 2019-09-28 13:37+0300\n"
"PO-Revision-Date: 2010-04-28 18:31+0300\n"
"Last-Translator: alsadi <alsadi@ojuba.org>\n"
"Language-Team: thawab@ojuba.org\n"
Expand All @@ -18,50 +18,50 @@ msgstr ""
"&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"
"X-Generator: Virtaal 0.5.0\n"

#: ../Othman.desktop.in.h:1 ../othman/gtkUi.py:232
msgid "Electronic Mus-haf"
msgstr "المصحف الإلكتروني"

#: ../Othman.desktop.in.h:2 ../othman/gtkUi.py:111 ../othman/gtkUi.py:229
#: ../Othman.desktop.in.h:1 ../othman/gtkUi.py:114 ../othman/gtkUi.py:234
msgid "Othman Quran Browser"
msgstr "مصحف عثمان الإلكتروني"

#: ../othman/gtkUi.py:35
#: ../Othman.desktop.in.h:2 ../othman/gtkUi.py:237
msgid "Electronic Mus-haf"
msgstr "المصحف الإلكتروني"

#: ../othman/gtkUi.py:38
msgid "Search results"
msgstr "نتائج البحث"

#: ../othman/gtkUi.py:53 ../othman/gtkUi.py:137
#: ../othman/gtkUi.py:56 ../othman/gtkUi.py:140
msgid "Sura"
msgstr "سورة"

#: ../othman/gtkUi.py:144 ../othman/gtkUi.py:366
#: ../othman/gtkUi.py:147 ../othman/gtkUi.py:371
msgid "choose a Sura"
msgstr "اختر سورة"

#: ../othman/gtkUi.py:250
#: ../othman/gtkUi.py:255
msgid "translator-credits"
msgstr "مؤيد صالح السعدي <alsadi@ojuba.org>"

#: ../othman/gtkUi.py:358
#: ../othman/gtkUi.py:363
msgid "Copy to clipboard"
msgstr "نسخ إلى الحافظة"

#: ../othman/gtkUi.py:372
#: ../othman/gtkUi.py:378
msgid "Imla'i style"
msgstr "بالرسم الإملائي"

#: ../othman/gtkUi.py:373
#: ../othman/gtkUi.py:379
msgid "an Aya per line"
msgstr "كل آية على كل سطر مستقل"

#: ../othman/gtkUi.py:380
#: ../othman/gtkUi.py:386
msgid "Sorat:"
msgstr "سورة :"

#: ../othman/gtkUi.py:384
#: ../othman/gtkUi.py:390
msgid "Ayat from:"
msgstr "الآيات من:"

#: ../othman/gtkUi.py:386
#: ../othman/gtkUi.py:392
msgid "To"
msgstr "إلى :"
Binary file added po/de.mo
Binary file not shown.
32 changes: 16 additions & 16 deletions po/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-04 05:56+0200\n"
"POT-Creation-Date: 2019-09-28 13:37+0300\n"
"PO-Revision-Date: 2010-08-27 23:29+0100\n"
"Last-Translator: cegerxwin <cegerxwin@web.de>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand All @@ -16,50 +16,50 @@ msgstr ""
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"

#: ../Othman.desktop.in.h:1 ../othman/gtkUi.py:232
msgid "Electronic Mus-haf"
msgstr "Elektronischer Mus-Haf"

#: ../Othman.desktop.in.h:2 ../othman/gtkUi.py:111 ../othman/gtkUi.py:229
#: ../Othman.desktop.in.h:1 ../othman/gtkUi.py:114 ../othman/gtkUi.py:234
msgid "Othman Quran Browser"
msgstr "Othman Koran Browser"

#: ../othman/gtkUi.py:35
#: ../Othman.desktop.in.h:2 ../othman/gtkUi.py:237
msgid "Electronic Mus-haf"
msgstr "Elektronischer Mus-Haf"

#: ../othman/gtkUi.py:38
msgid "Search results"
msgstr "Suchergebnisse"

#: ../othman/gtkUi.py:53 ../othman/gtkUi.py:137
#: ../othman/gtkUi.py:56 ../othman/gtkUi.py:140
msgid "Sura"
msgstr "Sure"

#: ../othman/gtkUi.py:144 ../othman/gtkUi.py:366
#: ../othman/gtkUi.py:147 ../othman/gtkUi.py:371
msgid "choose a Sura"
msgstr "Wähle eine Sure aus"

#: ../othman/gtkUi.py:250
#: ../othman/gtkUi.py:255
msgid "translator-credits"
msgstr "Übersetzer"

#: ../othman/gtkUi.py:358
#: ../othman/gtkUi.py:363
msgid "Copy to clipboard"
msgstr "In Zwischenablage kopieren"

#: ../othman/gtkUi.py:372
#: ../othman/gtkUi.py:378
msgid "Imla'i style"
msgstr "Imla'i Stil"

#: ../othman/gtkUi.py:373
#: ../othman/gtkUi.py:379
msgid "an Aya per line"
msgstr "eine Aya pro Zeile"

#: ../othman/gtkUi.py:380
#: ../othman/gtkUi.py:386
msgid "Sorat:"
msgstr ""

#: ../othman/gtkUi.py:384
#: ../othman/gtkUi.py:390
msgid "Ayat from:"
msgstr ""

#: ../othman/gtkUi.py:386
#: ../othman/gtkUi.py:392
msgid "To"
msgstr ""
30 changes: 15 additions & 15 deletions po/othman.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-04 05:56+0200\n"
"POT-Creation-Date: 2019-09-28 13:37+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand All @@ -17,50 +17,50 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"

#: ../Othman.desktop.in.h:1 ../othman/gtkUi.py:232
msgid "Electronic Mus-haf"
#: ../Othman.desktop.in.h:1 ../othman/gtkUi.py:114 ../othman/gtkUi.py:234
msgid "Othman Quran Browser"
msgstr ""

#: ../Othman.desktop.in.h:2 ../othman/gtkUi.py:111 ../othman/gtkUi.py:229
msgid "Othman Quran Browser"
#: ../Othman.desktop.in.h:2 ../othman/gtkUi.py:237
msgid "Electronic Mus-haf"
msgstr ""

#: ../othman/gtkUi.py:35
#: ../othman/gtkUi.py:38
msgid "Search results"
msgstr ""

#: ../othman/gtkUi.py:53 ../othman/gtkUi.py:137
#: ../othman/gtkUi.py:56 ../othman/gtkUi.py:140
msgid "Sura"
msgstr ""

#: ../othman/gtkUi.py:144 ../othman/gtkUi.py:366
#: ../othman/gtkUi.py:147 ../othman/gtkUi.py:371
msgid "choose a Sura"
msgstr ""

#: ../othman/gtkUi.py:250
#: ../othman/gtkUi.py:255
msgid "translator-credits"
msgstr ""

#: ../othman/gtkUi.py:358
#: ../othman/gtkUi.py:363
msgid "Copy to clipboard"
msgstr ""

#: ../othman/gtkUi.py:372
#: ../othman/gtkUi.py:378
msgid "Imla'i style"
msgstr ""

#: ../othman/gtkUi.py:373
#: ../othman/gtkUi.py:379
msgid "an Aya per line"
msgstr ""

#: ../othman/gtkUi.py:380
#: ../othman/gtkUi.py:386
msgid "Sorat:"
msgstr ""

#: ../othman/gtkUi.py:384
#: ../othman/gtkUi.py:390
msgid "Ayat from:"
msgstr ""

#: ../othman/gtkUi.py:386
#: ../othman/gtkUi.py:392
msgid "To"
msgstr ""
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
from distutils.core import setup
from glob import glob

from othman import __version__

# to install type:
# python setup.py install --root=/

locales=map(lambda i: ('share/'+i,[''+i+'/othman.mo',]),glob('locale/*/LC_MESSAGES'))
data_files=[('share/othman/',glob('othman-data/*'))]
data_files.extend(locales)
setup (name='Othman', version='0.3.0',
setup (name='Othman', version=__version__,
description='Othman Quran Browser',
author='Muayyad Saleh Alsadi',
author_email='alsadi@ojuba.org',
Expand All @@ -32,4 +34,3 @@
data_files=data_files
)


31 changes: 31 additions & 0 deletions update-amiri.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#! /usr/bin/python3

import sys
import os
import sqlite3

#os.system("curl -sSL https://github.com/khaledhosny/quran-data/tarball/master | tar -C othman-data -xzf -")
#os.system("mv othman-data/khaledhosny-quran-data-* othman-data/quran-data")

UPDATE_SQL='UPDATE Quran SET othmani=? WHERE id=?'

db=sqlite3.connect("othman-data/quran.db")

#db.execute("BEGIN")
#db.execute("UPDATE Quran SET othmani=''")
#db.execute("COMMIT")
#exit(-1);

db.execute("BEGIN")
counter=1
for i in range(1, 115):
with open("othman-data/quran-data/quran/{:03d}.txt".format(i), "r") as f:
for line in f:
line=line.strip()
if not line: continue
print(counter)
db.execute(UPDATE_SQL, (line, counter))
counter+=1
db.execute("COMMIT")
db.execute("VACUUM")