/python-neosmartpen

Python library for reading and manipulating Neo Smartpen data

Primary LanguagePython

README for python-neosmartpen

Python library for reading and manipulating Neo Smartpen data

neosmartpen

Requirements: just python3

Usage:

import neosmartpen
pages = neosmartpen.parse_pages(path_to_neonotes_file)
  • pages will be a list of page dictionaries:
  • Page dictionaries contain a bunch of parameters and a list of strokes:
FieldDescription
neo‘neo’ (check)
file_versionFile version
note_type
pagePage number
widthNotebook width
heightNotebook height
ctimeCreated timestamp (ms)
mtimeModified timestamp (ms)
modifiedFlag if data modified
strokesStroke list
  • strokes are dictionaries with properties like color, and list of dots:
FieldDescription
type0=stroke, 1=voice memo
color(A,R,G,B) [0-255]
thickness[0-2]
timeStart timestamp (ms)
dotsList of point data
extra?
  • dots are (x,y,pressure,dt) tuples that define the stroke.

dt is the time delta between points in ms.

pen2pdf

Convert neonotes file to multi-page pdf.

Requirements: python3 and reportlab

Usage:

pen2pdf.py pen_file.zip output.pdf 
pen2pdf.py -h

pen2reveal

Convert neonotes file to index.html for use with reveal.js

Usage:

pen2reveal.py neonotes_file index.html 
pen2reveal -h