TextOperation, how it works?

69 views
Skip to first unread message

Fábio Cerqueira

unread,
Jul 21, 2016, 5:40:53 PM7/21/16
to Firepad
Hi,

I'm trying create a parser for firepad history(using python), but I can't understand how  works TextOperation. Someone can explain me how it works or show me where I can find a documentation about this? 

Fábio Cerqueira

unread,
Jul 21, 2016, 6:02:14 PM7/21/16
to Firepad

Michael Lehenbauer

unread,
Jul 21, 2016, 6:04:14 PM7/21/16
to Fábio Cerqueira, Firepad
If it's helpful, somebody has written a ruby script to do that.

-Michael

--
You received this message because you are subscribed to the Google Groups "Firepad" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firepad-io+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firepad-io/cca5ebb2-e3cd-41e2-9438-f552bb690fd2%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Fábio Cerqueira

unread,
Jul 21, 2016, 6:42:30 PM7/21/16
to Michael Lehenbauer, Firepad
Hi Michael,

thanks, I saw this script, but I didn't understand the method 'apply'. The argument for this method is a string, but in my case I would like a parse for firepad history json. 

This json[1] is the common format for json history on firepad?

--
Fábio Cerqueira

Michael Lehenbauer

unread,
Jul 21, 2016, 6:46:57 PM7/21/16
to Fábio Cerqueira, Firepad
There is no method 'apply' in that script. :-)

Fábio Cerqueira

unread,
Jul 21, 2016, 6:58:15 PM7/21/16
to Michael Lehenbauer, Firepad
It's true, sorry, I confused with the oldest ruby script[1]. 

The algorithm used in this ruby[2] script is almost the same of my implementation in python[3], but I'm not sure if this code will cover all cases. This is the reason that I want to know if there is a documentation that describe this JSON format to confirm if my sample[4] is valid.

--
Fábio Cerqueira

Fábio Cerqueira

unread,
Jul 21, 2016, 7:02:00 PM7/21/16
to Michael Lehenbauer, Firepad
I don't know if this format is the pattern used with ACE editor or if is the official firepad json format.
--
Fábio Cerqueira

Reply all
Reply to author
Forward
0 new messages