Giter Site home page Giter Site logo

paulomigalmeida / english-flash-cards Goto Github PK

View Code? Open in Web Editor NEW
9.0 3.0 1.0 958 KB

Mini website for testing general English knowledge memorization.

Home Page: https://hub.docker.com/r/paulomigalmeida/english-flash-cards/

Shell 2.29% Python 29.06% JavaScript 7.35% CSS 7.39% HTML 52.86% Dockerfile 1.04%
flashcards flashcard-game flashcard-application english-learning english-quiz

english-flash-cards's Introduction

English Flash Cards

This code was originally written by @jwasham and other contributors. I modified according to my needs and built deployment automation scripts to make it easier for future developers/users.

This is a little responsive website that allows ESL learners (me included) to easily make flash cards and quiz themselves for memorization of:

  • General English Knowledge
    • Vocabulary
    • Prepositions
    • Expressions

Technologies used when building it:

  • Python 3
  • Flask
  • SQLite

Screenshots

UI for listing cards. From here you can add and edit cards.

Card UI


The front of a General flash card.

Memorizing general knowledge


The reverse (answer side) of an Expression flash card.

expression answer view

Feeling lazy?

Run the following command: $ docker run -it --rm -p 8000:8000 --name english-flash-cards paulomigalmeida/english-flash-cards:0.1-sample

Go your browser and type: http://localhost:8000

How to run with Docker

Provided by @Tinpee - [email protected] - Reach out to this contributor if you have trouble.

Make sure you already installed docker

  1. Clone project to any where you want and go to source folder.
  2. Edit the config.txt file. Change the secret key, username and password. The username and password will be the login for your site. There is only one user - you.
  3. Build image: docker build . -t english-flash-cards
  4. Run container: docker run -d -p 8000:8000 --name english-flash-cards english-flash-cards
  5. Go your browser and type http://localhost:8000

If you already had a backup file cards.db then run the following command: Note: We don't need to rebuild image, just delete old container if you already built. docker run -d -p 8000:8000 --name english-flash-cards -v :<path_to_folder_contains_cards_db>:/src/db english-flash-cards. <path_to_folder_contains_cards_db>: is the full path contains cards.db. Example: /home/user/english-flash-cards/db, and cards.db is inside this folder.

For convenience, if you don't have cards.db, this container will auto copy a new one from cards-empty.db.


How to backup data ?

We just need store cards.db file, and don't need any sql command.

  • If you run container with -v <folder_db>:/src/db just go to folder_db and store cards.db anywhere you want.
  • Without -v flag. Type: docker cp <name_of_container>:/src/db/cards.db /path/to/save

How to restore data ?

  • Delete old container (not image): docker rm english-flash-cards
  • Build a new one with -v flag: docker run -d -p 8000:8000 --name english-flash-cards -v <path_to_folder_contains_cards_db>:/src/db english-flash-cards
  • Voila :)

Happy learning!

english-flash-cards's People

Contributors

dependabot[bot] avatar paulomigalmeida avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

teocorp

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.