Database export options

Ideas for improvements and requests for new features in XnView MP

Moderators: XnTriq, xnview

zarlan
Posts: 53
Joined: Thu Apr 14, 2022 10:33 am

Database export options

Post by zarlan »

It would be good to have an option to create a copy of the XnView.db file for export, to another computer.
Where you can change choose which folders in the database, to include in the exported file (with the option to exclude specific sub-folders), and rename their paths, to the path that they have in the other computer. (I've tried to find a SQLite-tool, to do a search-and-replace of the file paths …but couldn't find a search-and-replace option. I found some option that replaces text, but it required me to specify something I didn't know anything about and… Well, TLDR: I failed)

This would be especially good, if one is directly connected to the computer, and the program can use that connection to let you browse the other computer and specify which folders on it, are equivalent to the folders on the local computer. (and let the program change the file-paths, to the path on the other computer)
Naturally, that would require it to interpret stuff like "smb://[computername]/c$/", and "/run/user/1000/gvfs/smb-share:server=[computername],share=c$/", and the like, and understand what the filepath would be called, on that computer. (this wouldn't really be an issue with windows-to-windows connections)
With *nix-to-*nix connections, as well as non-root shares (which would be most shares, I suppose …but my desktop computer, which is only in contact with my laptop, is safe to share the root, especially as it is password protected, anyway), I suppose one would probably still have to manually specify the local filepath of the share
…but any and all subfolders of the share, would automatically and accurately have their paths derived from that, which would still make it worth it

Doing it manually, with a database editor, is not an option for most people. (I'm a lot better with computers than most, and it's way too hard for me. Granted, I do intend to learn to use databases, and I suppose it wouldn't be that hard, once I do that, but… I'm not going to do that right away, and even when I do it will take time …and the vast majority of people, for whom this is a very desired feature [and there are many], have no intention of ever learning to use databases)
zarlan
Posts: 53
Joined: Thu Apr 14, 2022 10:33 am

Re: Database export options

Post by zarlan »

A possible alternative (which I think should be an option, either way), would be to create sidecar-files, for folders, which one can then copy to the equivalent folders on the other computer.
A lot messier, and requires more work, but would at least achieve the goal. In some cases, it may actually be a more preferable method.
It would also be a lot quicker/easier to implement, I imagine. (I'd still prefer it if both options were available, but… getting at least one, would be great)

Note that these should be distinct XnviewMP-sidecar, separate from XMP sidecars. I'm not entirely sure if XMP supports sidecars for folders at all, but sidecars for XMP/IPTC metadata should be separate (and have a separate extension) from sidecars for XnView-metadata …and both should be able to be used/made with XnViewMP.

Edit: It would be especially good, if the folder sidecar-files could contain metadata for more than one folder, using relative paths. That way I could export/import categories, using only a few sidecar-files.
zarlan
Posts: 53
Joined: Thu Apr 14, 2022 10:33 am

Re: Database export options

Post by zarlan »

BTW, with sidecar-files for folders, especially ones for folders that can include all sub-folders, it would be good to have the option of either letting XnView import the data in them to the XnView database, or (to save space and avoid redundant data usage …though redundancy can be desirable, of course) to use those instead of the XnView database, for those folders.
User avatar
xnview
Author of XnView
Posts: 37538
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Database export options

Post by xnview »

zarlan wrote: Thu Apr 14, 2022 1:25 pm It would be good to have an option to create a copy of the XnView.db file for export, to another computer.
Where you can change choose which folders in the database, to include in the exported file (with the option to exclude specific sub-folders), and rename their paths, to the path that they have in the other computer. (I've tried to find a SQLite-tool, to do a search-and-replace of the file paths …but couldn't find a search-and-replace option. I found some option that replaces text, but it required me to specify something I didn't know anything about and… Well, TLDR: I failed)
it's why you have a 'relocate' in settings>Catalog, but yes an export feature
Pierre.
zarlan
Posts: 53
Joined: Thu Apr 14, 2022 10:33 am

Re: Database export options

Post by zarlan »

xnview wrote: Wed May 04, 2022 12:24 pmit's why you have a 'relocate' in settings>Catalog, but yes an export feature
Eh, no.
Relocate changes the local/internal database. (how that works, I have no idea [and does it just change the database …or does it relocate the folder and its files, on the harddrive? There is no hint, that it doesn't, so maybe it does, maybe it doesn't. I have no way of knowing] …and there is no documentation to explain it)
If I use that, I would simply ruin the database on the computer I'm on (or relocate my files to places they're not supposed to be …though in this case, with paths on Windows vs Linux, it would just simply be impossible), rather than make one for the computer I want to export to.

Also, that would involve doing that, for countless individual folders. (see also: viewtopic.php?f=95&t=43242)