Skip to content

MarcoTomasRodriguez/eprinter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo

eprinter

Automatically print email attachments.
Explore the docs »

View Demo · Report Bug · Request Feature

Description

Auto Printer is a process which helps to automatically print any file received in your Gmail that matches certain criteria.

For example, you can configure this program so that prints every attachment received from myworkaddress@gmail.com with the subject "Print".

(back to top)

Installation

Clone this repository and install:

go install github.com/MarcoTomasRodriguez/eprinter@latest

Download the credentials.json from your Google dev account and paste it in the program folder.

Authenticate using (following the instructions):

eprinter setup

Configure the program with the following command (writing in your own config):

sudo nano ~/.eprinter/config.toml

Create a crontab using:

crontab -e

Configure the process however you want, for example:

0,30 * * * *  eprinter

(back to top)

Configuration file

The configuration file is located at $HOME/.eprinter/config.toml

Structure

allowed_emails []string
allowed_email_subjects []string
printed_label_name string

Example

# Accept emails comming from "myemail@provider.com" and "someemail@provider.com".
allowed_emails = ["myemail@provider.com", "someemail@provider.com"]

# Accept emails with the title "Print", "Drucken" or "Imprimir".
allowed_email_subjects = ["Print", "Drucken", "Imprimir"]

# After the email was printed, add the label "Printed" so we do no print it twice.
printed_label = "Printed"

Note: Subjects cannot have spaces.

(back to top)

About

Automatically print email attachments.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages