Skip to main content

Py-Infinote is a Python implementation of the infinote operation transformation protocol. It's a direct port of JInfinote

Project description

This is a port of JInfinote, implemented in Python

Usage

>>> from infinote.document import InfinoteDocument
>>> newdoc = InfinoteDocument('Hello world')
>>> newdoc.state
('1:1', 'Hello world')
>>> newdoc.delete([1,newdoc.state[0], 4, 7])
>>> newdoc.state
('1:2', 'Hell')
>>> newdoc.insert([2,newdoc.state[0], 4,' is the place where all cool people go'])
>>> newdoc.state
('1:2;2:1', 'Hell is the place where all cool people go')
>>> newdoc.delete([1,newdoc.state[0], 24, 3])
>>> newdoc.state
('1:3;2:1', 'Hell is the place where  cool people go')
>>> newdoc.undo([1])
>>> newdoc.state
('1:4;2:1', 'Hell is the place where all cool people go')
>>> newdoc.delete([1,newdoc.state[0], 24, 4])
>>> newdoc.state
('1:5;2:1', 'Hell is the place where cool people go')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Py-Infinote-0.93.tar.gz (14.8 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page