PaperEmail

command module
v0.0.0-...-1809e84 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2021 License: GPL-3.0 Imports: 6 Imported by: 0

README

PaperEmail

My goal is to implement a complete email correspondance workflow on the reMarkable 2 with only server code - no mods on the reMarkable itself. (I under-voltaged my reMarkable 1 with a software mistake...)

The long plan is to use the reMarkable 'lines' format in a notebook for each thread for sketching images/html, rendering text, incrementally OCR-ing and replacing text to draft messages and replies, and accepting check-box or option-circled decisions to select recipients and send. Mail folders including drafts and labels should be respected.

For now, I'll just use pdfs...

Reading Proof-Of-Concept

  • SMTP email receiving
  • naive raw body->tempfile->pdf

Reading MVP

  • IMAP email receiving
  • PDF generation
    • header->filename
    • input sanitization
    • envelope templating
    • body templating

UI Proof-Of-Concept

  • composition template image/PDF
  • text-box and option-circled recognition
  • composition OCR
  • composition annotation->image replacement
  • replacement editing markup recognition

Sending MVP

  • compose replies
  • contact nick-names (address book)
  • SMTP email sending

Reliable Sync

  • IMAP reconnect on connection-lost
  • draft sync
  • folder sync

'Lines'

  • sketch images
  • write text
  • replace annotation->image replacement with 'lines'
  • notebooks for threads, pages for mail, horizontal lines for sections

Composition UX

  • view text, code, image, pdf attachments in notebook
  • insertion markup
  • lower/upper case markup

Email Protocols

This will be an IMAP&SMTP client, receiving mail and syncing folders, drafts, and labels over IMAP but sending over SMTP.

For now though, the easiest thing was to immediately receive all mail via a receiving-only self-hosted SMTP server.

SMTP

I used emersion's go-smtp server for this with two additional filtering steps in smtp.go exported to main.go.

Templating

The server will then have to template the email (txt and html), 'print' it to pdf, and upload it to the reMarkable cloud.

For the templating, I'm looking at alps.

PDF Generation

Unfortunately none of the webkit-based cli printing solutions I've tried have produced suitable results (for arbitrary html emails), so I'll have to use a (whole freaking) headless browser with a Webdriver for the initial pdf generation. This probably means that the composition part will have operate on completely separate pages...

I've gotten the best results from remarkable-cups, or at least when printing on A5 sized paper with 0.25in margins and fit-to-width.

reMarkable Cloud

Then for connecting to the reMarkable cloud, I'll use rmapi, either as a separate binary or perhaps as a Go library - maybe the api pkg.

IMAP

I'm using emersion's go-imap client for this.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL