markpasc (markpasc) wrote,
markpasc
markpasc

  • Music:

Peganthyrus' upload tool

Peganthyrus mentioned her mythical art gallery upload tool again, and I was interested in the idea last time so this time I discussed it a little with her.

Here's a Visio doodle I did after we spoke and Peganthyrus showed me her sketched sketch.

Sample XML site definition:

<site>
    <name>
VCL</name>
    <post>
http://vcl.ctrl-c.liu.se/wherever/form/submits/to</post>

    <login>
        <username/> <password/>
<!-- posted in form... actually auth will be a big design problem without complicity from gallery operators -->
    </login>

    <image>
        <name>
Image</name><!-- displayed to user -->
        <field>image</field><!-- used when posting form -->
        <formats>jpeg gif png</formats>
    </image>
</site>

<site>
    <name>
Foobar</name>
    <post>
http://foobar.tld/post</post>
    <login><username/><password/></login>

    <image>
        <name>
Thumbnail</name>
        <field>
thumb</field>
        <maxwidth>
200</maxwidth>
        <maxheight>
200</maxheight>
        <formats>
jpeg gif png</formats>
    </image>
    <image>
        <name>
Image</name>
        <field>
image</field>
        <maxwidth>
700</maxwidth>
    </image>
</site>

A text format could very well be easier on the eyes, at least. Some pseudocode for uploading:

on "upload":
    for pane in panes:
        if pane is incomplete (neither OK nor ignored):
            abort
    for pane in panes:
        for image in pane:
            generate image to upload
            save image somewhere?
        build HTTP POST request (images, metadata)
        try:
            log in?
            make POST
        except:
            erm, complain loudly

I don't know if anything will actually come of it, though it'd sure be nice.

Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

  • 3 comments