ReCalendar - highly customizable calendar for ReMarkable tablets

Overview

ReCalendar

Highly customizable calendar for ReMarkable tablets

ReCalendar allows you to generate your own, personalized calendar using PHP and the mPDF library.

How does it look?

See it in action: https://youtu.be/Ys2fNQu0v0o and check more screenshots. Example generated PDF version and the local.config.php that generated it.

2021-07-04.17_04_21.mp4

Blank version

Don't want to/need to/can customize it? Check out the ready-to-use blank version - it still benefits from the quick navigation through links, layout optimized for RM, etc. - just misses your personal touch :)

Features

  • Optimized for the ReMarkable 2 tablet (should work with version 1 as well) to use the full space available and minimize screen refreshes.
  • No hacks needed - the generated PDF is a normal file, with links, etc. that you can simply upload normally to your tablet.
  • Heavy use of links to allow quick and easy navigation.
  • Lots of easy configuration options to tailor the calendar to your needs - plus access to the source code for even more advanced customization.
  • Easily switch to any locale supported by PHP.
  • Add extra pages to all or selected days of the week to suit your needs.
  • Provide a list of special dates (anniversaries, birthdays, etc.) and let ReCalendar embed them into your personalized calendar - on monthly views, weekly overviews and finally, day entries.
  • Track your habits monthly.
  • Start the "year" on arbitrary month (can be useful for tracking academic years, etc.).

Quickstart

Dependencies:

On MacOS, you can quickly install them with Homebrew: brew install php composer.

Then fetch the newest code from this repository - the easiest way is to download the ZIP archive of it.

Go to the folder where you unzipped/cloned the repository and run:

composer install
php generate.php

After a few seconds you should have your very own ReCalendar.pdf calendar generated in the same directory.

Configuration

You can easily override the configuration defaults by creating a new file called local.config.php. Here's a short example that changes the year to 3000, adds some weekly TODOs and special dates:

<?php

namespace ReCalendar;

class LocalConfig extends Config {
  protected function get_configuration() : array {
    return array_merge( parent::get_configuration(), [
      self::YEAR => 3000,
      self::SPECIAL_DATES => [
        '04-05' => [ 'May The Fourth Be With You' ],
	'24-12' => [ 'Christmas' ],
      ],
      self::WEEKLY_TODOS => [
        'Plan week',
	'Send the weekly email',
      ],
    ] );
  }
}

See the config.php file for the full list of available options and their descriptions. You can modify the options there as well, but it's recommended to use the local.config.php instead as then you can easily update the source code in the future and retain your configuration changes.

There's also an example generated PDF you can check out quickly and the local.config.php that generated it as an inspiration.

Advanced configuration example

This is an example configuration for the Polish language (my native language), showing how you might want to approach it yourself, for your language.

<?php

namespace ReCalendar;

class LocalConfig extends Config {
  protected function get_configuration() : array {
    return array_merge( parent::get_configuration(), [
      // See `locale -a` if your locale is supported
      self::LOCALE => 'pl_PL.UTF-8',
      // Override the month names, because the Polish locale
      // has them declined, but I prefer them like this
      self::MONTHS => [
        1 => 'Styczeń',
        2 => 'Luty',
        3 => 'Marzec',
        4 => 'Kwiecień',
        5 => 'Maj',
        6 => 'Czerwiec',
        7 => 'Lipiec',
        8 => 'Sierpień',
        9 => 'Wrzesień',
        10 => 'Październik',
        11 => 'Listopad',
        12 => 'Grudzień',
      ],
      // Some habits I want to track
      self::HABITS => [
        'Jogging',
        'Hobby',
        'Książka',
      ],
      // These will be shown on each week overview
      // to help me plan the week.
      self::WEEKLY_TODOS => [
        'Odkurzyć mieszkanie',
        'Zaplanować wycieczkę',
      ],
      self::WEEK_NAME => 'Tydzień',
      self::WEEK_NUMBER => 'T#',
      self::DAY_NAMES_SHORT => [
        'Pn',
        'Wt',
        'Śr',
        'Cz',
        'Pt',
        'So',
        'Nd',
      ],
      self::DAY_ITINERARY_ITEMS => [
        self::DAY_ITINERARY_COMMON => [
          [ 21, '', ],
          [ 2, 'One act of kindness', ],
        ],
        // You can use day of the week numbers (4 being Thursday here)
        // to override the itinerary items for those specific days.
        4 => [
          [ 21, '', ],
          [ 3, 'One act of kindness', ],
          // Adding more than ~24 lines forces a new page to be created
          // You can use that to add an additional page for days you
          // need to write more
          [ 28, 'Notes from session', ],
        ],
        self::DAY_ITINERARY_WEEK_RETRO => [
          // Just give me 24 lines, without any text
          [ 24, '' ],
        ],
        self::DAY_ITINERARY_MONTH_OVERVIEW => [
          [ 3, 'Main goal', ],
          [ 13, 'Notes', ],
        ],
      ],
      self::SPECIAL_DATES => [
        '14-03' => [ 'Pi Day' ],
        '25-12' => [ 'Christmas' ],
	// Note that you can, of course, have more than one item per day:
	'04-05' => [ 'Star Wars Day', "Will Arnett's birthday" ],
      ],
      self::WEEKLY_RETROSPECTIVE_BOOKMARK => 'Podsumowanie',
      self::WEEKLY_RETROSPECTIVE_TITLE => 'Podsumowanie tygodnia',
    ] );
  }
}

Update

Just run php generate.php any time you need to regenerate the calendar after config changes. If you want to update the recalendar source code, either use git pull or download the newest ZIP archive and override all the files (make sure you're using the local.config.php approach, as described above).

NOTE: The update process is mostly for when you're tweaking your configuration and/or generating a calendar for the next year. Due to how ReMarkble tablet works, you can't easily "migrate" your notes from your previous version of the calendar/file to the new one. To the tablet, it's a new, "empty" file. You can select and copy notes from each page individually and move them over, but that's very cumbersome.

Known issues

Links are hard to trigger

Unfortunately, due to the limitations of mPDF, lots of layouting was done using tables (hello webdevelopment in 2000s ;)). As a result, the links usually only take up as much space as their text. So it's easier to target 11 than 1, because it's "bigger". I've tried different approaches, but it boils down to no block items in tables in mPDF and it's not something I can overcome. I'd have to switch to a different library, but that's something I realized too late in the process. In practice, I did not find it that disruptive, but, of course, YMMV.

It's slow to generate

It takes around 15-20 seconds to generate the full file on my laptop - YMMV. I've tried optimizing the script, but the profiling data clearly showed the bottleneck is in the mPDF library. So there was not much I could do (except for trying some configuration options that had marginal impact). In the end, it's not bad since you will only "feel" this when trying out different configuration options. The PDF itself, of course, works like any other PDF files.

It does not cover the full page on my XYZ tablet/device

I only have ReMarkable 2 to test with and I wanted to take up all the available space on the screen for it. So it's been optimized for RM2's screen size. Try adjusting the format configuration option and editing the CSS styles.

License

GPL-3.0 License. In particular, this means that you can do what you want with this code, but you have to publish your changes with the same license. Please consider submitting a PR, if you have an idea for a great improvement! 🙏 My main motivation was to scratch my own itch, but as a result I might have missed your use case so I'm happy to hear how this generator can be improved 🙇

Comments
  • error regarding cells blocktag

    error regarding cells blocktag

    Notice: Trying to access array offset on value of type null in C:\Users\me\Downloads\recalendar-main\recalendar-main\vendor\mpdf\mpdf\src\Tag\BlockTag.php on line 117 PHP Fatal error: Uncaught Mpdf\MpdfException: Error detected. PDF file generation aborted: Trying to access array offset on value of type null in C:\Users\me\Downloads\recalendar-main\recalendar-main\vendor\mpdf\mpdf\src\Tag\BlockTag.php:117

    the error points to this code:

    if ($this->mpdf->cell[$this->mpdf->row][$this->mpdf->col]['s'] > 0 && !$this->mpdf->nestedtablejustfinished)

    i have checked ins and outs of tags thats fine.

    opened by k-byte-rgb 6
  • php generate.php throws

    php generate.php throws "HP Fatal error: Uncaught Error: Class 'ReCalendar\Config' not found in /home/oren/p/recalendar/config.php:5"

    git clone https://github.com/klimeryk/recalendar
    cd recalendar
    
    composer install
    Installing dependencies from lock file (including require-dev)
    Verifying lock file contents can be installed on current platform.
    Your lock file does not contain a compatible set of packages. Please run composer update.
    
      Problem 1
        - mpdf/mpdf is locked to version v8.0.11 and an update of this package was not requested.
        - mpdf/mpdf v8.0.11 requires ext-gd * -> it is missing from your system. Install or enable PHP's gd extension.
    
    To enable extensions, verify that they are enabled in your .ini files:
        - /etc/php/7.4/cli/php.ini
        - /etc/php/7.4/cli/conf.d/10-opcache.ini
        - /etc/php/7.4/cli/conf.d/10-pdo.ini
        - /etc/php/7.4/cli/conf.d/20-calendar.ini
        - /etc/php/7.4/cli/conf.d/20-ctype.ini
        - /etc/php/7.4/cli/conf.d/20-exif.ini
        - /etc/php/7.4/cli/conf.d/20-ffi.ini
        - /etc/php/7.4/cli/conf.d/20-fileinfo.ini
        - /etc/php/7.4/cli/conf.d/20-ftp.ini
        - /etc/php/7.4/cli/conf.d/20-gettext.ini
        - /etc/php/7.4/cli/conf.d/20-iconv.ini
        - /etc/php/7.4/cli/conf.d/20-json.ini
        - /etc/php/7.4/cli/conf.d/20-phar.ini
        - /etc/php/7.4/cli/conf.d/20-posix.ini
        - /etc/php/7.4/cli/conf.d/20-readline.ini
        - /etc/php/7.4/cli/conf.d/20-shmop.ini
        - /etc/php/7.4/cli/conf.d/20-sockets.ini
        - /etc/php/7.4/cli/conf.d/20-sysvmsg.ini
        - /etc/php/7.4/cli/conf.d/20-sysvsem.ini
        - /etc/php/7.4/cli/conf.d/20-sysvshm.ini
        - /etc/php/7.4/cli/conf.d/20-tokenizer.ini
    You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
    ~/p/recalendar ls
    composer.json  composer.lock  config.php  example  fonts  generate.php  generators  LICENSE  README.md  recalendar.php  SCREENSHOTS.md  style.css
    ~/p/recalendar php --ini
    Configuration File (php.ini) Path: /etc/php/7.4/cli
    Loaded Configuration File:         /etc/php/7.4/cli/php.ini
    Scan for additional .ini files in: /etc/php/7.4/cli/conf.d
    Additional .ini files parsed:      /etc/php/7.4/cli/conf.d/10-opcache.ini,
    /etc/php/7.4/cli/conf.d/10-pdo.ini,
    /etc/php/7.4/cli/conf.d/20-calendar.ini,
    /etc/php/7.4/cli/conf.d/20-ctype.ini,
    /etc/php/7.4/cli/conf.d/20-exif.ini,
    /etc/php/7.4/cli/conf.d/20-ffi.ini,
    /etc/php/7.4/cli/conf.d/20-fileinfo.ini,
    /etc/php/7.4/cli/conf.d/20-ftp.ini,
    /etc/php/7.4/cli/conf.d/20-gettext.ini,
    /etc/php/7.4/cli/conf.d/20-iconv.ini,
    /etc/php/7.4/cli/conf.d/20-json.ini,
    /etc/php/7.4/cli/conf.d/20-phar.ini,
    /etc/php/7.4/cli/conf.d/20-posix.ini,
    /etc/php/7.4/cli/conf.d/20-readline.ini,
    /etc/php/7.4/cli/conf.d/20-shmop.ini,
    /etc/php/7.4/cli/conf.d/20-sockets.ini,
    /etc/php/7.4/cli/conf.d/20-sysvmsg.ini,
    /etc/php/7.4/cli/conf.d/20-sysvsem.ini,
    /etc/php/7.4/cli/conf.d/20-sysvshm.ini,
    /etc/php/7.4/cli/conf.d/20-tokenizer.ini
    

    I fix it with composer install --ignore-platform-reqs

    i create a config.php

    <?php
    
    namespace ReCalendar;
    
    class LocalConfig extends Config {
      protected function get_configuration() : array {
        return array_merge( parent::get_configuration(), [
          self::YEAR => 3000,
          self::SPECIAL_DATES => [
            '04-05' => [ 'May The Fourth Be With You' ],
    	'24-12' => [ 'Christmas' ],
          ],
          self::WEEKLY_TODOS => [
            'Plan week',
    	'Send the weekly email',
          ],
        ] );
      }
    }
    

    and i run this command:

    php generate.php
    
    PHP Fatal error:  Uncaught Error: Class 'ReCalendar\Config' not found in /home/oren/p/recalendar/config.php:5
    Stack trace:
    #0 /home/oren/p/recalendar/generate.php(4): require_once()
    #1 {main}
      thrown in /home/oren/p/recalendar/config.php on line 5
    
    bug 
    opened by oren 6
  • Language translation to other

    Language translation to other

    Hello,

    I'm trying to change language to mine but with setup to cs_CZ.UTF-8 or any other lang have no effect to day names and other texts. Months defined by me under self::MONTHS =>... are only changed. Default languege keeps english and no idea where can I change it.

    Can you help me what could be wrong? I'm generating on windows.

    Thank you.

    EDIT: I really don't know, but it starts working after I changed some core files of composer... When I reverted the changes back, it still worked..., No idea what happend...

    opened by ONYX4407 5
  • Feature Request: Start the year at a predefined month

    Feature Request: Start the year at a predefined month

    Many years do not start in January. For college years start in August or September.

    I'd would love a configuration option where I can set the first month of the year.

    John

    enhancement 
    opened by DutchJoe 4
  • Feature Request: Year overview

    Feature Request: Year overview

    I'm quite impressed with this software! Thanks for releasing it under GPL3.

    I would love if there was a single page at the start of the document that looked something like this: Screenshot_20210705_130301

    I would then also liked the mini-calendar on each page to have a link to that overview, like so: image

    The use case is that if I'm in July and I want to add something to a different month that is further away, I have to go "next month" "next month" several times, whereas I would rather go "index" -> "actual month." That way it's always two steps, instead of variable amount of steps.

    Alternatively, if you don't want a Year Index. Maybe adding a quick select for the other months to the month overview would be neat. In this case here July is the currently selected month image

    and I can instantly jump into December from that bar.

    enhancement 
    opened by bennyandresen 4
  • Minimum docker support to avoid dependency installation

    Minimum docker support to avoid dependency installation

    Just added a Dockerfile so I can use your incredible tool without installing composer and php in my Mac ;) Not the perfect implementation, though. It "builds" a new image just to run the script, when it would be better to have an "official" image and run the whole process with just docker run, but I had no time, sorry.

    Thanks for your work!

    opened by jorgeuriarte 2
  • Unsupported characters

    Unsupported characters

    Hello, I think that font used in this awsome projetct does't support czech characters like č, ř, ě and maybe more. It will try to change font and check if it will help.

    opened by stehji 2
  • Overflow pages with date

    Overflow pages with date

    Hi - first of all great callendar. thanks Ive uploaded my created 2022 callendar and removed what I need and dont need etc.

    One question I have though is if there is anyway of adding the date to the "overflow" page (second page on each day) I would like the title to be "DD-MM-YYYY Additional Notes" with the day hyperlinks therefore if Im on an overflow page I can jump to the next day easily. Basically I need another day page with some additonal text. Is this possible I couldnt see this in your examples and wasnt able to work it out. Are you able to help?

    ReCalendar Created V1.0.pdf

    thanks

    opened by mrhlogic 1
  • Post blank versions for years to come

    Post blank versions for years to come

    For those of us that are simply interested in the standard, non-customized versions: would it be possible to post the PDFs by year (2022 and beyond)?

    thanks!

    opened by andpiazza 1
  • Add switch for pointing to config file

    Add switch for pointing to config file

    Would it be possible to add a switch for pointing to a different config file. Something like php generate.php -c <file>. This would be really handy for those of us who maintain several calendards. (In my instance a personal calendar and a work calendar). Most sensible I think would be for the switch to override using local config, so if the switch is present, use that file, if not look for local.config.php.

    opened by deadcyclo 1
  • Add the ability to set month count of generated calendar

    Add the ability to set month count of generated calendar

    I appreciate this project. I just started using it today. However, I only wanted a calendar to the end of the year.

    So, I added the ability to set the month count in the config. It simply adds the MONTH_COUNT config value that defaults to 12.

    opened by darylducharme 1
  • The Mini-calendars are sometimes missing the last week of the month

    The Mini-calendars are sometimes missing the last week of the month

    First: thank you for ReCalendar, it's really great!

    It seems that the mini-calendars are missing the last week of the month if the last day of the month is a Monday.

    For example, see: 2021: May 2022: January, February, October

    Thank You!

    opened by riitts 1
  • Sort pages

    Sort pages

    Would it be possible to rank the pages as follows?

    Title page Year overview Monthly reports 1 - 12 months Weekly reports 1- 52 weeks Retrospektive reports 1 - 52 weeks Dáte entry 1- 365 days

    Thank you.

    opened by PepikVaio 2
  • 2022 : Incorrect treatment of last week of previous and current year

    2022 : Incorrect treatment of last week of previous and current year

    In 2022 release : January 1st, 2022 belongs to 52's week of 2021. Pages for this week are not generated and, in mini-calendars, link directs to 52's week of 2022.

    opened by phileasb 1
  • strftime deprecated in php 8

    strftime deprecated in php 8

    [email protected] shows the function strftime() is deprecated. When attempting to generate, causes errors.

    Will look into the simplest way to ensure future compatibility.

    Screen Shot 2021-11-29 at 4 16 48 PM

    Screen Shot 2021-11-29 at 4 16 34 PM

    opened by Hacky-The-Sheep 1
  • Support for ICS Calendar

    Support for ICS Calendar

    It would be nice to see support to generate a text file that you can paste into local.config.php file to pull existing calendar events and populate the file.

    enhancement 
    opened by notenoughtech 2
  • Feature Request: Splitting note view into several columns (Two-columns note taking/Cornell)

    Feature Request: Splitting note view into several columns (Two-columns note taking/Cornell)

    I would love if one could split views vertically, instead of merely horizontal. (Your example with the gratitude is a horizontal split for the purposes of this issue report.)

    A good use case for a vertical split would be the Cornell style note taking.

    image

    It's mostly advertised as note taking in lectures, but I find this style of note taking useful in all kinds of scenarios and having the ability to define vertical splits, may lead to other cool ideas.

    enhancement 
    opened by bennyandresen 12
Releases(v1.0.0)
Owner
Igor Klimer
Igor Klimer
The missing PHP 5.3+ calendar management library.

CalendR CalendR is an Object Oriented Calendar management library on top of PHP5.3+ Date objects. You can use it to deal with all your needs about cal

Yohan Giarelli 462 Dec 30, 2022
Display a calendar of commits from public GitHub repositories

commit-calendar Display a list of dates and commits from public GitHub repositories. You will display the list in the terminal, and you can choose to

Erika Gili 5 Jul 23, 2021
This helps with public holiday info using google calendar api

Public Holiday This package uses the Google Calendar API to fetch public holidays. The data always comes with 3 years data; the previous year, the cur

Temitope Olotin 5 Jul 13, 2022
Flexible Calendar for Laravel 4

Laravel 4 Calendar Flexible Calendar for Laravel 4, supports Month, Week and Day Views and multiple events per date. To change the view type dynamical

null 59 Dec 24, 2022
📆 Calendar app for Nextcloud

Nextcloud Calendar A calendar app for Nextcloud. Easily sync events from various devices with your Nextcloud and edit them online. ?? ?? Why is this s

Nextcloud 801 Dec 29, 2022
Manage events on a Google Calendar

Manage events on a Google Calendar This package makes working with a Google Calendar a breeze. Once it has been set up you can do these things: use Sp

Spatie 1k Dec 31, 2022
A package which provides a monthly calendar with days and events depending on given months and events.

A package which provides a monthly calendar with days and events depending on given months and events. This is where your description should go. Try a

MichaB 6 Nov 1, 2022
TeamCal Neo is a web application of a day-based calendar

TeamCal Neo is a web application of a day-based calendar. It's generic purpose is the absence and event management of project teams, music bands and other groups needing a scheduler that focusses on days.

George Lewe 3 Nov 15, 2022
Simple Event/Calendar

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files

TolisM 2 Feb 1, 2022
Laravel 9 & React Event Calendar

###Event Calendar ##Projeyi docker üzerinde ayağa kaldırma #Acount Service accountService klasörü içine girerek docker-compose up --build komutu ile a

Muhammed Mustafa Bulut 4 Apr 19, 2022
Highly customizable alternative to var_export for PHP code generation

PHP Variable Exporter PHPEncoder is a PHP library for exporting variables and generating PHP code representations for said variables similar to the bu

Riikka Kalliomäki 71 Dec 30, 2022
Featured Calendar Maker v1.0 multingual extends the functionalities of the latest version of the FullCalendar (5.3.2), the most popular and completed JavaScript Calendar open source

Featured Calendar Maker v1.0 multingual extends the functionalities of the latest version of the FullCalendar (5.3.2), the most popular and completed JavaScript Calendar open source.

null 21 Oct 5, 2022
Mobile_Detect is a lightweight PHP class for detecting mobile devices (including tablets). It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment.

Motto: "Every business should have a detection script to detect mobile readers." About Mobile Detect is a lightweight PHP class for detecting mobile d

Şerban Ghiţă 10.2k Jan 4, 2023
WebUI for the reMarkable(R) cloud

rmWebUI rmWebUI is a simple web interface for the reMarkable® cloud. Install First run: composer run deploy This will create a dist/ folder with all

null 0 Jan 8, 2022
reMarkable File Sync API

reMarkable File Sync API Goal of this project is to figure out and document the API which is used by the reMarkable Paper Tablet for syncing documents

Andreas Gohr 282 Dec 19, 2022
PHP logging library that is highly extendable and simple to use.

Analog - Minimal PHP logging library Copyright: (c) 2012-Present Johnny Broadway License: MIT A minimal PHP logging package based on the idea of using

Aband*nthecar 331 Dec 21, 2022
Highly-extensible PHP Markdown parser which fully supports the CommonMark and GFM specs.

league/commonmark league/commonmark is a highly-extensible PHP Markdown parser created by Colin O'Dell which supports the full CommonMark spec and Git

The League of Extraordinary Packages 2.4k Jan 1, 2023
A super fast, highly extensible markdown parser for PHP

A super fast, highly extensible markdown parser for PHP What is this? A set of PHP classes, each representing a Markdown flavor, and a command line to

Carsten Brandt 989 Dec 16, 2022
PHP Scraper - an highly opinionated web-interface for PHP

PHP Scraper An opinionated & limited way to scrape the web using PHP. The main goal is to get stuff done instead of getting distracted with xPath sele

Peter Thaleikis 327 Dec 30, 2022
Highly opinionated mocking framework for PHP 5.3+

Prophecy Prophecy is a highly opinionated yet very powerful and flexible PHP object mocking framework. Though initially it was created to fulfil phpsp

PHPSpec Framework 8.5k Jan 3, 2023