Giter Site home page Giter Site logo

j0ha / pdf-anki Goto Github PK

View Code? Open in Web Editor NEW

This project forked from benno094/pdf-anki

0.0 0.0 0.0 603 KB

A GUI to automatically create and add Anki flashcards from a .pdf file using the OpenAI API

Home Page: https://pdf-anki.streamlit.app/

Python 85.67% TypeScript 10.52% HTML 3.81%

pdf-anki's Introduction

PDF to Anki

Introduction

PDF to Anki program using GPT3.5-turbo from OpenAI. Streamlit is the web-GUI. Shout-out to OpenAI and Streamlit for saving me a ton of work!.

Version 0.5 alpha (Not perfect, but usable).

Requirements:

  • Anki running with AnkiConnect installed (Addon #: 2055492159)

If compiling to run locally:

  • An OpenAI key
    • Needs to be added as OPENAI_API_KEY="[Key here]" in .streamlit\secrets.toml
  • "Add "http://localhost:8501" to "webCorsOriginList" under Tools -> Addons -> Config, then restart Anki."

Usage:

  1. Select a page range and a language for the flashcards.
  2. Choose a PDF file. Cards will automatically be created for each page.
  3. Flash cards are displayed and can then be modified before being added to Anki.

To do:

  • Option to add card
  • Add option to choose title of deck and possibly call up available decks in Anki to choose location
  • Allow user to change prompt options
  • Add formatting in response

Changelog:

0.5 alpha

  • Lowered chance that GPT returns non-parseable result by moving to functions
  • Skip pages without relevant info

0.46 alpha

  • Added JPEG compression to reduce image size
  • Fixed key error causing Streamlit crash
  • Stopped unnecessary regenerations of flashcards

0.45 alpha

  • Improved memory usage
  • Can now add flashcards to Anki without running locally
  • Added filename and page as tag
  • Max. uploaded file size reduced to 50MB

0.4 alpha

  • Can now add without running locally
  • Can now add page range and change on-the-fly
  • Option to select returned language

0.3 alpha

  • User is updated on status and errors
  • Improved GPT prompt

0.2 alpha

  • Changed to Streamlit Web-GUI
  • Removed image detection
  • Shifted flashcards view to show alongside page preview
  • Using pymupdf instead of pdf2image to reduce reliance on external libraries

0.1 alpha

  • First release

pdf-anki's People

Contributors

benno094 avatar j0ha avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.