Page 1 of 2

Posted: Mon 06 Feb 2012, 03:56
by Flash
Thanks, vovchik, that looks like it will work if I can figure out the right command:
# wmftosvg ---help
WMFtoSVG 0.0.7
Usage: wmftosvg [OPTION]... WMF_FILE
See README.txt for information about the available options. [Where is this README file?]
# wmftosvg /tmp/ADVNTURE/ADV003.WMF [/tmp/ADVNTURE is a directory full of .wmf files. I copied it from the CD to /tmp]
<?xml version="1.0"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010 ... /svg10.dtd">
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 3035 2947"
stroke-linecap="round" stroke-linejoin="round" stroke-width="0.85"
fill="none" fill-rule="evenodd">
Followed by a whole lot of similar numbers.

As I write this, my two dogs are snoring a duet. :lol:

Posted: Mon 06 Feb 2012, 07:26
by vovchik
Dear Flash,

Glad you have it running. The readme is here:

Code: Select all

/usr/local/doc/wmftosvg/README.txt
As the program outputs to stdout, you have to redirect the output to a file, e.g.:

Code: Select all

wmftosvg xxx.wmf > xxx.svg
If you put this in a for loop, you can convert an entire dir in one go:

Code: Select all

#! /bin/bash
for a in $(ls *.WMF); do
	# is it a file
	if [ -f "$a" ]; then
		# if yes, set b to $a without .wmf and do conversion
		b=${a%.*}
		wmftosvg "${b}.WMF" > "${b}.svg"
		inkscapelite -z -f "${b}.svg" --export-svg="${b}.svg"
	fi
done
With kind regards,
vovchik

PS. I edited the litttle bash script - I must have been sleeping when I wrote it. Also added batch processing via inkscape lite (comment it out if you don't what to do this). I included that step because the svg files generated by wmftosvg, while basically normal, do not show up in ROX filer because, presumably, they are missing some unix "magic" in the dtd. By running them through inkscapelite, this is fixed automatically and I get my thumbnails!

Posted: Mon 06 Feb 2012, 15:12
by Flash
Thanks, vovchik, your script worked perfectly - though it didn't seem it did anything at all until I right-clicked the eye in ROX to show thumbnails. :)

Code: Select all

wfmtosvg xxx.wmf > xxx.svg
works also, but the size file it yields is only half as big as the one I get when I run the script that converts the entire directory. :?

Posted: Wed 02 May 2012, 20:15
by vtpup
Looks like this thread got a little OT.

Darkcity, I'm running Inkscape0.48.0-w5.pet from puppy-wary5 repository in Racy5.3.

I'm able to run extensions including rendering bar codes. (Note: there are a few bugs in this version of Inkscape, apparently solved in bugfix version 0.48.1 -- including a very annoying failure to refresh ruler marks when the cursor moves. Wish we had 0.48.1.) Anyway this version works okay otherwise so far. I installed this big version of Inkscape because I wanted to run Gcodetools, a free downloadable extension. I compiled those and they work well.

What I found:

You do need Python onboard to run the Inkscape extensions, so if you don't have that, you'll need to add it. I have devx loaded.

You may need the lxml package, as well. Go here for that:
http://pypi.python.org/pypi/lxml/

Then after you get that, you have to download an installer for it from here:

http://peak.telecommunity.com/DevCenter/EasyInstall

according to instructions;

Code: Select all

Installation
------------

Get the `easy_install`_ tool and run the following as super-user (or
administrator)::

  easy_install --allow-hosts=lxml.de,*.python.org lxml

But also, one hangup I found was that the installer expected /usr/bin/python2.3 I only had python2.6 in there, so I made a symlink to python2.6 which I named "python2.3". Then the script ran.

Also for running your extensions check to make sure that any python scripts in the /usr/share/inkscape/extensions folder are set to executable. (My newly created Gcodetools extension files had one script that wasn't, and I had to change that.)

Hope this helps!

Posted: Tue 08 May 2012, 21:44
by darkcity
thanks vtpup,

I can confirm extensions work in Slacko too - if its devx sfs is loaded (using inkscape-0.48 from the slacko ppm).

The extensions need Python.

In another version of Puppy I had it working with just the numpy and lxml directories in python.

---

I would like to make a PET as an alternative to having to load a devx sfs. Unfortunately I have no idea how to trim the Python directory down to size, presumably 'test', 'src' and 'doc' directories can be removed, and the .h files? I'm looking at the bare min that allows extensions to works.

8)

Posted: Wed 09 May 2012, 00:19
by vtpup
I'm sure that would be a great .pet to have available!.

Posted: Thu 10 May 2012, 15:50
by darkcity

Posted: Thu 10 May 2012, 21:57
by vtpup
Good work, DC!

Posted: Tue 03 Sep 2013, 20:00
by darkcity
Loading Inkscape on Slacko 5.6 is easier via the PPM because it detects and installs the gsl dependency.

another thread regard extension has popped up
http://www.murga-linux.com/puppy/viewtopic.php?t=88313

,i open MTpaint to tranform result to Jpeg format.

Posted: Sun 14 Aug 2016, 18:11
by Pelo
Until now, when my work with Inkscape satisfies me,i open MTpaint to tranform result to Jpeg format.
I will try extensions. I did not know these exist.
how to save files.