Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - mschnell

Pages: [1] 2 3 ... 7
1
ThumbsPlus v10 Questions / Re: Database upgrade
« on: 2021-02-05 06:33:27 »
After a long holdoff, waiting for confirmation that TP10 with SQLite 3 works decently fast, several Months, ago I did a Python program that performed the upgrade rather perfectly. It has some specific features that I needed but it easily could be modified to work in a more general way.
Here is the procedure:
 - Scan the files with TP10
 - Have the Python program copy the information stored inm the TP7 database to the TP1ß database

The program works something like this:
 - attach to both databases
 - Identify the files between the two  databases
 - move over information like keywords, galleries, Annotation etc partly including certain conversion for differences between TP7 and TP10-
 - the program features a simple GUI that shows states, problems, etc
 - it can be started multiple times with different  tasks to be done.

We work daily with TP10 and the upgraded database with no problems at all.

If anybody is interested please send me a note to mschnell at bschnell dot de.

-Michael

2
ThumbsPlus v10 Questions / Bacth scripts location?
« on: 2018-05-06 03:31:56 »
unfortunately this does not seem to work by simply moving pie.py and thumbs8.py to the .....\lib\thmpls folder :(

this file also states:

# print 'WE LIEK PIE (and noodels)!'

In fact we would like it, it we were able to make acquaintance ...

-Michael

3
ThumbsPlus v10 Questions / Bacth scripts location?
« on: 2018-05-06 03:12:25 »
Maybe there are some more helpful Python scripts in http://www2.cerious.com/binaries/cerious/python/ ?!?!?!?

-Michael

4
ThumbsPlus v10 Questions / Bacth scripts location?
« on: 2018-05-06 02:50:42 »
e.g. the pie.py file provided in the same package does:


_tp.set_command(20000, 2055, u"pie.tp_export()", u"Export DB", u"Export database tables to a text or XML file" )
_tp.set_command(20001, 2056, u"pie.tp_import()", u"Import DB", u"Import database tables from a text or XML file" )

and with that creates two entries in the "file" menu.

Really good to have this example....

-Michael

5
ThumbsPlus v10 Questions / Bacth scripts location?
« on: 2018-05-06 02:43:08 »
In fact the file "thumbs8.py" that comes with the "thumbs_py_update_0001" package provides some insight:

# thumbs8.py is imported when T+ starts up. Its main goal at this point is to align .py routines with menu selections.
# for example, importing pie.py will both define the routes for database export and import, and call an internal routine
# which sets them up as on the menu: _tp.set_command(id, python_cmd_string)
#
# Brute force for now: the commands are added to the File|Python menu, unless the ID already is on a menu, in which case
# it is replace. Either can be moved around by the user. In the future, we need to be able to place the items where
# desired, using command ids not already in use.



-Michael

6
ThumbsPlus v10 Questions / Bacth scripts location?
« on: 2018-05-06 02:25:56 »
I came to the same conclusion and I did ask ages ago :( .

Moreover, while it might be possible to reverse-engineer, from the Python files provided, how things can be done, I would need to provide menus etc to "my" users to make the extensions usable for them.  I seem to remember that I found that there are some files that define the menus and hence might be extended accordingly, but I don't suppose this is decently possible without any instruction.

Being able to do Python extensions, for me is the only reason to convert my users from TP7 to a new version, which would be a major task regarding the completely full and hence not easily convertible  database, the multiple scripts and Web gallery creating files an not really foreseen differences in usage (e.g. managing annotations).

-Michael

7
ThumbsPlus v10 Questions / Bacth scripts location?
« on: 2018-05-06 01:34:34 »
Ts there (finally) a usable description on how to do "extensions" in Python ?

-Michael

8
We use the database on a NAS. nearly 2 GByte "Access" Database. No speed issues at all.

-Michael

9
ThumbsPlus v10 Questions / TD4 Squeezer Tool
« on: 2017-05-13 06:56:53 »
Yep I would not publish a description unless it would be working.

A single glitch that I don't seem to be able to avoid is a database engine error that sometimes happens. It does not do much harm. Sometimes, after restarting the action the error does not happen with the the same picture and some more thumbnails are converted. Sometime the process always stops at the same picture. In that case same can be excluded (by deleting it from the gallery used by the process).

I doubt that it makes sense to do some "public" release. But if anybody is interested I will provide the executable on my Website (It should work on Windows > 7, no installation necessary.)

-Michael

10
ThumbsPlus v10 Questions / TD4 Squeezer Tool
« on: 2017-05-13 02:27:36 »
Astonishing, that seemingly nobody else has this problem any more. It had been discussed here several times.

-Michael

11
ThumbsPlus v10 Questions / TD4 Squeezer Tool
« on: 2017-04-28 10:21:29 »
Herer the help text of the tool:

License:

This software is a personal tool and provided publicly with the hope it might be useful.

Nonetheless it might behave erratically in any possible way.

Please be sure to have a decent backup of you database before using the tool



Motivation:

When using an “Access” type database for Thumbsplus, some day a limit is reached as the database file can't grow to more than 2 GByte in size.
“Compacting” the database will remove unused the information, that still might exist from previously deleted or replaced records, but one day the
database is just full.

TD4Squeezer will reduce the quality (and with that the needed space in the database) for a selected set of thumbnail images.

You can always recreate the full quality of the thumbnail image of one or more files when viewing them, just by hitting “F3” in Thumbsplus.


Usage:

At first you need to take care that the database is not completely full but there is some room for TD4-Squeezer top work with. To provide this, in
ThumbsPlus, you might need to delete the thumbnails of some of your pictures using the “Remove Thumbnail” function. Of course you don't need to delete the
pictures themselves. The files can stay unchanged in the directory.

Next you should compact the database using the “Database” menu in Thumbsplus.

Now you can select a number of files you are not likely to use in the near future and assign them to a gallery. Here, the “Find” menu can be helpful to
select complete directories with their subdirectories, or to select files older than some appropriate date. The default gallery name used by TD4-Squeezer is
“__squeeze” (starting with two underscore characters). It is not recommended to move a huge count of thumbnails in that gallery. This might not be very
handy. Instead you can quickly add files or even delete the gallery and recreate it at any point in time.

After this preparation TD4-Squeezer is started. It will ill reduce the quality of those thumbnail images that are in the gallery (default name “__squeeze”), if
they are bigger than a selectable count of bytes (500, 1000, 1500, or 2000). Hence starting a new squeezing (with the same size) run will only handle this
Thumbnail images that are not already small enough. Depending on the picture content, it might be impossible the squeeze the thumbnail image to the selected size.
In that case the process is stopped with a quality factor of 1 %. Those images will (unsuccessfully) be re-tried with the next run of TD4-Squeezer, if they are
still given in the gallery.

After the thumbnail images hve been squeezed, the database nees to be compressend in ThumbsPlus to finally reduce it's file size .



Details:

The database file is given in a text input field. By default it is “thumbs.TD4” in the same directory as the TD4-Squeezer program file.

The “Find” Button can be used to to locate the database file.

If the “Fake” checkbox is checked the modified information is not written into the database. This way the run for “TD4-Squeezer” can be tested.

If “Pause to watch” is checked each thumbnail picture will be shown in it's original and in its modified state will be shown for half a second. The checkbox
can be toggled while “TD4-Squeezer” is running.

The “Gallery” text field holds the name of the gallery you want to use to select the thumbnails to be squeezed. If this field is empty, all tumbnails that have a size
bigger than the max size will be squeezed. The default gallery name is “__squeeze”

The “max Size (Byte)” selection defines the quality of the resulting thumbnail images. It can be set to 500, 100, 1500 or 2000 Bytes. The default is 1500. The
JPEG quality factor is automatically set to a value that results in a size slightly smaller than the given limit.

The “max Conversion Count” stops the squeezing run after the given number of converted thumbnail pictures.

The “Start” button starts the squeezing according to the given parameters. When running it shows “Abort” and hitting it will stop the squeezing. The
process can be restarted with the same or new parameters if it had stopped because of the Conversion Count limit or the “Abort” button.

The “Count” display shows the current record counter and the cound of found records to be converted (if possible).

The “Converted” display shows the count of thumbnails already squeezed in this run.

In the bottom right corner the current thumbnail picture is displayed in the original and then in the squeezed state.

In the bottom left corner the status display shows the SQL statement used to find the appropriate thumbnails and then for each thumbnail the name,
width, height, JPEG quality (in %), information size (in Bytes) as well in the original as in the squeezed state.

12
ThumbsPlus v10 Questions / TD4 Squeezer Tool
« on: 2017-04-25 15:07:57 »
I am don't know how to make sure this will retain all relations to Galleries, Keywords, Annotations, etc.

-Michael

13
ThumbsPlus v10 Questions / TD4 Squeezer Tool
« on: 2017-04-25 01:13:44 »
Yep.

The original idea was an "incremental" use:
 - have the user create a gallery that contains the "not that important thumbnails".
 - shrink all those that are in that gallery and not already smaller than the selected maximum size.

So the user can easily manage the result and add items to the "squeezed" gallery.

It might be a nice idea to add an option to move all file in a new database (which supposedly would have been created by TP before) instead of doing the change in-place.

-Michael

14
ThumbsPlus v10 Questions / TD4 Squeezer Tool
« on: 2017-04-24 18:41:39 »
It works !!!

As I did suppose, "post"ing an updated (with th modified LOB containing the thumbnail JPEG) record in the database creates a new record and marks the old one as deleted. So the database size increases by using the tool and will only be reduced when compacting it.

-Michael

15
ThumbsPlus v10 Questions / TD4 Squeezer Tool
« on: 2017-04-21 18:39:39 »
> Anyway, it seems you got it to work! What development environment are you using? And did you find out if you still have to 'compact' the database afterwards?

As a development environment I use "Lazarus" (free Pascal IDE) enhanced by "ZEOS" Database access library.

Unfortunately, using this development system,  I was not yet able to write the updated records back in the database. Right now, I get an error message from the Access (=jet) database engine. I suppose I need to do some appropriate settings before writing.

-Michael

Pages: [1] 2 3 ... 7