Extreme Newbie, HELP! :)
straton at lampsacos.demon.co.uk
Tue Mar 2 19:08:55 CET 2004
In article <7dqdnck-z6KnNtnd4p2dnA at hereintown.net>, 43fan
<sleap at pennswoods.net> writes
>If there's a way that I can ask the user a series of approx. 4 questions, I
>can determine the location the file should be in, and the name it should be,
>based on the answers to those questions.
I have a similar task, and my solution (not yet implemented) uses
the non-printing internal annotations as an image identifier. Many
(?most?) formats have such a thing. See the -comment option of
ImageMagick or convert.
This internal annotation remains with the file if it is moved, and is
therefore much more reliable as an image identifier, particularly
if the image is saved to CD-ROM.
All other information about the image is text-based, and saved
within a relational data-base.
I'm no expert, but I don't like BLOBS (Binary Large Objects) in my
database tables, and I don't like them in CVS.
My scripts are based on index.py and saxthumbs.py from the
book `Python and XML' by Jones and Drake.
The overall design system is:
1. Original image saved to somewhere convenient. Could be photograph,
or scan, or original artwork. No need to be fussy over file-names
and directory at this stage, because many photographers may get it
Skill level required: scanning clerk, (i.e. low-skill)
2. Once a day, or in the middle of the night, or as often as you wish,
three batch scripts run.
The first, based index.py, creates a glorified listing in XML format, of
the approproiate part of your file system. It includes the internal
annotations (my 'file identity') if they exist.
The second one creates a unique file identity where one does not
already exist, and records it within the graphic file. It is not
for human consumption, so it can normally be calculated from the
original file owner, and the date-stamp of the file, or any other
way you wish.
The third script updates the main image-location table of the
database, which has the file identity as its key, and contains
the most recently know location of the file in the file-system.
This third script is a bit like `updatedb' on linux.
Skill level required: high to set it up, then zero because it
should be automatic.
3. From this database, software can create html or pdf forms that
display the graphic alongside whatever fields I wish users
to fill in. Normally I want a heading and caption, but you
can ask for whatever you wish.
The server saves the information returned to the database.
The skill-level for users at this stage is simply that
of filling in a form on a web-page, and pressing the
4, 5, 6, ...
Whatever you like: photo albums, croping, down-grading of colours
or dpi for bandwidth reasons, screen shows, graphics libraries,
optical character recognition, handwriting recognition, convert to
vector format, Etc.
More information about the Python-list