Skip to content
forked from JunMagic88/TLDR

Summarise your texts (eBooks, Youtube, PDFs, etc.) with chatGPT

License

Notifications You must be signed in to change notification settings

PlutoniaX/TLDR-1

 
 

Repository files navigation

TLDR.app

Summarise longer texts (eBooks, Youtube, PDFs, etc.) with chatGPT

Setup

  1. Install Python: https://www.python.org/
  2. Download chromedriver https://chromedriver.chromium.org/downloads - NOTE: make sure you download the version that matches your Google Chrome version (check in About Chrome)
  3. Put the chromedriver executable file in a location and add that location to the PATH - follow guide here for Windows: and here for Mac:
  4. Create a chatGPT account: https://chat.openai.com/chat and log in using Google Chrome
  5. Press F12 to open console in Chrome. Go to Application > Cookies and Copy the session token value in __Secure-next-auth.session-token
  6. Download or git clone this repository to a local folder of your choice
git clone https://github.com/JunMagic88/TLDR.git
  1. Using a text editor, create and save a file named .env (no file extension) with a single line in its content: CHATGPT_SESSION_TOKEN=XXXXXXX replace XXXXXXX with the session token you got from step 5
  2. Navigate to the TLDR folder in Terminal (Mac) or Command Prompt (Windows) and run:
pip install -r requirements

Adding texts to summarise

  1. Add any .txt files in the /Texts folder
  2. Add any .epub or .pdf files in the /00.EPUBs+PDFs folder
  3. Add any YouTube links (can be video or public playlist URLs) to the Youtube

Let's TLDR!

  1. Run this to download the transcripts of the YouTube videos to the /Texts folder
python 01.GetTranscripts.py
  1. Run this to convert the epub and PDF files into .txt and save them in the /Texts folder
python 01.ParseToTxt.py
  1. Run this to break the files in /Texts into chunks that would fit into single chatGPT window
python 02.Chunkify.py
  1. Run this to start the summarisation. This should start a Chrome window. Do you try to login, it will close automatically. The summarised chunks are saved in /ChunkSummaries folder
python 03.Summarise.py
  1. Run this after all the chunks have been summarised. This will combine all chunk summaries back into a final summary for for each text in the FinalSummaries folder.
python 04.CombineSummaries.py

About

Summarise your texts (eBooks, Youtube, PDFs, etc.) with chatGPT

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%