/KanjiWebEasy

Website made to users learn how to read NHK Web Easy articles

Primary LanguagePython

KanjiWebEasy

Website made to users learn how to read NHK Web Easy articles

Setup for Windows

  1. Download Github for Windows https://windows.github.com/
  2. Drap and drop https://github.com/SebastienGllmt/KanjiWebEasy.git into the Github for Windows application and place file in the default path
  3. Download Python 3.4 from https://www.python.org/downloads/
  4. Download https://raw.githubusercontent.com/pypa/pip/master/contrib/get-pip.py to some folder
  5. Go to the folder where you placed get-pip.py. Inside the folder, shift+right click "open command window here"
  6. Type without quotes: "C:/Python34/python.exe get-pip.py"
  7. Go to C:\Python34\Scripts and shift+right click "open command window here"
  8. Type without quotes: "pip install virtualenv"
  9. Go to My Documents/Github/KanjiWebEasy
  10. Once in the folder, Shift+Right click and select "Open command window here"
  11. Type without quotes: "C:\Python34\Scripts\virtualenv venv"
  12. Go to KanjiWebEasy/venv/scripts or KanjiWebEasy/venv/bin
  13. Once in the folder, Shift+Right click and select "Open command window here"
  14. Type without quotes: "pip install -r ../../requirements.txt"
    If you get a missing DLL error, download the Visual C++ redistribution from https://www.microsoft.com/en-us/download/details.aspx?id=48145 (probably x86)
  15. Download Redis 2.8.17 from https://github.com/MSOpenTech/redis/releases
  16. Put the contents of the .zip file in a foler on your C drive called "Redis 2.8.17"

Launching for Windows

  1. Go to the folder where you put Redis then Shift+Right click and select "Open command window here"
    Note: You may have to run cmd as an admin, in which case launch cmd as admin and then cd into your Redis directory.
  2. Type without quotes: "redis-server"
  3. Go to KanjiWebEasy/venv/scripts or KanjiWebEasy/venv/bin
  4. Once in the folder, Shift+Right click and select "Open command window here"
  5. Type without quotes: "activate.bat"
  6. Type without quotes: "cd ../.."
  7. Type without quotes: "set PYTHONPATH=."
  8. Type without quotes: "python -m japandb"
  9. Open up your browser of choice and go to http://localhost:5000/

Push a Change

  1. Open up Github for Windows
  2. Select the KanjiWebEasy repository from the list
  3. Sync any changes that may have happened (the sync button is at the top right)
  4. View the list of uncommitted changed (it doesn't appear if you haven't made any changes)
  5. Check which files you want to commit (note, you don't have to pull all your changes in the same commit. You can split them up)
  6. Enter a Summary/Description of the changes and press "Commit to master"
  7. Once all your changes have been made, press Sync again

Note: Your changes will not appear on the live site even after you push a change.

Setup for Linux (Tested on Linux Mint)

  1. Make sure you have the latest packages "sudo apt-get update"
  2. Install all the packages we will need "sudo apt-get install git redis-server python3.4 python3.4-dev python3-pip python-virtualenv"
  3. Clone the repository wherever you want the project "git clone https://github.com/SebastienGllmt/KanjiWebEasy.git" (this step takes a long time)
  4. Navigate into the KanjiWebEasy directory you just cloned "cd KanjiWebEasy"
  5. Setup the virtual environment "virtualenv venv"
  6. Install the project requirements "sudo pip3 install -r requirements.txt"
If you prefer a one line install use this. It will clone the project and set everything up in the current directory.
sudo apt-get update; sudo apt-get install git redis-server python3.4 python3.4-dev python3-pip python-virtualenv; git clone https://github.com/SebastienGllmt/KanjiWebEasy.git; cd KanjiWebEasy; virtualenv venv; sudo pip3 install -r requirements.txt

Launching for Linux (Tested on Linux Mint)

  1. Run "redis-server"
  2. Navigate to the KanjiWebEasy folder "source venv/bin/activate"
  3. Run "python3.4 -m japandb" in the KanjiWebEasy folder
  4. Open up your browser of choice and go to http://localhost:5000/