ArabyYar a browser-based app for learning Arabic simple - v1.0.1
After cloning the project install python required libraries using this command:
pip install -r requirements.txt
Now you can run the project by starting app.py
python app.py
For running the application on other devices with Windows operating system without installing Python and other requirements we need to compile the program to exe.
We need Pyinstaller library for converting py to exe:
pip install pyinstaller
Working with Pyinstaller is not hard but we can make it even easier using Auto-py-to-exe :
pip install auto-py-to-exe
After installing auto-py-to-exe open cmd and run auto-py-to-exe:
auto-py-to-exe
Replace below code in settings.py:
import sys
Web_Template_Folder = '\\'.join((sys._MEIPASS.replace('/', '\\'), 'Web\\media\\templates', ))
Web_Static_Folder = '\\'.join((sys._MEIPASS.replace('/', '\\'), 'Web\\media\\static', ))
Replace Below Code instead of app = Flask(__name__, template_folder=settings.Web_Template_Folder, static_folder=settings.Web_Static_Folder)
in Web/__init__.py :
import sys
if getattr(sys, 'frozen', False):
app = Flask(__name__, template_folder=settings.Web_Template_Folder, static_folder=settings.Web_Static_Folder)
else:
app = Flask(__name__)
Use this command for start converting py to exe: (Use --onefile
for one file exe | Use --onedir
for exe in one directory)
pyinstaller --noconfirm --onefile --windowed --icon "<ICO File Address>" --name "Araby Yar" --add-data "<settings.py address>;." --add-data "<Desktop Directory Address>;Desktop/" --add-data "<Web Directory Addres>;Web/" "<app.py Address>"
Python - An interpreted, high-level and general-purpose programming language
JavaScript - A programming language that conforms to the ECMAScript specification