Git Product home page Git Product logo

convert_and_send_pdf_files_to_goodnotes_email's Introduction

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.

convert_and_send_pdf_files_to_goodnotes_email's People

Contributors

01mi avatar

Watchers

 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.