Updated README.md
This commit is contained in:
parent
ff06c093e3
commit
b4be376ec8
52
README.md
52
README.md
|
@ -1,13 +1,15 @@
|
|||
# csv2ankicards
|
||||
|
||||
A simple toolkit that offers:
|
||||
A comprehensive toolkit that offers:
|
||||
- Conversion of CSV files into Anki deck packages (.apkg files).
|
||||
- Conversion of image files in a directory to a text file using Optical Character Recognition (OCR).
|
||||
- Generation of CSV format question-answer pairs from textual content using OpenAI's GPT-3 model.
|
||||
|
||||
## Features
|
||||
|
||||
- Converts a CSV file with questions and answers into an Anki deck package.
|
||||
- Converts image files from a specified directory to a single text file using OCR.
|
||||
- Generates CSV formatted question-answer pairs based on a given text content, ideal for studying or summarization.
|
||||
- For CSV: there are only two columns in the CSV file, separated by the first comma encountered.
|
||||
- CSV files should have a "Front" column for questions and a "Back" column for answers.
|
||||
|
||||
|
@ -32,6 +34,32 @@ A simple toolkit that offers:
|
|||
|
||||
## Usage
|
||||
|
||||
### Image to Text Conversion
|
||||
|
||||
To convert images from a directory to a single text file using OCR:
|
||||
|
||||
```bash
|
||||
python images2text.py /path/to/your/image_directory/
|
||||
```
|
||||
|
||||
This will produce a `final.txt` file which contains the text extracted from the images.
|
||||
|
||||
#### Supported Image Formats
|
||||
|
||||
Currently supported formats for the images are: `.png`, `.jpg`, and `.jpeg`.
|
||||
|
||||
### Text to CSV Deck Generation
|
||||
|
||||
To generate a CSV deck of question-answer pairs from a given text file:
|
||||
|
||||
```bash
|
||||
python text2csvdeck.py /path/to/your/textfile.txt
|
||||
```
|
||||
|
||||
This will analyze the content of the given text file and generate a corresponding `_deck.csv` file with questions and answers that capture the main points and themes of the text.
|
||||
|
||||
**Note:** This script uses the OpenAI GPT-3 model. Ensure you have the necessary API key and OpenAI Python client installed.
|
||||
|
||||
### CSV to Anki Conversion
|
||||
|
||||
To convert a CSV file into an Anki deck package:
|
||||
|
@ -54,25 +82,3 @@ Another question,list of: answer1, answer2, answer3
|
|||
```
|
||||
|
||||
**Note:** If your answers contain commas, they will be considered as part of the answer. Only the first comma is used to separate the question from the answer.
|
||||
|
||||
### Image to Text Conversion
|
||||
|
||||
To convert images from a directory to a single text file using OCR:
|
||||
|
||||
```bash
|
||||
python images2text.py /path/to/your/image_directory/
|
||||
```
|
||||
|
||||
This will produce a `final.txt` file which contains the text extracted from the images.
|
||||
|
||||
#### Supported Image Formats
|
||||
|
||||
Currently supported formats for the images are: `.png`, `.jpg`, and `.jpeg`.
|
||||
|
||||
## License
|
||||
|
||||
[MIT License](LICENSE)
|
||||
|
||||
## Contributing
|
||||
|
||||
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
|
Loading…
Reference in New Issue
Block a user