sketch-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Plug-ins in sk-0.6.15 + way of installation


From: Kai-Uwe Behrmann
Subject: Re: Plug-ins in sk-0.6.15 + way of installation
Date: Tue, 20 May 2003 12:20:27 +0200 (CEST)

Am 20.05.03, 10:58 +0200 schrieb Pieter Edelman:

> Hi,
> There´s a README file in the color add-ons packages, which describe how to
> install them. Notice that these are not plugins but scripts.
Sorry for this, I had overseen. Only, this dont help completely.

> >From the README file:
>
> Both scripts require the adjcolor.py(c) library, which should be included
> in this package. To install the scripts, copy the adjcolor.py(c) file and
> the adjustbc.py(c) and/or the colorize.py(c) file to a convenient place.
> Then add the following lines to your ~/.sketch/userhooks.py file:
>
> > import Sketch.Scripting
import sys

> > sys.path.append("/path/to/package")
>
> And for the brightness and contrast script:
> > from adjustbc import adjust_brightness_contrast

# ...
    from colorize import colorize
ImportError: No module named colorize

> And for the colorize script:
> > from colorize import colorize
>
> The functions should appear in the Scripts menu

Not jet.

> As mentioned before, it´s not a good idea to put scripts in a plugin
> directory, but you could make a directory ~/.sketch/scripts to put them in
> for example. The best thing would probably to make an install
> script/RPM/DEB/whatever, but I think this is a greater issue which affects
> all plugins/scripts. The installation methods for these things are maybe a
> bit too liberal, so perhaps it´s a good idea to discuss a standard way to
> install add-ons. Perhaps the best would be to have an option in sketch
> itself where you can select add-ons you want to install, so that it goes
> on to download and install them from the sketch website.
Generally I agree with You. I have to read much about installation
(mostly) and afterward I go only a simple step. Simplifying would be
welcome.

For me as user I can go to the sketch site and chose what I need, no
problem. But the differences of plug-ins, scripts and modules(?) are not
clear to me. They all have the .py , very sympathically but therefore
meaningless.
Some naming conventions could help solve this:

myscript.script.py -> ~/.sketch(/scripts)
colorize.module(?).py -> ~/.sketch/module
latextext.plug-in.py -> ~/.sketch/plug-ins

1. Standerd name parts wich show someone what kind of addon the .py file
   is.
2. Standard paths to the above mentioned dirs, additionally to
   userdefineabel ones, would help.

After each start sketch can lock for these directories and if they do not
exist, creates them.

In every plug-in.tar.gz could be a very simple script:
#/bin/bash
case $1 in
 -g | -global)
        cp plug-in.plug-in.py `sketch-config --ospath`
        ;;
 -l | -u | -local | -user )
        cp plug-in.plug-in.py ~/.sketch/plug-ins
        ;;
 * | -h | --help )
        echo "usage:"
        echo " install.sh [-g (install to sketch's global plug-ins)]"
        echo " install.sh [-u (install to users local plug-ins)]"
esac

This one is not very well written, only to show what I want to say.

> Anyway, I hope that for now it is clear enough,
> Pieter Edelman
Sorry, I would like so, but it do'nt work.


I play many fluts, but phyton is a special snake to me ;-)
Kai-Uwe

------------------------------------------------------------------------
- Good informations depends on our courage to bear them.               -
- Desinformation may become very inconvenient sometimes.               -
- more?             @         <http://www.indymedia.org>               -
------------------------------------------------------------------------





reply via email to

[Prev in Thread] Current Thread [Next in Thread]