Collaboration with John Blaufuss, Levi Pitts, and Preston Zuniga. Made in Python.
Converts plain text into flashcards using the following code snippet.
Deck.readable_as_deck(title)
lines = readWrite.readByLine(title)[1:-1] # first line is the deck flag
# code below only executes if the title was successfully read as a text file
self.__title = title[:-4] # i.e., the filename minus the extension
for i in range(len(lines)):
if lines[i] != '\n':
print(lines[i].split(':'))
front, back = lines[i].split(":") # convert each line of plain text to a card
card = card_class.Card(card_class.Card.restore(front), card_class.Card.restore(back))
self.add_card(card)
print(f"Read a deck in existing deck {self.__title}.")