Skip to content

Commit

Permalink
put flashcard fields on separate lines
Browse files Browse the repository at this point in the history
  • Loading branch information
guybrush committed Sep 19, 2023
1 parent fa9ba74 commit ef88e3b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions make-flashcards.kt
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ fun makeFlashcard(card: Card, heading: String, field: String, filename: String)

// export a record as a text flashcard suitable for nokia phones
fun makeTextFlashcards(card: Card, heading: String, field: String, dir: String, seq: String) {
val question = "$heading\n${card.question} : [$field]"
val answer = "$heading\n${card.question} : ${card.answer}"
val question = "$heading\n${card.question}\n[$field]".replace(" : ", "\n")
val answer = "$heading\n${card.question}\n${card.answer}".replace(" : ", "\n")
java.io.File(dir + "/${seq}A.txt").writeText(question)
java.io.File(dir + "/${seq}B.00.txt").writeText(answer)
}
Expand Down

0 comments on commit ef88e3b

Please sign in to comment.