Add support for templates, and use chrome rendering (with option to opt-out)#68
Add support for templates, and use chrome rendering (with option to opt-out)#68avncharlie wants to merge 4 commits intoScrybbling-together:mainfrom
Conversation
|
I cannot merge the templates since they are copyrighted. I will not merge those without explicit permission from reMarkable. The logic is otherwise great though, especially with the I'm looking into whether it's possible to get the templates through rmapi, otherwise it's a bit awkward to set-up :/ Claude suggested just writing the templates by hand with different variable names and the like, because what's copyrighted is the reMarkable-authored JSON files, not the concept of a lined document that's uhh... Honestly not the stupidest idea? But I do think it's a lot of work to author all of them from scratch. I think it's fine to merge this with the following changes
|
…to reMarkable templates and fonts they provide
|
I've added these changes, including allowing the user to set the reMarkable fonts from remarks (using the --fonts-dir option). This involved updating rmc, the corresponding pull request is here: Scrybbling-together/rmc#15 |
This PR bundles reMarkable templates into remarks, and adds functionality to render templates.
Here's a notebook rendered with this PR with some complex templates: Templates.pdf

Sample page:
Templates files are a set of instructions of how to draw a template, including setting up variables, and then providing repeating patterns that use these variables to draw templates. This code is in: remarks/conversion/template.py.
This involved an architecture change - instead of using RMC to generate a pdf, we now use it to generate a svg, which we then add our template svg to in the background, and then convert to PDF. Doing this means we need to use chrome/chromium headless to keep the embedded fonts in the rmc output. This PR adds that via calling this functionality which is already in rmc (in PR: Scrybbling-together/rmc#10)
There's also a
--no-chromeoption to keep using the cairo pdf conversion and lose the fonts, and--chrome-locargument to specify chrome location if remarks/rmc can't find it.