[ghns] [Inkscape-devel] inkscape community site

Frank Karlitschek frank at opendesktop.org
Mon Jun 2 01:31:58 PDT 2008


On 01.06.2008, at 14:05, Jonathan-David SCHRODER wrote:

> Hi,

Hi Jonathan,

great to here that you keep on working on the client.



>
> this is adressed to Frank because I think you may answer to that  
> easily, but maybe anyone could comment on this.
> I'm writing about the opendesktop api especially for it's  
> blenderstuff version if there's one.

sure. api.blenderstuff.org
We already have a few uploads.

>
> So to recall about my project, I'm working on a client for Blender  
> which could interact with several blender repositories (including  
> blenderstuff.org) to be able to browse for objects, fetch some and  
> upload other to repositories. I intend to have a central server  
> which tries to lookup the various repositories periodically and  
> update its cache of (which object - can be found where) pairs. The  
> client queries the central servers which looks into its cache and  
> gives links to the client for : image previews & details of objects,  
> direct links to download the objects.
>
> These days I'm listing the various attributes that each repository  
> provides for the objects it stores. So preview picture is something  
> I was concerned with.
>
> looking at this for example taken from the LIST function of the  
> online API:
> <id>81388</id>
>    <name>Glassified</name>
>    <version>1.0</version>
>    <changed>1212187283</changed>
>    <created>1211236532</created>
>
>    <typeid>76</typeid>
>    <typename/>
>    <language></language>
>
>    <user>painkiller101</user>
>    <downloads>2431</downloads>
>
>    <score>92</score>
>    <comments>54</comments>
>    <preview1>http://www.blenderstuff.org/content/preview.php?preview=1&amp;id=81388&amp;file1=81388-1.jpeg&amp;file2=81388-2.jpg&amp;file3=&amp;name=Glassified 
> </preview1>
>
>    <previewpic1>http://www.blenderstuff.org/CONTENT/content-pre1/81388-1.jpeg 
> </previewpic1>
>
>   </entry>
> there seems to be 3 kinds of previews :
> a) previewpic1
> then for the preview1 tag : there are b) thumbnails at the top and  
> c)big pictures in the middle (screenshots 1,2,3 from the add content  
> online form)
> Is there a standard size for those types of previews ? I can guess  
> that there's one fixed size for type b) but no for the others.
> What's the real difference between preview of class a) and previews  
> of class c) ?
>

<preview> is the url of the preview html page. You have up to three  
small thumbnails as navigation on top of the page and the current  
preview in full size below.

<previewpic> is the direct url of the big preview picture. Exactly the  
same file the user uploads.

<smallpreview> is the direct url of the thumbnail of the preview  
picture. This picture is automatically generated if a user uploads a  
preview.
The size of the small preview is 120x90 pixels or smaller for  
blenderstuff.org. Please note that the x or y size of the picture can  
be smaller than 120 or 90 pixels because we have to keep aspect ratio.


> Looking at : http://api.kde-apps.org/V1/GET/72739 with an excerpt  
> below :
>  <data>
>   <id>72739</id>
>
>   <name>Manslide</name>
>   <version>v2.0.3</version>
> ...
>   <comments>150</comments>
>   <depend>Qt 4.x</depend>
>   <preview1>http://www.KDE-Apps.org/content/preview.php?preview=1&amp;id=72739&amp;file1=72739-1.jpg&amp;file2=72739-2.jpg&amp;file3=72739-3.jpg&amp;name=Manslide 
> </preview1>
>
>   <preview2>http://www.KDE-Apps.org/content/preview.php?preview=2&amp;id=72739&amp;file1=72739-1.jpg&amp;file2=72739-2.jpg&amp;file3=72739-3.jpg&amp;name=Manslide 
> </preview2>
>
>   <preview3>http://www.KDE-Apps.org/content/preview.php?preview=3&amp;id=72739&amp;file1=72739-1.jpg&amp;file2=72739-2.jpg&amp;file3=72739-3.jpg&amp;name=Manslide 
> </preview3>
>
>   <previewpic1>http://www.KDE-Apps.org/CONTENT/content-pre1/72739-1.jpg 
> </previewpic1>
>
>   <previewpic2>http://www.KDE-Apps.org/CONTENT/content-pre2/72739-2.jpg 
> </previewpic2>
>
>   <previewpic3>http://www.KDE-Apps.org/CONTENT/content-pre3/72739-3.jpg 
> </previewpic3>
>
>   <smallpreviewpic1>http://www.KDE-Apps.org/CONTENT/content-m1/m72739-1.png 
> </smallpreviewpic1>
>
>   <smallpreviewpic2>http://www.KDE-Apps.org/CONTENT/content-m2/m72739-2.png 
> </smallpreviewpic2>
>
>   <smallpreviewpic3>http://www.KDE-Apps.org/CONTENT/content-m3/m72739-3.png 
> </smallpreviewpic3>
>
>   <downloadtype1></downloadtype1>
>   <downloadlink1>http://www.KDE-Apps.org/content/download.php?content=72739&amp;id=1 
> </downloadlink1>
>
>   <downloadname1>Binary + Source</downloadname1>
>   <downloadsize1></downloadsize1>
>
>  </data>
> comment on the above dump : preview1,2 and 3 contain exactly the  
> same url, which leads to a dhtml pages with the thumbnail images as  
> smallpreviewpic* and the same big images as previewpic*.

No. The urls are different.
The links go to different preview pages.



> The page linked in preview* elements contains items listed right  
> after in the xml file and parsing the html would require additional  
> work for coders. I can understand that some people may want to embed  
> this html page into some htmlview widget, so I'd suggest completely  
> replacing the preview* tags by a single <previewshtmlpage> which  
> would encompass the html page url.
>

I´m not sure if I understand what you mean. All the information is  
available in the xml. Why do you have to parse the html or the url?


> in the case of blender repo client usage of remote repositories, we  
> would like to have 1 thumbnail of fixed size (to avoid having to  
> resize it on the client side) per item if provided, and at least one  
> big image (if possible at a specific size as well) that would be  
> showed if a user wants more details. I wish this (1 link to  
> thumbnail + 1 link to big image) pack existed be in each entry  
> elements of the xml returned by LIST(), I think that it was the aim  
> of preview1 and previewpic1 except that preview1 leads to html.

We have that already. The tags are previewpic and smallpreviewpic.

The only problem is that previewpic is not automatically scaled. If we  
upscale or downscale the upload of the users, the quality would be  
very bad.

The smallpreviewpic is 120x90 or smaller. The size is not always the  
same because we have to make sure that the aspect ratio if correct.

>
>
> So in short, I would propose for each items, to have direct links  
> within the following tags:
> - for the LIST() output :  <preview1>(thumbnail) and  
> <previewpic1>(big)
> - for the GET() output : <preview[1-3]>(thumbnails),  
> <previewpic[1-3]>(big), <previewhtmlpage>(link to the dhtml page  
> with thumbnails on top + 1 big screenshot at a time in the bottom  
> part)
>

Well I think we have the tags already. Only the naming is different. I 
´m not sure why you want to rename the tags and break other clients.

> this could break the API a very little and maybe some clients (so  
> far I know only khotnewstuff)... I don't know which tags  
> khotnewstuff uses and which it doesn't, but I doubt the url to html  
> pages from preview[1-3] (LIST and GET outputs)  are used by that tool.
>

What do you think?

Cheers
Frank

> Jonathan
> _______________________________________________
> ghns mailing list
> ghns at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/ghns

--
Frank Karlitschek
frank at opendesktop.org






More information about the ghns mailing list