Hi, On 20/04/14 17:44, Alexander Wagner wrote: > Additionally, though I admit that I like python, I could > imagine that for your goal it might be worthwhile to check > dt's LUA engine from where you should have access the style > functions (cf. 7.2.1.10 in the dt manual). Most likely you > could then base your approach on a defined API without the > need to work on the database directly. Could result in a > longer living solution. I'm however not sure that all > necessary functions exist yet. Most likely the LUA freaks > could give you a helping hand there. > Before writing the python code, I looked into LUA. If there is a way to access presets and manipulate them from within LUA API, I missed it and would love to get some pointers.
It is possible to add options to DT via LUA and let those options call external program to manipulate the DB. This approach will involved issues with: - Backing up the DB before changing it - Accessing the DB while open by DT - Accessing DB of another DT from inside the current DT Since we are talking about SQLITE3 DB, I wouldn't try to update it from different processes at the same time without any backup. This is why I decided to go with python and work on off-line DBs. I wrote the script for a very specific need which I had. and published it because I believe others have the same need. I might try to build a real script (with GUI) that can handle presets (and maybe more objects) in a more full way. Right now what I have in mind is: - Backup/Restore (or/and Export/Import) for presets - List presets - Copy specific preset between 2 DBs - Copy all NEW presets from one DB to another (Copy unless already exist in the destination) - Force Copy of presets from one DB to another (If preset exist, overwrite it) - Central place to store user's presets only (and then users can just share presets file between them) Three things I concern about: 1. Before putting in the work, not sure what is the demand for those "features" 2. Such a program will requite a GUI and therefore will need some "installation" 3. It is reasonable that one of the next DT releases will separate presets from pictures management. ------------------------------------------------------------------------------ Start Your Social Network Today - Download eXo Platform Build your Enterprise Intranet with eXo Platform Software Java Based Open Source Intranet - Social, Extensible, Cloud Ready Get Started Now And Turn Your Intranet Into A Collaboration Platform http://p.sf.net/sfu/ExoPlatform _______________________________________________ Darktable-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/darktable-users
