Skip to content

Insert and edit drawing in Org mode with iPad.

Notifications You must be signed in to change notification settings

casouri/OrgMark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OrgMark

With OrgMark, you can use iPad to draw figures and insert them into Org files. You can also edit these figures later. I find it to be extremely handy for producing documents that mix LaTex and hand-drawn figures.

YouTube demo

./icon/icon.png

Install

  1. Open the workspace with Xcode, you will see two projects, Build Org Mark for iPad and orgmark for Mac.
  2. Put the orgmark executable under PATH.
  3. Install the Org Mark app to your iPad (by whatever means).
  4. Put orgmark.el under your load-path and require it.

Usage

From Org mode: M-x orgmark-insert, or M-x orgmark-edit.

Alternately, you can use orgmark from command line. The extension has to be “pkdrawing”.

$ orgmark --help
OVERVIEW: Send drawing to iPad to edit.

USAGE: command <file-path> [--width <width>] [--height <height>] [--new]

ARGUMENTS:
  <file-path>             The drawing file. If --new option is set, this is the file that we save to.

OPTIONS:
  -w, --width <width>     Max width of the exported image in pixels.
  -h, --height <height>   Max height of the exported image in pixels.
  -n, --new               Create new drawing.
  -h, --help              Show help information.

How does it work

  1. Draw on iPad and iPad saves the drawing to a binary data.
  2. iPad sends the data and a generated png file to cli.
  3. Cli sends the binary data to iPad for edit, iPad sends the edited binary data and png to cli.

A better way would be using an open drawing library, so we can export the drawing to some open formats, like SVG. I just went with the most trivial route.

Known problems

  • Only support pkdrawing files (which is an extension I made up for storing Apple’s PencilKit binary drawing data). Update: Apple released API’s to it’s PKDrawing data structure, so this shouldn’t be a problem anymore. Although there is no one-line “export to SVG” feature, you can write some code to extract the stroke, speed, pressure, etc.
  • Only works on WiFi. I tried with BLE, but the bandwidth is too low for the data we are transferring.

About

Insert and edit drawing in Org mode with iPad.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published