Coder Social home page Coder Social logo

danielywang / quizlet_cmd Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 97 KB

Study Quizlet flashcards in the command line without an API, or make and study your own!

License: MIT License

Python 100.00%
quizlet python3 python flashcards dictionary-application dictionary-tools

quizlet_cmd's Introduction

Quizlet_CMD

Welcome to the Quizlet_CMD module. This is a complete and full-featured flashcards study tool. Study Quizlet flashcards in the command line without an API, or make and study your own!

Getting Started

Clone or download the repo to get started

Prerequisites

The recommended quizlet_colored.py requires the termcolor module (If you are on Windows, install colorama in addition to termcolor)

In terminal, cd to the repo folder and run

pip install -r requirements.txt

*Make sure you are in the quizlet_cmd directory

Anaconda users: use conda instead

Note: Mac OS is required for the optional say feature in quizlet_colored.py (turned on by default)


If the above doesn't work, run pip install termcolor pip install colorama (Windows)

If the above prerequisites cannot be fulfuilled, quizlet_uncolored.py is also available


Running the tests

MAKE SURE TO CD TO THE FOLDER/OPEN THE ENTIRE FOLDER IN YOUR EDITOR

This is required to make the file-reading and writing work

To test the quizlet_colored module using the pre-installed example.txt, cd to the folder and run:

python quizlet_colored.py

Again, if the above didn't work, make sure you are in the quizlet_cmd directory


Quizlet function

If the above command worked, you are now in the main quizlet function. This function allows you to practice flashcards (in this case, a Spanish example.txt located in stacks) Input your answer to the prompt, followed by 'enter'
Enter #exit at any time to end practice session and show score

Features

  • Param stack can either open file with file name (recommended), or use the internal stack dictionary

  • Param say = True (default) reads prompts and answers using specified languages (Mac only)

    • Realized using Mac OS's built-in say function. User input specifies language, which activates different voices. Program is optimzed for irregular characters such as (parentheses) and / slashes
  • Param reverse = True reverses terms/definitions

  • Program notifies user if their wrong answer matches another answer

  • Program shows a list of words you got wrong, the prompt, and the correct answer

  • Asks if user wants to save the set of words they got wrong into a new file

  • Asks if user wants to practice the words they got wrong

  • If there are synonyms in the answer separated by /, eg "car":"el coche/el carro", entering either (or both) would count as a correct answer

  • If there are parentheses in the answer denoting optional content, eg "red":"rojo(a)", not entering the content in the parentheses would also work.

    • Irregular spacing is also accounted for. The following would all constitutue as correct:
    Answer User
    'rojo(a)' 'rojo'
    'rojo(a)' 'rojo '
    'rojo (a)' 'rojo'
    'rojo (a)' 'rojo '

Remarks

A Mac is required for the optional say feature in quizlet_colored.py, which speaks the terms and definitions out loud. quizlet_colored.py currently has an OS detection set in place, so if you are not on Mac OS, the featured will be disabled. feel free to change the parameters of the quizlet function! The defaults are just there as a demonstration.


Getting Term-Definition Dictionaries

To get the flashcards (stacks) necessary for practicing, we can get the dictionary by:

  1. Create your own set with ease with "quizlet_dict.py"

    • Execute dict_generator() in quizlet_dict.py. Read doc string for details. The dict will be saved as a text file into the "stacks" folder.
  2. Copying an existing Quizlet set off the website

    • a. Go to the set on quizlet.com
    • b. Under the title, click on the "..." Go to "export"
    • c. Enter the below custom settings for each column with quotes 'Between term and definition' ⟶ ":" 'Between rows' ⟶ ","
    • d. Click ['Copy text']
    • e. Go to quizlet_dict.py, and change the param from_export to True, run the file. When prompted, paste the above copied text. The program converts the text into a dictionary. A new text file with the name of your choosing will be stored in the stacks folder. To study the set, simply input the name of the file into the quizlet function in quizlet_colored.py (or quizlet_uncolored.py)
  3. For short flash cards or to test/have fun with the quizlet program, you can also manually type in a term-to-def. dictionary under the stack variable in quizlet_colored.py (or quizlet_uncolored.py). Be sure to change the param of the quizlet function to the variable stack


Versioning

Version 1.2.2

1.1 Now supports voice prompts! The say feature will be automatically turned on if you are on Mac OS. Again, feel free to turn it off.

1.1.3 Colors and bolding support Windows

Known issues: Colors and bolding in Windows only work in CMD

1.2 Now asks user if they want to save the set of words they got wrong into a new file, and whether they want to practice them


Author


Contributors

Dan Bi - wujibi123

William Kopans - Wi11-Da-Beast

License

This project is licensed under the MIT License - see the LICENSE file for details

quizlet_cmd's People

Contributors

danielywang avatar williamkopans avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

quizlet_cmd's Issues

#exit error

When first opening the program it says "Welcome to Quizet Write. Press enter to begin, input '#exit' anytime to stop session and show score", however the #exit command only works after the user has inputted the languages.

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.