As the year comes to a close, I began thinking I need to prepare my reMarkable PDF agenda for 2024. I first discovered the concept from
Vitaliy Kudryk’s latex-yearly-planner then found the amazing website ReCalendar that allows you to build your own personalized calendar PDF for Remarkable tablets. It is how I have been mostly using my reMarkable this year, and the only little complaint I had about the calendar is that it has lines instead of dots:
So, as we are enjoying a loooong holiday weekend here in Spain I thought I would try and prepare a PDF calendar with dots!
I thought the my ticket to making my own doted PDF calendar agendas would have been via Vitaliy Kudryk’s latex-yearly-planner but the more deeply I dove into the forum and multiple different types of PDFs he has made available, the more I realized that to use his code I would need to at least understand a little about LaTeX, something I had been avoiding since my university days when I was first exposed to it, emacs and vi. Of the three the only I used then and still use today (still as a newbie) is vi, and kinda figured if I made it this far with out the LaTeX tool in my belt I could leave that space open for some other tool and not dedicate my dwindling synapses to trying to understand something clearly out of my league.
So I tunned my attention to ReCalendar and realized it too was open source with the code on GitHub. I began reviewing the discussions and pull requests and found that someone had tried to do just what I was looking for: Support for Dotted Itinerary Pages. So after a bit of playing around I was able to get a docker container running the current version of ReCalendar and then downloaded the pull request version and got it to generate me a PDF calendar agenda with dots:
Implementation details
The first thing I need was a docker container to launch ReCalendar. Please note that I see and use docker as a way to have a small virtual machine that is stuck in time and does one thing, and I can count on it still doing that one thing today, tomorrow, and the next day, even if my OS has changed, my Python version has changed, or any of the other multiple dependencies have changed. The reason I feel this need is due to me being unable to develop for my Pebble because some MacOS update totally broke the development and cross compilation chain that was working so well.
So first I fired up a debian container with a folder mapped so I can edit recalendar (-v) from Visual Studio Code if need be, and port 91 (-p) exposed and mapped to the containers port 3000 (where recalendar will be listening once started) :
sudo docker run -it -d --restart unless-stopped --name recalendar -p 91:3000 -v /sd/pv/recalendar:/recalendar:rw arm64v8/node:18-bullseye
I then connected to the little doggie and downloaded the most recent version of Recalendar:
pi@ersa:~ $ sudo docker exec -it recalendar /bin/bash
root@2c4554a7e94d:/# cd /recalendar
root@2c4554a7e94d:/recalendar# wget https://github.com/klimeryk/recalendar.js/archive/refs/heads/master.zip
Saving to: 'master.zip'
master.zip. [ <=> ] 3.09M 2.67MB/s in 1.2s
2023-12-07 18:13:40 (2.67 MB/s) - 'master.zip' saved [3241877]
root@2c4554a7e94d:/recalendar#
I then unzipped it and did a couple yarn things that I have no idea what this does or means:
yarn install
yarn start
and waited a bit and saw this:
Compiled successfully!
You can now view recalendar.js in the browser.
Local: http://localhost:3000
On Your Network: http://172.17.0.13:3000
Note that the development build is not optimized.
To create a production build, use yarn build.
webpack compiled successfully
Could it really have been that easy????
Well yes it can:
Just to be sure I generated a 2024 line PDF calendar agenda and it worked like a charm. But the more amazing magic happened when I downloaded the pull request version and fired it up to see a new option:
As gmg mentioned in his pull request there are some limitations such as trying to add an additional page to daily entries generates an out of memory when generating the final pdf, but after some experimenting I decided a single page WITH DOTS is just fine and dandy for my needs!
The best is now I have the ability to generate my own PDF calendar agenda in the years to come!
Some final checks
Any external dependencies?
Just to be sure that my ReCalendar docker image was really stand alone not dependent on some internet libraries I fired up a tcpdump started recalendar, generated a PDF calendar agenda and ensured that I saw not outbound traffic.
I also did the same from the debug window of Edge to ensure my browser was not loading any scripts from sources other than my local docker image and looks all good!
backup and restore test
I then made a backup of the docker image:
pi@ersa:~/docker-recalendar $ sudo docker image save -o recalendar.tar 8c17fd2846d3
and copied it and the persistent volume file system to another raspberry pi and tested loading it and ensuring that it was a complete image with the ReCalender ready to go:
sudo docker import recalendar.tar recalendar
sudo docker run -it -d --restart unless-stopped --name recalendar -p 91:3000 -v /sd/pv/recalendar:/recalendar:rw recalendar
but it does not work!!!
pi@raspberrypi:~/recalendar $ sudo docker run -it -d --restart unless-stopped --name recalendar -p 91:3000 -v /sd/pv/recalendar:/recalendar:rw recalendar
docker: Error response from daemon: No command specified.
Hummm! I will have to continue to test and update here once working!
That children is why you ALWAYS test backups!!!!
Links, References and things that helped with this
Thanks for reading and feel free to give feedback or comments via email (andrew@jupiterstation.net).