Go library to parse and render Remarkable lines files

Overview

go-remarkable2pdf

Go library to parse and render Remarkable lines files as PDF.

Usage

package main

import (
	"fmt"
	"os"

	rm2pdf "github.com/poundifdef/go-remarkable2pdf"
)

func main() {
    // Render a single .rm lines file as PDF
    input, _ := os.Open("4.rm")
    output, _ := os.Create("out.pdf")
    rm2pdf.RenderRmFile(input, output)
    output.Close()

    // Render a full Notebook file as PDF
    output, _ := os.Create("out.pdf")
    rm2pdf.RenderRmNotebook("Notebook.zip", output)
    output.Close()
}

Features Supported

  • Line thickness
  • Eraser
  • Highlighter
  • Multiple layers
  • Multiple pages
  • .rm lines file
  • Notebook .zip file

Not Currently Supported

  • Background templates (grid, lines, etc)
  • PDF annotations
  • ePUB
  • Layer naming and visibility
  • Line effects (ie, the painbrush shows "brush marks" based on the speed of your stroke)

Example Output

go-remarkable2pdf

Original

Contributing

  1. If you want to make any other modification or refactor: please create an issue and talk to me prior to making your PR. This way we can talk about the feature, approach, and my own ability to commit to reviewing and merging code.

  2. I don't guarantee that I will keep this repo up to date, or that I will respond in any sort of timely fashion! Your best bet for any change is to keep PRs small and focused on the minimum changeset to add your feature.

  3. Of course, you are welcome to fork, modify, and distribute this code with your changes in accordance with the LICENSE.

Acknowledgements

You might also like...
🚩 TOC, zero configuration table of content generator for Markdown files, create table of contents from any Markdown file with ease.
🚩 TOC, zero configuration table of content generator for Markdown files, create table of contents from any Markdown file with ease.

toc toc TOC, table of content generator for Markdown files Table of Contents Table of Contents Usage Installation Packages Arch Linux Homebrew Docker

:zap: Transfer files over wifi from your computer to your mobile device by scanning a QR code without leaving the terminal.
:zap: Transfer files over wifi from your computer to your mobile device by scanning a QR code without leaving the terminal.

$ qrcp Transfer files over Wi-Fi from your computer to a mobile device by scanning a QR code without leaving the terminal. You can support development

network .md into .html with plaintext files
network .md into .html with plaintext files

plain network markdown files into html with plaintext files plain is a static-site generator operating on plaintext files containing a small set of co

Schedule daily tweets from markdown files in your repo, posted via github actions.

markdown-tweet-scheduler Schedule daily tweets from markdown files in your repo, posted to twitter via github actions. Setup Fork this repo Get your t

Generate a global index for multiple markdown files recursively
Generate a global index for multiple markdown files recursively

markdown index Markdown-index is a library to help you generate a global index for multiple markdown files recursively in a directory, containing a su

Convert your markdown files to PDF instantly
Convert your markdown files to PDF instantly

Will take a markdown file as input and then create a PDF file with the markdown formatting.

A general purpose application and library for aligning text.

align A general purpose application that aligns text The focus of this application is to provide a fast, efficient, and useful tool for aligning text.

omniparser: a native Golang ETL streaming parser and transform library for CSV, JSON, XML, EDI, text, etc.
omniparser: a native Golang ETL streaming parser and transform library for CSV, JSON, XML, EDI, text, etc.

omniparser Omniparser is a native Golang ETL parser that ingests input data of various formats (CSV, txt, fixed length/width, XML, EDI/X12/EDIFACT, JS

:book: A Golang library for text processing, including tokenization, part-of-speech tagging, and named-entity extraction.

prose prose is a natural language processing library (English only, at the moment) in pure Go. It supports tokenization, segmentation, part-of-speech

Comments
  • Howto compile rm2pdf

    Howto compile rm2pdf

    Reading the README.md I miss a description how to compile a binary file rm2pdf. It would be helpful for people without golang experience to have some guidance.

    Your project could be a useful tool for testing rm files (e.g. generated by drawj2d) without the need to upload to the device.

    opened by qwert2003 2
  • Converted pdf not to scale

    Converted pdf not to scale

    The conversion rm to pdf a) does scale up the drawing b) scale slightly different in x and y direction

    A rectangle 120mm x 120mm (rm) gets scaled to width 165mm x height 160mm (pdf)

    I guess a) is intentional. It would be nice though to have the option to keep the original size. Scaling differently the width and height, b), should be avoided in my opinion.

    render.go: x-direction: 1404 / 8.5'' = 165.2 dpi y-direction: 1872 / 11'' = 170.2 dpi reMarkable device: 226.85 dpi

    Note: tested with rm-convert

    opened by qwert2003 1
Releases(v0.2.0)
Owner
Jay Goel
Jay Goel
A Go library to parse and format vCard

go-vcard A Go library to parse and format vCard. Usage f, err := os.Open("cards.vcf") if err != nil { log.Fatal(err) } defer f.Close() dec := vcard.

Simon Ser 85 Dec 26, 2022
wikipedia-jsonl is a CLI that converts Wikipedia dump XML to JSON Lines format.

wikipedia-jsonl wikipedia-jsonl is a CLI that converts Wikipedia dump XML to JSON Lines format. How to use At first, download the XML dump from Wikime

Minoru Osuka 3 Dec 26, 2022
Pagser is a simple, extensible, configurable parse and deserialize html page to struct based on goquery and struct tags for golang crawler

Pagser Pagser inspired by page parser。 Pagser is a simple, extensible, configurable parse and deserialize html page to struct based on goquery and str

foolin 78 Dec 13, 2022
Parse placeholder and wildcard text commands

allot allot is a small Golang library to match and parse commands with pre-defined strings. For example use allot to define a list of commands your CL

Sebastian Müller 55 Nov 24, 2022
Parse RSS, Atom and JSON feeds in Go

gofeed The gofeed library is a robust feed parser that supports parsing both RSS, Atom and JSON feeds. The library provides a universal gofeed.Parser

null 2k Jan 8, 2023
parse and generate XML easily in go

etree The etree package is a lightweight, pure go package that expresses XML in the form of an element tree. Its design was inspired by the Python Ele

Brett Vickers 1k Dec 19, 2022
Parse line as shell words

go-shellwords Parse line as shell words. Usage args, err := shellwords.Parse("./foo --bar=baz") // args should be ["./foo", "--bar=baz"] envs, args, e

mattn 460 Dec 23, 2022
Fast and secure steganography CLI for hiding text/files in images.

indie CLI This complete README is hidden in the target.png file below without the original readme.png this could have also been a lie as none could ev

BoB 4 Mar 20, 2022
Quick and simple parser for PFSense XML configuration files, good for auditing firewall rules

pfcfg-parser version 0.0.1 : 13 January 2022 A quick and simple parser for PFSense XML configuration files to generate a plain text file of the main c

Rory Campbell-Lange 0 Jan 13, 2022
Sqly - An easy-to-use extension for sqlx, base on xml files and named query/exec

sqly An easy-to-use extension for sqlx ,base on xml files and named query/exec t

nvac 1 Jun 12, 2022