← Back to team overview

zim-wiki team mailing list archive

Re: Time Stamped Text (TST) plugin

 

Dear Japp,
thank you for your suggestion, I already started experimenting with difflib
library, which is capable of generating deltas.

Concerning the data structure with timestamps, it would be possibly worth
to consider the following protocol called Gobby, which does provide a way
how to collaborate over network on a one to many text files. On top of this
feature it also defines data structure, which may accommodate timestamps.
Do you think that the protocol cold be integrated into ZIM, since it uses
GTK? Possibly it may elevate ZIM like a personal wiki to real-time
collaborative writing? The
API<http://gobby.0x539.de/trac/wiki/APIReference>offers libinftextgtk,
but I am not certain about complexity resulting from
intended integration.
Even though the libinftextgtk is implement in C it seems to be possible to
wrap the C implementation and use it in Python code according to the
following link:
http://stackoverflow.com/questions/1942298/wrapping-a-c-library-in-python-c-cython-or-ctypes

The infinote protocol uses storage in the following form:

> <?xml version="1.0"?>
> <inf-text-session>
>   <user id="1" name="norfcran_apple" hue="0.203069"/>
>   <user id="2" name="norfcran" hue="0.62889799999999996"/>
>   <buffer>
>     <segment author="1">asdfasdfasd
> fa
> sdf
> as
> tell
> df
> as
> df
> as
> df
> </segment>
>     <segment author="2">asdfa
> sdf
> as</segment>
>     <segment author="1"> this may be wrong</segment>
>     <segment author="2">
> df
> as
> d
> f</segment>
>   </buffer>
> </inf-text-session>
>

The segment may be extended by timestamps. So it results in timestamped
text, which does not preserve history of changes, but on the other hand it
brings a real-time collaboration on a single file. Additionally the
timestamps could be utilized for tracking changes over many pages, since
time is a natural binder of flow, when there are more than one page edited
simultaneously. Hope that these suggestions do not turn it into something
impossible, so far at least I can see potentially a feasible shortcut to
bring another organizational tool in form of timestamps.

Thank you in advance for your opinion, best regards, JK


On 31 May 2013 13:04, Jaap Karssenberg <jaap.karssenberg@xxxxxxxxx> wrote:

> JK,
>
> Main problem I see is how you going to store all that meta-data in a wiki
> format. If you really want to timestamp a change of e.g. 2 words half way a
> paragraph you end up with timestamps every other word in your source text.
>
> So you would have to keep a file next to the actual source to track
> changes as they happen. Kind of keeping a permanent record of the undo
> stack. Not too hard to hack together if you trigger it to update on each
> auto-save. Bonus is that you would also get permanent undo. Only technical
> tid-bit is that our real undo-stack is in terms of positions in the text
> buffer, which does not match positions in the source text, so some glue is
> needed there.
>
> Alternative would be to store patches and figure out history from that.
> Most version control system have an "annotated" mode to show history of
> text, but those are usually per line, not per word. You could figure out
> though history per word from the version history. You would have to commit
> for every other change though, so probably not for your purpose.
>
> So in conclusion:
> 1/ Write a plugin that takes a diff of the text in the source file on each
> auto-save and stores the deltas timestamped in a record next to the actual
> source file.
> 2/ Connect it to the undo stack, so even after closing a page, you can
> still undo/redo each delta
> 3/ Figure out what representation of this data you would want in the user
> interface - e.g. text annotation, change log, ...
>
> Regards,
>
> Jaap
>
>
>
> On Fri, May 31, 2013 at 10:53 AM, NorfCran <norfcran@xxxxxxxxx> wrote:
>
>>  Hi Jaap and other contributors,
>> it has been some time, since I worked on a project, which researched
>> capabilities of synchronizing text with time (to extent of timestamped
>> words). Actually I wanted to bring this feature to ZIM, but could not get
>> there (the project in my case tries to use tree data structure algorithm to
>> solve this issue with respect to timestamps). Anyhow, recently I came up to
>> the following application, which inspired me to write this email:
>> https://itunes.apple.com/de/app/armadillo-audio-notes/id532223938?mt=12
>> It basically provides, what I would personally love to see in ZIM as well
>> (apart of the audio, that is another level). Can you see any possibility to
>> target this feature? I am personally very much into idea of time based text
>> and possibly other users may start to see advantages of it (so there would
>> be chance to track changes based on time through hierarchy of pages,
>> especially when some words in long paragraphs change, it is difficult to
>> use VCS). This is actually the main inspiration of this feature:
>> http://etherpad.org/
>> I would be interested in your opinions whether you see some possibility
>> in implementing time based text plugin (basically directions of further
>> focus)?
>> Thank you for your feedback, best regards, JK
>>
>
>

Follow ups

References