This Python script can be used to generate printable flashcards as a Microsoft Word document.
The purpose of the script is to demonstrate how MS Word docs can be automatically generated based on an input MS Excel file.
To run this script you will need Python 3
with the following modules installed:
pip install xlrd==1.2.0
pip install python-docx==0.8.10
- Open
Input_Data.xlsx
- Fill Column A with the text that you want to see on each card's top side
- Fill Column B with the text that you want to see on each card's bottom side
- When you are done save the file
- Run
flash_card_generator.py
script - When the script is done a new file called
Printable_Flash_Cards.docx
will appear in the root folder - Open the freshly generated .docx file, make sure it is exactly what you wanted
- Print the document as doublesided
- Enjoy your brand new flash cards
Note: Currently the Input_Data.xlsx
is filled with example data, english phrasal verbs. Source: https://www.skypeenglishclasses.com/english-phrasal-verbs/
The generated output file (Printable_Flash_Cards.docx) has the following parts:
- Cover page
- Printable cards
- A summary table with the content of every flash card.
If you want to change the font, size etc. of the cards at once you can do easily by modifying the pre-define Word Style called: "Normal".
Change the default file names with the help of the below global varables:
INPUT_FILE_NAME = 'Input_Data.xlsx'
TEMPLATE_FILE_NAME = 'Template.docx'
OUTPUT_FILE_NAME = 'Printable_Flash_Cards.docx'
- Make card dimensions modifyable. Currently it can be reduced but every page will consist of 12 cards.
- Make the number of cards on a single page modifyable.
TBD