Create files, containing conjugations of different verbs, ready to be uploaded to Quizlet.
This is a python script that creates text files, containing conjugations for the spanish verbs you provided, ready to be imported into Quizlet. The conjugations are scraped from spanishdict.com
Supported types as indicated in the script itself
supported_types = ['presentIndicative', 'preteritIndicative','imperfectIndicative', 'presentSubjunctive']
Contents of words.txt
ganar
enseñar
Running the script
python conjugation-flashcards.py words.txt
After the script runs
Several files are created, such as presentIndicative.txt
,preteritIndicative.txt
, imperfectIndicative.txt
, presentSubjunctive.txt
.
Output of presentIndicative.txt
yo ganar gano
tú ganar ganas
él/ella/Ud. ganar gana
nosotros ganar ganamos
vosotros ganar ganáis
ellos/ellas/Uds. ganar ganan
yo enseñar enseño
tú enseñar enseñas
él/ella/Ud. enseñar enseña
nosotros enseñar enseñamos
vosotros enseñar enseñáis
ellos/ellas/Uds. enseñar enseñan
\n
.<pronoun> <verb in infinitive mood><tab><conjugated verb>
All the necessary packages are specified in environment.yml
.
For conda usersconda env create
I make changes to the jupyter notebook file, and when I am ready to commit, I run the following command to export a .py
file.jupyter nbconvert --to script conjugation-flashcards.ipynb
This was a quick script I put together, to aid me in memorizing different conjugations of spanish verbs. There are several improvements I can think of.