Plug-ins for Rapid Photo Downloader

Registered by Damon Lynch on 2011-04-07

Create plug-in feature to allow extra operations at the conclusion of a downloads, as well when the download is occurring

Blueprint information

Status:
Not started
Approver:
Damon Lynch
Priority:
Undefined
Drafter:
Oleg Yermakov
Direction:
Needs approval
Assignee:
None
Definition:
Discussion
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

1. Introduction and rationale.

I think that any program for Linux should follow some easy principles:
1) It should be intuitive and easy to use.
2) It should reuse others' work and be re-usable.
3) It should follow the "KISS" (Keep it simple) idea.

And the main idea and restriction of proposed script system itself is:
* The script needs no knowledge about the photo, but the file (and it's filename) itself.

I tested the idea on some scripts I'd like to be added, and it suited my needs well.

So for me the script feature of RPD could mimic the "nautilus scripts" behaviour, described there:
http://library.gnome.org/users/user-guide/2.32/gosnautilus-444.html.en
https://help.ubuntu.com/community/NautilusScriptsHowto

The presumtion:
a) There are some files in a special rpd-scripts directory which contain actual script code. They need not to be executable, have special names or any extension
b) User has some photos to process on his memory card supported by RPD
c) User generally has more scrpts than he needs in a particular workflow.
d) User sometimes needs to alter the order the plugins are applied at. For example, he/she needs to add watermark after resizing, or write metadata before conversion.
e) Scripts can alter file name and / or extension (during converting, for example)
f) The last script in the chain could produce multiple files — for example, make a thumbnail version of the image, or make a JPEG of RAW file.
g) Some users know nothing about scripts, except that they are files.
e) Some users write scripts by their own and need to edit and/or debug them easily.

The process from user's side:
1. User opens the options dialog on the «Scripts». The dialog consists of:
    * the big main checkbox «Post-process photos using custom scripts», which disables the whole page if unchecked.
    * Some description text
    * list of files in the rpd-scripts directory, with checkboxes to enable or disable them individually.
    * buttons (or any other way) to re-arrange items in list.
    * «Open scripts directory» button
    * «Get more scripts» button, leading to some community-sourced scripts database.
    * Some help (button maybe) about «how to make own scripts?»
2. User enables the main checkbox
3. User checks scripts he wants to use and unchecks ones he doesn't want.
4. User arranges checked scripts if that matters to him.
5. user closes the dialog box and downloads the photos as usual.

The technical side of processing:
1. RPD copies the photo to an temporary empty directory.
2. (optional / questionable) RPD sets the environment variables for script, exposing photo information and/or the standart nautilus scripts environment variables.
3. For every enabled script in order:
    a. RPD launches the script, giving it photo file name as the only parameter.
    b. Script reads the filename, opens the file (if it needs to) and reads all the info it needs to process file.
    c. Script processes the file, modifying it or creating new file and deleting the original one afterwards.
    d. Script finishes.
    e. RPD checks that there's still is and only one file in the temporary directory. If file is lost or there's more than one file, it raises an error. (optional / questionable) If the last enabled script made several files or directories, it's okay — the user could need to create thumbnailed versions of images, or ones with watermarks, or auto-develop RAWs, still having the original file untouched.
    f. RPD notes the new file name and record it instead of the old one.
4. RPD moves the file(s) to it's destinated directory.

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.