Re: Zope-Dev digest, Vol 1 #1017 - 12 msgs
Michael R. Bernstein wrote:
Hello all,
Background ---------- I am building an Image Archive Zope application using ZPatterns. I originally was trying to convert the Photo Product to ZPatterns in such a way as to still have it work as a normal product, but that turned out to be too complex.
So, I am building the application fresh.
So far, I have a RackImage Python product that subclasses from Image and DataSkin which seems to work fine. I can create, upload, view and delete the RackImages.
Michael, Could I get a copy of this product? I'm trying to create a Rack-mountable Image class but I'm having a lot of trouble getting a class subclassed from Image and DataSkin to work. Having some working code could save me some trouble. I only need the basic RackImage, without all the later stuff you added relating to Renderings. TIA Itai -- -- Itai Tavor -- "Je sautille, donc je suis." -- itai@optusnet.com.au -- - Kermit the Frog -- -- -- -- "If you haven't got your health, you haven't got anything" --
Itai Tavor wrote:
Could I get a copy of this product? I'm trying to create a Rack-mountable Image class but I'm having a lot of trouble getting a class subclassed from Image and DataSkin to work. Having some working code could save me some trouble.
I only need the basic RackImage, without all the later stuff you added relating to Renderings.
Itai, I am attaching a tar file that needs to be untarred in the Products directory. RackImage is a little rough around the edges, and still has some cruft left over from Photo. It is dependent on PIL, which may be unneccessary at this point. Please send me any modifications you make. (this will be released GPL). Michael.
Michael R. Bernstein wrote:
Itai Tavor wrote:
Could I get a copy of this product? I'm trying to create a Rack-mountable Image class but I'm having a lot of trouble getting a class subclassed from Image and DataSkin to work. Having some working code could save me some trouble.
I only need the basic RackImage, without all the later stuff you added relating to Renderings.
Itai,
I am attaching a tar file that needs to be untarred in the Products directory.
RackImage is a little rough around the edges, and still has some cruft left over from Photo.
It is dependent on PIL, which may be unneccessary at this point.
Please send me any modifications you make. (this will be released GPL).
Michael.
Thanks, Michael! Turns out I just had to make a few small changes in my product to get it to work, which I discovered looking at yours. Don't know if anything in my product that it would be interesting to add to yours... it's aimed at storing photos for a product catalog, most of what it adds to Image is methods for creating a photo based on another photo, used for creating a thumbnail. Itai -- -- Itai Tavor -- "Je sautille, donc je suis." -- itai@optusnet.com.au -- - Kermit the Frog -- -- -- -- "If you haven't got your health, you haven't got anything" --
Itai Tavor wrote:
Thanks, Michael! Turns out I just had to make a few small changes in my product to get it to work, which I discovered looking at yours.
Don't know if anything in my product that it would be interesting to add to yours... it's aimed at storing photos for a product catalog, most of what it adds to Image is methods for creating a photo based on another photo, used for creating a thumbnail.
Sure, I'll take a look at it. The approach I'm taking (ZPatterns all the way!) is to generalize the creation and association of the RackImages with an ArchiveImage ZClass (that holds meta data). I've got things set up to the point that the ArchiveImages are traversable into their Rackimages, and the ids are rewritten appropriately. So the ArchiveImage ZClass intsances are stored and accessed like this: ArchiveImages/001 And the RackImages are stored like this: ArchiveImages/Renderings/001_original <-notice the id! But I can access the image data from the apropriate RackImage like this: ArchiveImages/001/original Next up is RackImage instantiation based on scaled image data. I think examining your code may be helpful, but I probably only need your main .py file. The number and sizes of Renderings that Images have will be configurable at the application level. Cheers, Michael Bernstein.
Michael R. Bernstein wrote:
Itai Tavor wrote:
Thanks, Michael! Turns out I just had to make a few small changes in my product to get it to work, which I discovered looking at yours.
Don't know if anything in my product that it would be interesting to add to yours... it's aimed at storing photos for a product catalog, most of what it adds to Image is methods for creating a photo based on another photo, used for creating a thumbnail.
Sure, I'll take a look at it.
Here it is. Hope any of it is any help. -- -- Itai Tavor -- "Je sautille, donc je suis." -- itai@optusnet.com.au -- - Kermit the Frog -- -- -- -- "If you haven't got your health, you haven't got anything" --
On Tue, Apr 17, 2001 at 11:11:33AM +1000, Itai Tavor wrote: [...]
Here it is. Hope any of it is any help.
My Mutt emailer calls the .tgz file a mac-binhex and none of the usual utilities recognize it as .tgz formatted. Anyone else have the same problem? What's the magic key to decode this attachment? tia, -- charlie blanchard http://baldguru.com/ Founder: LosAngeles area Zope Users Group (lazug.org)
On Mon, Apr 16, 2001 at 06:37:57PM -0700, Charlie Blanchard wrote:
On Tue, Apr 17, 2001 at 11:11:33AM +1000, Itai Tavor wrote: [...]
Here it is. Hope any of it is any help.
My Mutt emailer calls the .tgz file a mac-binhex and none of the usual utilities recognize it as .tgz formatted. Anyone else have the same problem? What's the magic key to decode this attachment?
Mr. Bernstein had packaged up the file as a gzipped tarball indeed, but then his mailer must've wrapped it up in a BinHex wrapper. I happened to have megatron installed (the excellent mac fileformat converter part of the netatalk package, more info at http://rsug.itd.umich.edu/~tombeau/netatalk/) and I pealed of all the layers. I attached a gzipped copy of the file (no tarbal needed, it is only one file after all). Hope this helps! -- Martijn Pieters | Software Engineer mailto:mj@digicool.com | Digital Creations http://www.digicool.com/ | Creators of Zope http://www.zope.org/ ---------------------------------------------
On Tue, Apr 17, 2001 at 09:02:09AM +0200, Martijn Pieters wrote: [...]
I happened to have megatron installed (the excellent mac fileformat converter part of the netatalk package, more info at http://rsug.itd.umich.edu/~tombeau/netatalk/) and I pealed of all the layers. I attached a gzipped copy of the file (no tarbal needed, it is only one file after all).
Thanks Martijn. For the tip on megatron, and for the conversion... -- charlie blanchard http://baldguru.com/ Founder: LosAngeles area Zope Users Group (lazug.org)
Martijn Pieters wrote:
On Mon, Apr 16, 2001 at 06:37:57PM -0700, Charlie Blanchard wrote:
On Tue, Apr 17, 2001 at 11:11:33AM +1000, Itai Tavor wrote:
Here it is. Hope any of it is any help.
My Mutt emailer calls the .tgz file a mac-binhex and none of the usual utilities recognize it as .tgz formatted. Anyone else have the same problem? What's the magic key to decode this attachment?
Mr. Bernstein had packaged up the file as a gzipped tarball indeed, but then his mailer must've wrapped it up in a BinHex wrapper.
Wasn't me. :-) Michael Bernstein.
On Tue, Apr 17, 2001 at 07:44:47AM -0700, Michael R. Bernstein wrote:
Mr. Bernstein had packaged up the file as a gzipped tarball indeed, but then his mailer must've wrapped it up in a BinHex wrapper.
Wasn't me. :-)
Whoops, sorry, case of bleary sleepy eyes. The finger should point to Itai Tavor :) -- Martijn Pieters | Software Engineer mailto:mj@digicool.com | Digital Creations http://www.digicool.com/ | Creators of Zope http://www.zope.org/ ---------------------------------------------
participants (4)
-
Charlie Blanchard -
Itai Tavor -
Martijn Pieters -
Michael R. Bernstein