Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 25 Oct 2014, 23:05
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Graphics
How to Enable Inkscape extensions in Puppy
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 2 of 2 Posts_count   Goto page: Previous 1, 2
Author Message
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 11122
Location: Arizona USA

PostPosted: Sun 05 Feb 2012, 23:56    Post_subject:  

Thanks, vovchik, that looks like it will work if I can figure out the right command:
Quote:
# 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-20010904/DTD/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. Laughing
Back to top
View user's profile Send_private_message 
vovchik


Joined: 23 Oct 2006
Posts: 1285
Location: Ukraine

PostPosted: Mon 06 Feb 2012, 03:26    Post_subject:  

Dear Flash,

Glad you have it running. The readme is here:

Code:
/usr/local/doc/wmftosvg/README.txt


As the program outputs to stdout, you have to redirect the output to a file, e.g.:

Code:
wmftosvg xxx.wmf > xxx.svg


If you put this in a for loop, you can convert an entire dir in one go:

Code:
#! /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!
Back to top
View user's profile Send_private_message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 11122
Location: Arizona USA

PostPosted: Mon 06 Feb 2012, 11:12    Post_subject:  

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. Smile

Code:
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. Confused
Back to top
View user's profile Send_private_message 
vtpup


Joined: 15 Oct 2008
Posts: 1158
Location: Republic of Vermont

PostPosted: Wed 02 May 2012, 16:15    Post_subject:  

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:
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!
InkscapeBarcodeExtension..png
 Description   
 Filesize   28.28 KB
 Viewed   639 Time(s)

InkscapeBarcodeExtension..png


_________________
Acer Aspire 5349-2635 laptop dual proc, 4gb ram, frugal Racy 5.5.
1999 Thinkpad 600e hacked Pent 3, overclocked 800 mHz, 490 kb running Lupu 528

Acer Iconia A1-830 x86 tablet -- Puppy some day?
Back to top
View user's profile Send_private_message 
darkcity


Joined: 23 May 2010
Posts: 2462
Location: near here

PostPosted: Tue 08 May 2012, 17:44    Post_subject:    

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.

Cool

_________________
helping Wiki for help | IF SendSpace link = "dead" THEN PM me ("up file to http://meownplanet.net/")
Back to top
View user's profile Send_private_message Visit_website 
vtpup


Joined: 15 Oct 2008
Posts: 1158
Location: Republic of Vermont

PostPosted: Tue 08 May 2012, 20:19    Post_subject:  

I'm sure that would be a great .pet to have available!.
_________________
Acer Aspire 5349-2635 laptop dual proc, 4gb ram, frugal Racy 5.5.
1999 Thinkpad 600e hacked Pent 3, overclocked 800 mHz, 490 kb running Lupu 528

Acer Iconia A1-830 x86 tablet -- Puppy some day?
Back to top
View user's profile Send_private_message 
darkcity


Joined: 23 May 2010
Posts: 2462
Location: near here

PostPosted: Thu 10 May 2012, 11:50    Post_subject:  

see first post for solution, pet or devx Twisted Evil
_________________
helping Wiki for help | IF SendSpace link = "dead" THEN PM me ("up file to http://meownplanet.net/")
Back to top
View user's profile Send_private_message Visit_website 
vtpup


Joined: 15 Oct 2008
Posts: 1158
Location: Republic of Vermont

PostPosted: Thu 10 May 2012, 17:57    Post_subject:  

Good work, DC!
_________________
Acer Aspire 5349-2635 laptop dual proc, 4gb ram, frugal Racy 5.5.
1999 Thinkpad 600e hacked Pent 3, overclocked 800 mHz, 490 kb running Lupu 528

Acer Iconia A1-830 x86 tablet -- Puppy some day?
Back to top
View user's profile Send_private_message 
darkcity


Joined: 23 May 2010
Posts: 2462
Location: near here

PostPosted: Tue 03 Sep 2013, 16:00    Post_subject:  

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

_________________
helping Wiki for help | IF SendSpace link = "dead" THEN PM me ("up file to http://meownplanet.net/")
Back to top
View user's profile Send_private_message Visit_website 
Display_posts:   Sort by:   
Page 2 of 2 Posts_count   Goto page: Previous 1, 2
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Graphics
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0694s ][ Queries: 13 (0.0050s) ][ GZIP on ]