ThumbsPlus uses Python as its internal scripting language, and you can use it too. Python is not a difficult language to learn, and several of the existing features in ThumbsPlus are written mostly or all in Python.
ThumbsPlus version 8 uses Python version 2.7.1. It is likely that version 9 will use Python 3, but we haven't decided for sure. For information, tutorials, editors and more, please visit the official Python site at http://www.python.org.
Here is an example script, which moves thumbnails from the database to separate files. This option is designed for Access (.tpdb8) and Sqlite3 (.tpdb8s). Client/server databases should not have any trouble storing many terabytes within the database. The script is stored as:
_tp.doing_start(u'Moving Thumbnails to External Files', 3)
cnames = _tpd.colnames()
rowcnt = tpdb.get_count(u'Thumbnail')
basedir = tpdb.get_db_thumb_path()
if not os.path.isdir(basedir):
sqlcmd = u'select idThumb, thumbnail from Thumbnail where Thumbnail.thumbnail is not null'
rowres = _tpd.fetch()
if (not rowres):
id = rowres
thumb = rowres
if (thumb == None):
continue # Already moved I hope!
d1 = id / (1627 * 1627);
d2 = (id - (d1 * (1627 * 1627))) / 1627;
d3 = id % 1627;
filename = u'%s\\%03x\\%03x\\%03x.tn' % (basedir, d1, d2, d3)
if not os.path.isdir(filename[:7]):
print u'Unable to create folder <%s>' % filename[:7]
f = open(filename, 'wb')
print u'Unable to create thumbnail file <%s>' % filename
done += 1
tpdb.execute(u'update Thumbnail set Thumbnail.thumbnail = NULL')