PictureSelector Helper Add-on

1. Why do I need this?

I assume you have a lot of folders on your system which look like this:

The folder contains only pictures with more or less accurate names, but normally you don’t have a clue where you have them from. The JPG format is able to hold meta data, like ISO, Zoom, Width, Height etc…. but usually, you just want to know where you have the picture from, the internet address, the origin. Unfortunately nobody puts this into the internal tags of the file.

2. What is being stored?

Now, what PictureSelector already does for you “out-of-the-box”, is to store this data in the internal Firefox storage temporarily. While you continue using PictureSelector, the log data grows.

It is done “per job”, which means, if you download three pictures from one gallery, the whole data is gathered into one entry (file).  Here you see one of those log files which the helper creates:

seq-000-0007.psl

1 seq-000-0007
2 International Space Station
3 http://grin.hq.nasa.gov/BROWSE/international_space_station_1.html
4 http://grin.hq.nasa.gov/IMAGES/SMALL/GPN-2000-0
5  00192.jpg 01042.jpg 01043.jpg 01733.jpg
6 4
7 10
8 Space,
9 img



1

Sequence number (“seq-000-0007”)

Tthis is the main matching key. Each picture file name of the job starts with this name. You find info for you file exclusively via this number.

2

Gallery Title

The full title of the page, which also appears in your browser when you're on it.

3

Gallery URL

This is the URL of the gallery which hosted the files, the "container".

4 + 5

Item Resource URL

These are the “hard links” to the pictures/movies, their actual address. This can and will differ from the gallery URL. Field 4 contains the maximum common part of each item URL, and field 5 lists the rest. Later you could manually assemble the full URL to each picture if you wanted to.
So, in this case, the URL of the first picture would be:

http://grin.hq.nasa.gov/IMAGES/SMALL/GPN-2000-000192.jpg

6

Amount of taken items

It's how many of the pictures or movie clips you wanted to have.

7

Count of total items

It's how many items there were in total on the gallery.

8

Tags

Tags wich you have actively set for the job. This line will be empty, if no tags were set.

9

Media Type

Indicates if this job consisted of either images or movies (img / mov).

3. The internal log

From time to time, you should call Config -> Show Log. The basket icon urges you to do it, when it turns red. 

When you see this list, the data has already been deleted from the temporary storage, and you can’t recovery it once more. So if you want to keep this information for yourself, you must mark it here and now, and paste it into a text file somewhere or organize it somehow else.

As you can see, this is not a full automatic workflow. I’ve been using an Add-on which I want to share with you now. But first, you need to have a little background info:

4. Extension types

Firefox has a complicated security/rights system for Plug-Ins, Add-ons, and UserScripts. They have different power and different rights to do stuff on your computer.

Plugins

This type of extension, like Adobe Acrobat or Shockwave Flash have the most power and are embedded most deeply into Firefox. They are highly efficient and hard to develop, eg. in C++.
I mean... Acrobat Reader can run inside of your browser, how sick is this?

Add-ons

This is the normal way how the functionality of Firefox is extended. Add-ons have great potential and power, but are somewhat restricted.

Greasemonkey Userscripts

This is the absolute power to change your internet. They can modify anything directly within the web page(s). This is done on the same level as the web page, in the same DOM (Document Object Model). So the script logic kicks in right in the middle, starts from within, exactly where it wants to be, the perfect place. Usually Userscripts start when the original, unmodified page has finished loading.

But, Userscripts are caged, even more restrictively, into a sub-sandbox. As a matter of fact, a Userscript cannot and will not be able to read or write a file to your disc.

5. Installing the Add-on

Install PictureSelector-Helper

Fortunately, Userscripts and Add-ons may communicate on the level of DOM events, and thus, can create a connection. The Add-on I suggest you here merely writes the log data to you disk, because this cannot be done in a Userscript. PictureSelector sends the event, PS-Helper waits for it, and creates a file on your disc with the info.

Those log files are stored in your profile folder, which is a little tricky to find. Visit this page to know where it is on you system: http://kb.mozillazine.org/Profile_folder

You see, you always have to ask yourself if you trust the developer. You are asked this question in Windows itself, and before the installation of any extension within Firefox.

Userscripts (and anything except Plugins inside of Firefox) are open source. You can convince yourself of the harmlessness of the piece of software you want to start using (if you actually understand it :P).

Since my Userscript kind of breaks out of the regular restrictions of Userscripts (it will write files to your disc), I wanted to supply an explanation of what is happening.

PictureSelector Helper

6. What do I do with it?

Since you are using PictureSelector, your incoming items now have an orderly structure. Let's say after some months you want to know where you downloaded "seq-06-015-04.jpg" from.  Locate your Firefox Profiles folder. There are a low of .psl (PictureSelecor Logfile)  files now. Each one contains the data of one download job. Sctoll to seq-06-015.psl and view it (it's a plain text file).

Links

PictureSelector for Greasemonkey


LoveMyProfile.com - Profile Counters
LoveMyProfile.com <3 Profile Counters

Copyright © kfx666 2010
All commercial brands and names are copyrighted by their respective owner. I gave my very best  to develop PictureSelector and PictureSelector Helper, but I cannot guarantee it's proper functioning, stability, and harmlessness, since this is a private project.