klimeryk / recalendar

ReCalendar - highly customizable calendar for ReMarkable tablets
GNU General Public License v3.0
195 stars 23 forks source link

Package to run standalone #15

Closed darylducharme closed 2 years ago

darylducharme commented 2 years ago

One could use this to build a website that creates a custom calendar, but perhaps a standalone script for various OSs could be a good addition.

klimeryk commented 2 years ago

Yeah, it's definitely possible, but I opted not to go that route as I first wanted to get feedback on whether such a calendar generator would resonate with people. I might build up a website like that in the future, but in case else someone is interested, please remember that this is a GPL-3.0 Licensed library, so the website's source code has to be open-sourced and licensed with GPL-3.0 as well.

perhaps a standalone script for various OSs could be a good addition.

Since https://github.com/klimeryk/recalendar/commit/581d0b76cdae94e69fdba9d17e77ccc3cff2ace0, the script should be executable from the terminal. I'm not interested in packaging it easier than that, as that's additional maintenance burden. The generator requires some technical knowledge, so making it super-easy to use will just confuse people that will then realise they have to modify a PHP file to configure it ;)

Utopiah commented 2 years ago

How about becoming a NextCloud plugin? I was initially wondering about a Docker file but feel the NextCloud calendar has a lot of useful interesting features and relies on standards (.ical file input, CalDav sync) that would be challenging enough to add. Being able to generate a reMarkable PDF and ideally saving it straight to NextCloud Files (that can be mounted on reMarkable via davfs) would broader the audience a lot.

klimeryk commented 2 years ago

I don't use NextCloud, so not sure exactly how this would work. The way I see it, you generate this calendar once a year and it does not seem worth it to integrate too tightly with any cloud provider. And every time you re-generate the calendar, you lose the notes you wrote on them using the Remarkable tablet 🤔 I feel like I might be misunderstanding the idea, though, @Utopiah, could you explain it in more detail?

Utopiah commented 2 years ago

I had 1-way syncing in mind and not loosing the notes but that's assuming the number of pages remains constant.

From your example you generate a week based calendar so the idea would be to swap the pdf only e.g /home/root/.local/share/remarkable/xochitl/1234.pdf which means /home/root/.local/share/remarkable/xochitl/1234/ itself that stores the .rm Lines file and metadata would be untouched. It means, again assuming the same format, that the written notes would remain as overlay of the calendar but the events added on NextCloud would be added.

klimeryk commented 2 years ago

Interesting! I did not know that was a thing - I have not looked into how ReMarkable stores the metadata. I definitely see the appeal - but I'm not sure how to do it in a user-friendly way.

Problem one: if the number of pages have to remain the same, some old notes might be out of context. Some stuff might be out of bounds as well (if you change the number of habits, or empty lines between itinerary items). And most importantly, I guess you'd have to ensure somehow that the PDF is updated, without removing/losing the metadata. Which I guess rules out the options that most casual users would be using. And the whole "no hacks needed" to run this calendar.

I'm open to suggestions (I obviously did not know about the *.rm files, so I could be missing some other workarounds and options!). But I also recommend checking out https://github.com/klimeryk/recalendar.js/, which is reimplementation of this project, but as a React webapp: https://recalendar.me/. Though, I guess a PHP version would be easier to integrate as a service somewhere. But I really prefer working on the React version - it's much easier to build and extend (and already has more features than the PHP version).

Utopiah commented 2 years ago

I just tested by

  1. downloading your example ReCalendar.pdf,
  2. uploaded to my reMarkable and generated the meta data
  3. scribbled on page 1 and 2,
  4. modified on desktop ReCalendar.pdf by pdftk original.pdf stamp ~/Documents/signature.pdf output signed.pdf
  5. uploaded signed.pdf to the device
  6. replaced the ReCalendar.pdf by the signed one
  7. opened again on reMarkable

and my changes were indeed still there on the correct pages.

Regarding the "no hacks needed" then to be honest I'm not sure how.