CLI application to create flashcards for memcode.com. Uses ChatGPT (GPT-4) to convert markdown files with questions and answers into html formatted excel sheets ready for import into memcode.
- Install Node.js (https://nodejs.org/en/download/) - it is recommended to use the latest LTS version.
- Install/Activate Yarn Berry (https://yarnpkg.com/getting-started/install)
- Clone the repository:
git clone git@github.com:daniel-eder/flashcard-maker.git
- Install dependencies:
yarn install
- Run
cp .env.example .env
to create the environment file - Enter your OpenAI API key in the
.env
file - Run
yarn start --input=<path to input markdown file> --output=<path to output excel file>
- the aliases
-i
and-o
can be used instead of--input
and--output
- the aliases
The input file must be a markdown file with the following format:
# Question 1
Full text answer that should be summarized for the flashcard.
# Question 2
Full text answer that should be summarized for the flashcard.
...
See also ./content/input.md
for an example.
The source code comes with a default prompt that is used to instruct ChatGPT on how to prepare the flashcards. The default prompt is in German and specific to my current subject and preferred formatting and structure.
You can change the prompt by editing ./data/prompt.txt
.
Copyright (c) 2023 Daniel Eder
Licensed under the MIT License, see LICENSE for more information.