Azeirah / Scrybbling-together

What if we could hand-write websites from a ReMarkable?
GNU General Public License v3.0
2 stars 0 forks source link

would love to collab on some email functionality! #1

Open j6k4m8 opened 1 week ago

j6k4m8 commented 1 week ago

I have a similar-but-opposite project remailable which may have some good code for you to steal here? unfortunately things there are a bit stale there because they depend on (*my fork of) the old rmapy codebase... (also working on an up-to-date Python SDK here if it's of any interest — with HUGE thanks to you @Azeirah for some incredible reverse-engineering work on the rm format!!!!)

Thought I'd mention it in case there are some useful emaily things to borrow! There's also epistolary which does some OCR on the emails first but that could of course be disabled... this one uses subprocess calls to rmapi but works without email because it polls reMarkable cloud files...

Anyway! Lest this accidentally seem like an ad for my repos... :) I'm excited to watch this space and hopefully contribute!

Azeirah commented 1 week ago

Anyway! Lest this accidentally seem like an ad for my repos

This repository is an ad that is meant to attract people like yourself.

What reverse engineering are you talking about? The reverse engineer at the core of our community is ddvk. I have done some work myself too, is it significant? If so, please outline what about it is significant! Thank you so very much.

Azeirah commented 1 week ago

https://github.com/j6k4m8/epistolary

HOLY SHIT this is brilliant.

j6k4m8 commented 1 week ago

Thank you so much!! In particular this work of yours has been super helpful :)

I've been using Epistolary a lot recently, I think one thing that I want to update that might help here a lot:

I'm (someday) planning on updating the Orchestrator#send_outbox logic to support including the original handwriting as an image or PDF attachment... Maybe a better generalization is to let a caller choose if they want OCR text or imagery? And then maybe this repo could take advantage of the document sync logic perhaps..? Dunno :)

j6k4m8 commented 1 week ago

Something nice about the file sync workflow for this repo (instead of the email-from-rm workflow) is that you could foreseeably also edit your website by editing the underlying document on the tablet!

Azeirah commented 1 week ago

Something nice about the file sync workflow for this repo (instead of the email-from-rm workflow) is that you could foreseeably also edit your website by editing the underlying document on the tablet!

Oh yes! Oohhh yes.

This turns the ReMarkable into a fully fledged authoring tool for a calmer web. That's the idea.

There are a few reasons I want to stay away from sync:

  1. The API is unstable (ReMarkable changes it all the time)
  2. Their legal team has precedent of killing tiny businesses building on their API
  3. E-mail (as an API) is extremely stable, SMTP ran in 1960, it runs in 2024, it will run in 2060.
  4. The whole reason why the ReMarkable is a good device is because it is a medium in which every decision you make needs time. It's not the fastest device. Handwriting is slower than typing. Taking visual notes is even slower than handwriting.
  5. When a business has access to the ReMarkable api, this business has access to:
    1. The option to permanently delete, corrupt or hold all files from the device hostage (like those criminals who access your pc, then proceed to encrypt all your files and ask for some BTC for the encryption key)
    2. Steal all content from the device without the owner knowing
    3. A bug could do any of the above
    4. The data at rest for the sync cannot be e2e encrypted, since ReMarkable themselves don't e2e encrypt the data
  6. With e-mail, the owner device is in full control of what gets sent where and when. Want to use a hosted solution for this ReMarkable authoring site thing? Well, sure you can, you send an e-mail and we receive the e-mail and it becomes available on {youruser}.scrybble.ink. Everything is a deliberate and slow choice.
    1. Don't want to do it on scrybble but on your own site? Well that's perfectly ok, everything scrybble does is open-source at its core. You can just host a remarkable e-mail inbox yourself. Don't know how to do that? Well we can help set you up, or send you to the person who can help you set it up, or whatever anyone wishes. Perhaps someone needs a privately hosted site for internal documentation written by a team of distributed engineers using ReMarkables as their primary communication device? No problem. We can help set it up.

^ TLDR!

tl;dr: Sync has privacy issues and is hard to maintain for a long time. Let's focus on super small services that do one thing well, unix-style, and open-source those for the benefit of all the community. I will use Scrybble as a business to benefit the open-source community as a whole.

Azeirah commented 2 days ago

Hmm.. I'm thinking about what the basic components would look like.

I think we need:

  1. A software service that can read mails from an e-mail inbox, potentially simply by logging in with IMAP?
    • [ ] Retrieve the relevant metadata out of an e-mail received from a ReMarkable
      • [ ] Filename
      • [ ] Date
      • [ ] Pages
      • [ ] Tags
    • [ ] Get the exported SVG

I think it makes most sense to write it in python or php. And it can be packaged as a docker container too for easy usage anywhere.

Azeirah commented 2 days ago

Oh and for what it's worth, rmapi is now maintained by ddvk: https://github.com/ddvk/rmapi/releases