Dhamma.Gift is available as:
- Website: https://dhamma.gift
- PWA (installable via browser on Android and desktop)
- APK files for manual installation: Download dhamma.gift-v0.1.apk Download dict.dhamma.gift-v0.1.apk
Grep-based search in all Texts of Pali Suttanta and Vinaya in 4 languages: Pali, English, Russian, Thai and Sinhala. Little script that will or at least might change Buddhism to better. Search all matches for the word in Suttas and Vinaya. Web implementation of bash script that generates comfortables datatables.
Perfect for those who are looking for Awakening and study Pali. You can get all occurrences of the definition, metaphor, practice etc. By default search is made in DN, MN, SN, AN. But user has option to add other books of KN.
Offline version of dg
This instruction is only for Android devices. Check possible options for IOS in the end of this instruction. if you'll find out how to run it on IOS please let me know.
Copy+paste into terminal the contents of scripts/install-linux.sh (requires root)
- Activate Windows Subsystem for Linux
- Install Ubuntu of your choice from Windows store
- Finalize the setup: set username and password
- Copy+paste into terminal the contents of
scripts/install-linux.sh(requires root)
-
Run Termux
-
Copy-paste following commands:
pkg update pkg upgrade pkg install -y git mkdir -p $PREFIX/share/apache2/default-site/htdocs cd $PREFIX/share/apache2/default-site/htdocs git clone https://github.com/o28o/dg.git ./ bash ./scripts/install-android.sh
-
If you want to add offline audio files, clone this repo to
./assets/audio:mkdir -p $PREFIX/share/apache2/default-site/htdocs/assets/audio cd $PREFIX/share/apache2/default-site/htdocs/assets/audio git clone https://github.com/o28o/dg.audio ./
-
Open Termux and run:
pkg install -y php-apache apache2 pv wget git iconv python w3m
-
Fix PHP configuration based on this article
nano /data/data/com.termux/files/usr/etc/apache2/httpd.conf
Comment out and add the following lines:
#LoadModule mpm_worker_module libexec/apache2/mod_mpm_worker.so LoadModule mpm_prefork_module libexec/apache2/mod_mpm_prefork.so LoadModule php_module /data/data/com.termux/files/usr/libexec/apache2/libphp.so <FilesMatch \.php$> SetHandler application/x-httpd-php </FilesMatch> <IfModule dir_module> DirectoryIndex index.php index.html index.htm </IfModule> LoadModule rewrite_module libexec/apache2/mod_rewrite.so ServerName localhost:8080 ServerName 127.0.0.1:8080
and, if needed:
ServerName #yourip:8080
Now, download offline resources:
-
Go to the Apache directory:
cd /data/data/com.termux/files/usr/share/apache2/default-site/htdocs -
Clone this repo:
git clone https://github.com/o28o/dg.git ./
-
Clone the current https://suttacentral.net data:
git clone https://github.com/suttacentral/sc-data.git ./suttacentral.net
-
Download the https://accesstoinsight.org data:
wget http://accesstoinsight.org/tech/download/ati.zip unzip ati.zip ./accesstoinsight.org
-
Download legacy https://suttacentral.net data:
(note: you dont need it if the https://suttacentral.net offline PWA is working fine on your phone)wget https://legacy.suttacentral.net/exports/sc-offline-2016-11-30_16:03:42.zip unzip sc-offline-2016-11-30_16:03:42.zip ./legacy.suttacentral.net
or:
wget https://legacy.suttacentral.net/exports/sc-offline-2016-11-30_16:03:42.7z
-
Download https://theravada.ru:
mkdir theravada.ru && cd theravada.ru wget -r --no-check-certificate --no-parent -P ./ https://theravada.ru/Teaching/canon.htm
Fix possible double dir... check later
cd theravada.ru/Teaching/Canon/Suttanta for i in `find . -name "*" -type f`; do echo $i; iconv -f windows-1251 $i > ../tmp mv ../tmp $i sed -i 's@windows-1251@utf-8@g' $i done
-
Check and fix links if needed:
cd /data/data/com.termux/files/usr/share/apache2/default-site/htdocs/ru ln -s ../assets ./assets ln -s ../sc ./sc ln -s ../scripts ./scripts ln -s ../result ./result -
(Optional) - if you downloaded https://suttacentral.net data somewhere else, not in the Apache default directory:
cd /data/data/com.termux/files/usr/share/apache2/default-site/htdocs/ rm suttacentral suttacentral.net ln -s ../yourpath ./suttacentral.net ln -s ../yourpath ./theravada.ru ln -s ../yourpath ./legacy.suttacentral.netOr, if you want to keep offline resources in other places without symlinks, edit paths in
./config/script_config.shand./config/config.php
For testing your queries via the CLI, you may run:
bash ./scripts/finddhamma.sh yourqueryInPali
bash ./scripts/finddhamma.sh -ru yourqueryInRussian
bash ./scripts/finddhamma.sh -en yourqueryInEnglish
bash ./scripts/finddhamma.sh -th yourqueryInThaiBefore using dg offline, don't forget to run:
apachctl start
termux-open-url http://localhost:8080/This should open http://localhost:8080 in your web browser.
Not yet available
Might be possible to run on IOS devices with phpwin or similar and some terminal emulator e.g. from this article
never tried. please let me know if there is a way.