Skip to content

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

Notifications You must be signed in to change notification settings

01MI/Convert_and_send_pdf_files_to_Goodnotes_email

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

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

Context

Goodnotes is a note-taking app with a functionnality that allows users to send PDFs files(only) to their goodnotes app using a private goodnotes email.
This script allows you to convert and send all your images/documents in one email from your gmail address to your goodnotes email address.

This script uses img2pdf and pandoc for the conversion part, you will find a list of supported input formats below.
For archives, it only supports .zip and cannot extract nested archives.

Prerequisites

  1. You will need to install the dependencies specified in requirements.txt
  2. You will need to create a .env file with the following informations.
    I recommand creating a new gmail account for this usage.
    EMAIL_SENDER = your gmail address
    EMAIL_PASSWORD = your gmail password
    EMAIL_RECEIVER = your goodnotes email
    

Usage

You will need to move this script and .env in the same directory where are located the files you want to convert and send.
There are 2 commands:

  1. The following command will convert any files in the current directory and subdirectories.
    It will extract zips in a folder and convert their files(directory and subdirectories).

    python3 main.py

    Example:

  2. You can decide to only send already converted PDFs files using the argument "-send-only". This following command will look for any PDFs files in the current directory and subdirectories.
    It will extract files from zips to look for PDFs files.

    python3 main.py -send-only

    Exemple:

Note:

  • This script extracts a zip in a folder of the same name, if a folder already exists the programm stops.
  • If you convert a file and a PDF of the same name already exists, your PDF will be overwritten with the new converted PDF file.

Conversion formats

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

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

To do

  1. Support for other email providers.
  2. Support for other types of archives, currently it only supports .zip.
  3. 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

 
 
 

Languages