Page 1 of 1

Where is the Tags list persisted?

Posted: 05 Sep 2014 11:05
by fabvit2
After some trial I think I've discovered where the Tags list is persisted: in xyplorer.ini under the following section:

[Settings]
TagsList=Tag1, Tag2, ...

Now some questions.

Q1: Is this the right location where the Tags list is persisted, or it is persisted in some dedicated file?

Q2: Is there any limitation in the Tags list length? In my experience dealing with strings in .ini files (under Delphi) does have some limitation if the string is very large.

Q3: Is there some function to completely rebuild the Tags list *from* tags.dat?
I think that this feature *may* be useful if you forget to check the Add new tags to tag list checkbox, and later you do not remember a tag name but want to select tags from tag list:-)

thank you, fv

Re: Where is the Tags list persisted?

Posted: 05 Sep 2014 11:25
by highend
Hi and welcome to the forum.

1. Yes
2. Don could answer this from a technical pov. I've just created a tag list with 20.000 entries (each is 20 characters long) and it's working fine. Saved to a file that's 424kb of tags. No delayed startup, the Tools - List Management - Tag List... shows all 20k tags.
Should I test with more?
3. Not that I know of but I can easily write a script that will do what you need

A question for 3:
Rebuilding means for you: Ditch everything what's inside the current TagList and just rebuild it from the tag.dat file?

If that's the case, here is a script for the task:

Code: Select all

    // Import and process all tags from tag.dat
    $sep = "<crlf>";
    $impTags = gettoken(readfile("<xydata>\tag.dat"), 2, "Data:$sep");
    $impTags = formatlist(replace(regexreplace($impTags, "^(.*?\|0\|)(.*?(?=\|))(.*?$)", "$2"), ", ", $sep), "dents", $sep);

    // Now put all imported tags into the correct format for the .ini file
    $expTags = replace($impTags, $sep, ", ");

    // Insert the TagList into the .ini file
    setkey $expTags, "TagList", "Settings";

    msg "The TagList was rebuild. XYplorer will now be closed and restarted automatically...";
    exit "nr";

Re: Where is the Tags list persisted?

Posted: 05 Sep 2014 12:44
by fabvit2
+HighEnd thank you so much! The script you posted does exactly fit my needs :-)

Re: Where is the Tags list persisted?

Posted: 05 Sep 2014 21:08
by admin
fabvit2 wrote: Q2: Is there any limitation in the Tags list length? In my experience dealing with strings in .ini files (under Delphi) does have some limitation if the string is very large.

Q3: Is there some function to completely rebuild the Tags list *from* tags.dat?
I think that this feature *may* be useful if you forget to check the Add new tags to tag list checkbox, and later you do not remember a tag name but want to select tags from tag list:-)
Q2: No limitation. XYplorer does not use the Windows API for ini files (which indeed is limited) but its own unlimited functions.

Q3:

Code: Select all

v14.30.0404 - 2014-08-17 17:01
    + Toolbar: Added a new command to the right-click menu of the four 
      Tags-related buttons: "Update Tag List". Click it to update the tag list 
      to the tags currently used in tag.dat.