Metadata-Version: 2.1
Name: ankigengpt
Version: 1.3.0
Summary: 
Author: rwxd
Author-email: git@rwxd.de
Requires-Python: >=3.10,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: beautifulsoup4 (>=4.12.2,<5.0.0)
Requires-Dist: ebooklib (>=0.18,<0.19)
Requires-Dist: genanki (>=0.13.0,<0.14.0)
Requires-Dist: jinja2 (>=3.1.2,<4.0.0)
Requires-Dist: openai (>=0.27.7,<0.28.0)
Requires-Dist: pdfplumber (>=0.9.0,<0.10.0)
Requires-Dist: pydub (>=0.25.1,<0.26.0)
Requires-Dist: pyyaml (>=6.0,<7.0)
Requires-Dist: ratelimit (>=2.2.1,<3.0.0)
Requires-Dist: rich (>=13.4.2,<14.0.0)
Requires-Dist: tiktoken (>=0.4.0,<0.5.0)
Requires-Dist: typer (>=0.9.0,<0.10.0)
Description-Content-Type: text/markdown

# AnkiGenGPT

AnkiGenGPT is a Python CLI tool that harnesses the power of OpenAI's GPT-3 or GPT-4 model to transform your text into flashcards for Anki, an open-source spaced repetition software.

## Install

You can install AnkiGenGPT using pip:

```bash
pip3 -U install ankigengpt
```

Alternatively, you can use pipx for installation:

```bash
pipx install ankigengpt
```

## Configuration

To use AnkiGenGPT, you need an OpenAI API token, which can be provided either through the --openai-token command-line option or via the OPENAI_TOKEN environment variable.

## Epub

AnkiGenGPT can scan an epub file for text and use ChatGPT to create Anki cards. Here's an example of how to use it:

```bash
ankigengpt epub --path ~/Downloads/my-ebook.epub
```

## Kindle Highlights

To generate Anki cards from Kindle highlights, ensure the highlights are in the APA format, and then run the following command:

```bash
ankigengpt kindle-highlights --path ~/Downloads/Notebook.html
```

## Kobo Highlights

For Kobo highlights, you can enable the export feature on your Kobo device by connecting it via USB and modifying the .kobo/Kobo/Kobo eReader.conf file. Add the following under [FeatureSettings]:

```ini
[FeatureSettings]
ExportHighlights=true
```

After enabling export highlights on the Kobo device, you can retrieve the highlight files via USB and use the kobo-highlights command to create Anki cards:

```bash
ankigengpt kobo-highlights --path ~/Downloads/BookHighlights.csv
```

## Plain text

ou can also use AnkiGenGPT with plain text files such as markdown or txt. Here's how to use it:

```bash
ankigengpt plain --path ~/Downloads/book.md
```

## Debugging

To debug AnkiGenGPT, you can use the --debug option.

