Re: [Inkscape-devel] DHW file input extension

The repository now has four test files: https://github.com/nikitakit/DM2SVG/tree/master/sample
Page 1 is an all-in-one test file, Page 161 should be just a single stroke, and Page 162 should have each number on its own layer.
~Nikita
On Tue, Dec 13, 2011 at 3:01 AM, Chris Morgan <chris.morganiser@...400...> wrote:
Nolota: try this and see if it works properly: https://gist.github.com/1471691
(Not having any DigiMemo files I can't test it without faking data myself by following the process in reverse, which would be a waste of time.)
-- Chris
On Tue, Dec 13, 2011 at 2:48 AM, Mark Schafer <mschafer@...2596...> wrote:
Thanks - please also send a very very simple test file - say with a single stroke in it. Cheers...
On 12/13/2011 11:20 PM, Nikita Kitaev wrote:
Thank you. There's one test file in the repository, and I'll send you a couple more tomorrow.
~Nikita
On Tue, Dec 13, 2011 at 2:14 AM, Mark Schafer<mschafer@...2596...> wrote:
Hi Nikita, I can probably convert it to python for you. Can you send me some files for testing - with what they look like as pngs (say)
Cheers, Mark...
On 12/13/2011 10:34 PM, Nikita Kitaev wrote:
On Tue, Dec 13, 2011 at 1:13 AM, Chris Morgan <chris.morganiser@...400...> wrote:
It won't be hard to port to Python, which would be ideal for use in Inkscape. It's short and simple.
On Tue, Dec 13, 2011 at 8:08 PM, Alexandre Prokoudine <alexandre.prokoudine@...400...> wrote:
On Tue, Dec 13, 2011 at 12:34 PM, Nikita Kitaev wrote: > > A couple of months ago I modified someone's BSD-licensed DHW to SVG > converter and turned it into an Inkscape extension. DHW is the > proprietary format used by DigiMemo digital notepads (writing on the > notepad with a special pen will record all of the penstrokes and save > a copy of the writing onto an SD card). > > Right now the code is up on github [1]. It's a 215-line perl script, > plus the accompanying INX file. I'm wondering if it would make sense > to do something else with it, like adding it to an extension > repository or maybe even including it with Inkscape. Any suggestions?
Ahem... So we should add Perl to our Windows installer?
Alexandre Prokoudine http://libregraphicsworld.org
My fault for not knowing that perl extensions don't work on Windows.
I've never done binary file operations in Python, but if I can find some good documentation (or if someone else can port it) then we can make a Python version. I have an actual DigiMemo notepad and several hundred DHW files to use as test cases.
~Nikita

I've got my Python port all in shape now (still at https://gist.github.com/1471691), and hand it back to Nikita (I officially disclaim any copyright I might be entitled to because of it - not that such a translation should be copyrightable in the first place), so discussion on inclusion in Inkscape can now continue, with the perl dependency removed.

attached is a slightly edited version for use with Python and Inkscape. I've added some acknowledgements and compared the Python and Perl versions from inside Inkscape to confirm that they are identical, using a few sample files. Any objections if I commit this?
- Alvin Penner
http://old.nabble.com/file/p32999835/dhw_input.inx dhw_input.inx http://old.nabble.com/file/p32999835/dm2svg.py dm2svg.py

committed to rev 10788. thanks, Nikita and Chris!
participants (3)
-
Alvin Penner
-
Chris Morgan
-
Nikita Kitaev