All Projects → gustavklopp → LingL

gustavklopp / LingL

Licence: GPL-3.0 License
clone of lingq to learn new language

Programming Languages

CSS
56736 projects
javascript
184084 projects - #8 most used programming language
python
139335 projects - #7 most used programming language
SCSS
7915 projects
Less
1899 projects
HTML
75241 projects

LingLibre

Learn new languages by reading anything you choose.

This was inspired by other site/projects like the opensource Lwt, the closed source lingq etc...

Screencast_small_clip lingl_homepage_600px

If you find this project interesting, please take a moment to Star it (top-right star on Github).

1. How to use it:

2. How to install it:

2.1. Use the Docker file:

You need Docker installed.

After launching the Docker daemon, run:

docker run -it -p 8000:8000 gustavklopp/lingl

then visit http://127.0.0.1:8000 in your browser.

If you find this project interesting, please take a moment to Star it on the Docker repo.

2.2. Use the built-in server inside Django:

It will need python==3.9.0.

(Use a virtual env preferably: on Windows, use chocolatey to install pyenv for example, and on macOS, use homebrew to install pyenv.)

Set a virtualenv with python 3.9.0, then inside the virtual env:

pip install -r requirements.txt (it will install all the modules required, along Django==3.2.4)

(You need pip of course, which is a Python modules manager: https://pip.pypa.io/en/stable/installing/#installing-with-get-pip-py

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py

)

Running the Django project:

move inside the LingL folder (where manage.py is) and:

python manage.py migrate
python manage.py loaddata initial_fixture_USER.yaml
python manage.py loaddata initial_fixture_LANGUAGES.yaml
python manage.py runserver

then open your browser to http://127.0.0.1:8000

After launching the app, you will need to create an account (this way, the app allows multi-accounts). There's also a superuser account for Django admin use: it's : username: lingl / password: lingl.

2.3 Use the executable (Standalone application):

The standalone is only provided for Linux. For other platforms, you can build it yourself (see section 5.1 Building in the Developer section).

the executable is Linglibre.

https://github.com/gustavklopp/LingL/releases

After launching the app, you will need to create an account (this way, the app allows multi-accounts).

2.4. (future) Use the online website:

Maybe later if people interested.

3. Upgrading:

Future versions are regularly provided.

3.1 for the Python server version:

  1. (optional) same backup step 1 as the 'standalone version'.

  2. Delete the database in 'lwt' folder named "LingL_database.sqlite3".

  3. git pull or download the source code. The database needs to be recreated with the same steps you've done at first (./manage.py migrate and loading the fixtures).

  4. launch the server (./manage.py runserver)

  5. (optional) same restore step 5 as the 'standalone version'.

3.2 for the standalone version:

  1. (optional) First, backup (if you want to keep your previous data that you've created): in the menu, choose 'Backup/Restore/Delete your account' then click on 'Backup' (you can choose to backup everything or choose which words to backup).

  2. (optional) Delete the old version folder. LingLibre doesn't install anything on your system in fact.

  3. Download the latest versions (see the Releases section) which fits your systems.

  4. Launch this new version (after uncompressing it wherever you want) by clicking on the executable LingLibre.

  5. (optional) Restore the backup created in step '1': Create an account (whatever name you want, you're not forced to use the same than in the old version). and in the 'Backup/Restore/Delete your account', click on 'Restore' and choose the backup file that you've got in the step '1'.

4. Missing a feature? Request it!

This is a hobby project made only by volunteers in their free time. All features of this software are implemented because they suit the needs of these volunteers at some point.

If you need a special feature and don't want to wait that somebody feels the need to code it, you can still try to fund it! It's easy:

Create your Feature request on the Issues page. Then go to Issuehunt and make a pledge for this feature (Consider a reasonable amount).

5. Developers:

Discovering a new code is always a challenge but I've done my best to welcome newcomers:

  • the code is HIGHLY documented (as much as code as comments in some place)
  • I use the less Python shenanigans: No functools, list comprehensions only with moderations etc.
  • Diagrams are the best! I've created a flowchart with Draw.io to follow how the code works (see below).
  • 5.1 Building:

To build LingLibre, use CX_Freeze with the suitable platform:

python setup_LINUX.py build on Linux

python setup_WIN32.py build on Windows

python setup_MACOS.py build on Mac

The build results (with the LingLibre executable) will be in the build folder.

  • 5.2 Flowchart of the major Classes and Functions (Javascript and Python)

  • 5.3 Running tests:

you need to have selenium and factory-boy installed (pip install selenium and pip install factory-boy).

  1. test for "Splitting and Reading a text":
./manage.py test functional_tests.selenium_text_read.Text_read
  1. test for "Creating and Modifying Language":
./manage.py test functional_tests.selenium_language_detail.Language_detail
  1. test for "Creating a text":
./manage.py test functional_tests.selenium_text_detail.Text_detail
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].