How to Enable Inkscape extensions in Puppy

Paint programs, vector editors, 3d modelers, animation editors, etc.
Message
Author
User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#16 Post 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:

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

#17 Post 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!

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#18 Post 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. :?

User avatar
vtpup
Posts: 1420
Joined: Thu 16 Oct 2008, 01:42
Location: Republic of Vermont
Contact:

#19 Post 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!
Attachments
InkscapeBarcodeExtension..png
(28.28 KiB) Downloaded 871 times
[color=darkblue]Acer Aspire 5349-2635 laptop Tahrpup.[/color]
[color=blue]Acer R11 and C720 Chromebks Bionicpup64[/color]
[color=olive]Acer Iconia A1-830 tablet no pup[/color]
[color=orange]www.sredmond.com[/color]

User avatar
darkcity
Posts: 2534
Joined: Sun 23 May 2010, 19:16
Location: near here
Contact:

#20 Post 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)

User avatar
vtpup
Posts: 1420
Joined: Thu 16 Oct 2008, 01:42
Location: Republic of Vermont
Contact:

#21 Post by vtpup »

I'm sure that would be a great .pet to have available!.
[color=darkblue]Acer Aspire 5349-2635 laptop Tahrpup.[/color]
[color=blue]Acer R11 and C720 Chromebks Bionicpup64[/color]
[color=olive]Acer Iconia A1-830 tablet no pup[/color]
[color=orange]www.sredmond.com[/color]

User avatar
darkcity
Posts: 2534
Joined: Sun 23 May 2010, 19:16
Location: near here
Contact:

#22 Post by darkcity »


User avatar
vtpup
Posts: 1420
Joined: Thu 16 Oct 2008, 01:42
Location: Republic of Vermont
Contact:

#23 Post by vtpup »

Good work, DC!
[color=darkblue]Acer Aspire 5349-2635 laptop Tahrpup.[/color]
[color=blue]Acer R11 and C720 Chromebks Bionicpup64[/color]
[color=olive]Acer Iconia A1-830 tablet no pup[/color]
[color=orange]www.sredmond.com[/color]

User avatar
darkcity
Posts: 2534
Joined: Sun 23 May 2010, 19:16
Location: near here
Contact:

#24 Post 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

Pelo

,i open MTpaint to tranform result to Jpeg format.

#25 Post 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.

Post Reply