Skip to content

01MI/Convert_and_send_pdf_files_to_Goodnotes_email

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Python script to automatically convert and send PDFs to goodnotes email.

Context

Goodnotes is a note-taking app that includes a feature allowing users to send PDF files to the app via a private Goodnotes email address. Only PDF files are accepted through this feature.
This script lets you convert and send multiple images or documents in a single email from your Gmail account to your Goodnotes email address making them directly accessible on all your devices with Goodnotes installed.

It uses img2pdf and pandoc for file conversion. You’ll find a list of supported input formats below.
For archive files, only .zip is supported, and the script cannot extract nested archives.

Prerequisites

  1. You will need to install the dependencies listed in requirements.txt
    pip3 install -r requirements.txt
    
  2. You will need to create a .env file with the following information.
    I recommand creating a separate Gmail account for this purpose.
    EMAIL_SENDER = your Gmail address
    EMAIL_PASSWORD = your Gmail password
    EMAIL_RECEIVER = your goodnotes email
    

Usage

You will need to place this script and the .env file in the same directory as the files you want to convert and send.
There are 2 commands:

  1. The following command will convert all supported files in the current directory and its subdirectories.
    It will also extract any .zip files into a folder and convert their contents(including files in subdirectories).

    python3 main.py

    Example:

  2. You can choose to only send already converted PDF files by using the -send-only argument.
    This command will search for all PDF files in the current directory and its subdirectories.
    It will also extract .zip files to look for PDFs inside them.

    python3 main.py -send-only

    Exemple:

Note:

  • This script extracts .zip files into folders with the same name. If a folder with that name already exists, the program will stop.
  • If a file is converted and a PDF with the same name already exists, the existing PDF will be overwritten by the newly converted file.

Conversion formats

Here are the input formats supported by this script:
For Img2pdf:
Table of supported input formats from https://pypi.org/project/img2pdf/ :

For Pandoc:
Table of supported input formats from Pandoc User's Guide https://pandoc.org/MANUAL.html :

To do

  1. Add support for other email providers.
  2. Implement support for more archive formats, only .zip files are currently supported.
  3. Add support for nested archives.

About

Python script to convert and send images/documents from your gmail address to your goodnotes email address.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages