Another way to store Tag Database

Features wanted...
Post Reply
hoaphus
Posts: 3
Joined: 30 Apr 2017 18:47

Another way to store Tag Database

Post by hoaphus »

Hello, Tag is great feature of XYplorer, but I realise that managing Tag is quite inconvenient.
XYplorer uses a global DB is tag.dat to store all tagged files. I suggest that there is an option to store Local DB instead. It will have same location as the tagged files.
As far as I know, Two scripting commands are TagExport and TagLoad can handle Local DB. But they work like a way to back-up and restore Tag DB rather than a mechanism for storing Tag DB. My wish is‎ Tags can be read and written right to Local DB. This method will solve many problems that I found on the forum as well. ‎
I tried using Total Commander to comment a file. The program uses this such method to store data. I think it is not difficult to develop :D . I hope to see it in near future. 
Thank you!





P.s. My English is not good, sorry if I make you uncomfortable.

jupe
Posts: 3462
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Another way to store Tag Database

Post by jupe »

While your wish is considered by the developer, you may be interested in the following, if you are using an NTFS formatted drive you should check out this:

viewtopic.php?f=7&t=8587&p=76510#p76510

You could customize the script to meet your own needs, and it would enable you to save the tags, comments etc with the file, and you could use custom columns to read the data directly if you wanted.

You should also take a closer look at those scripting commands you mentioned, it is pretty easy to quickly export a local.db file to the current folder you are in, and then quickly import it when needed again for localized dbs.

hoaphus
Posts: 3
Joined: 30 Apr 2017 18:47

Re: Another way to store Tag Database

Post by hoaphus »

jupe wrote:While your wish is considered by the developer, you may be interested in the following, if you are using an NTFS formatted drive you should check out this:

viewtopic.php?f=7&t=8587&p=76510#p76510

You could customize the script to meet your own needs, and it would enable you to save the tags, comments etc with the file, and you could use custom columns to read the data directly if you wanted.
Thanks for your suggestion. I had a look at the thread. The script is quite complicated, so I may spend some time to study it. I think this solution is a bit similar to TagExport and TagLoad.

jupe wrote:You should also take a closer look at those scripting commands you mentioned, it is pretty easy to quickly export a local.db file to the current folder you are in, and then quickly import it when needed again for localized dbs.
Those scripting commands are useful but they don't meet all my needs. Local DBs are not be loaded automatically. Every time I want to see Tags, I have to run TagLoad manually. In order to save Tags, I have to run TagExport manually. It is not quite convenient way. Therefore, I can't create Local DB for every folder, they are suitable for backup purpose. I just use them for some parent folders or a whole drive.

jupe
Posts: 3462
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Another way to store Tag Database

Post by jupe »

I don't want to put words in the developers mouth, but my impression is that he likes the central database style storage, so if you are interested in making the loading a bit more automated in the meantime, then you could have a scripted custom column something similar to this:

Code: Select all

  if (exists("<curpath>\XYplorerTag.dat") && $foltag != <curpath>) {
    perm $foltag = <curpath>;
    return tagload("XYplorerTag.dat", 2); }
and then if a folder contains tags they would be loaded automatically when you navigate into a folder (as long as the CC is visible), then you would just need to export them manually on demand, which you could also script to automate. I didn't put much effort into this script so if you wanted to use it you would need to customize it to suit your needs exactly etc, but it is just an idea. To further automate it you could change the tagload flag to a 0 which will make it automatically pop up a confirmation to save changes too, when it is loading a different DB.

highend
Posts: 14955
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Another way to store Tag Database

Post by highend »

Btw, my shot on this...
ads.png
Alternate Data Streams v0.1.xys
These items need to be used in conjunction (as pairs: find and display items as a paperfolder,
select items in that paperfolder, use the belonging action):
Find tagged items (recursively)
Transfer tags from selected items to their fork
-
Find items with a fork (recursively)
Transfer tags from selected items to XYplorer
These items do the work without user intervention:
Find and transfer tags from items to their fork (recursively)
Find and transfer tags from items to XYplorer (recursively)
It's done with functions so it's a bit easier to extend (for own menu items) and it fixes two things:
- No need to manually setup an "id" (a guid is automatically created and used)
- Works fine with tags / comments that are multi-line (a <crlf> is present)
To see the attached files, you need to log into the forum.
One of my scripts helped you out? Please donate via Paypal

Post Reply