[IMPR] Migrate Flask-Script module to Flask-CLI in-built

Authored by D3r1ck01 on Apr 3 2019, 9:23 PM.


[IMPR] Migrate Flask-Script module to Flask-CLI in-built

Flask-Script is an external library and is currently not actively
developing features (https://flask-script.readthedocs.io/en/latest/).
Flask version 0.11 already supports writing scripts with its in-built
CLI feature (http://flask.pocoo.org/docs/1.0/cli/) with the use of
Flasky. Hence migrating to it as it comes with flask bundled.

Also, do some file encoding and decoding of the emoticons and the
introduction of Flasky. One thing to note is that Flask-Script was
sometimes failing on Toolforge with error such as;

Traceback (most recent call last):
  File "/data/project/awmd-stats/www/python/src/app.py", line 5, in <module>
    from flask_script import Manager
ImportError: No module named 'flask_script'

Removed Flask-Script from the requirements.txt file so it shouldn't
be installed upon running pip install -r requirements.txt.

Added the emoji package and also bump flask to 1.0.2 that uses Python3
by default.

Change-Id: Ibe383394ce865a9f8d5aaa11a4be4f5b94570dd9