I want to use XYplorer as a library cataloging program
Re: I want to use XYplorer as a library cataloging program
1. Use my script to convert your tag.dat file (use the semicolon in the input dialog)
2. Apply the tweak (and ofc use the semicolon as the delimiter)
3. Add your tags inside XY as necessary...
2. Apply the tweak (and ofc use the semicolon as the delimiter)
3. Add your tags inside XY as necessary...
One of my scripts helped you out? Please donate via Paypal
Re: I want to use XYplorer as a library cataloging program
So, this will allow me to have a tag such as the one below without having the comma delimit the tag into two separate tags?highend wrote:1. Use my script to convert your tag.dat file (use the semicolon in the input dialog)
2. Apply the tweak (and ofc use the semicolon as the delimiter)
3. Add your tags inside XY as necessary...
"Surnames, Jewish—Lists and Histories"
?
-
admin
- Site Admin
- Posts: 64917
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: I want to use XYplorer as a library cataloging program
To put it this way: yes.
FAQ | XY News RSS | XY X
Re: I want to use XYplorer as a library cataloging program
Ok, I have the tag.dat file open in Notepad... Where do I insert your script within that file?Ryan wrote:highend wrote:1. Use my script to convert your tag.dat file (use the semicolon in the input dialog)
2. Apply the tweak (and ofc use the semicolon as the delimiter)
3. Add your tags inside XY as necessary...
Re: I want to use XYplorer as a library cataloging program
It's a script, not something that is pasted into an .ini file...Ok, I have the tag.dat file open in Notepad... Where do I insert your script within that file?
Menu - Scripting - Run Script
Paste my script into that box and hit ok.
One of my scripts helped you out? Please donate via Paypal
Re: I want to use XYplorer as a library cataloging program
Hey, wait. You should run this script. It's a modified version of highend's original script with a few fixes, or rather, updates.
HOWTOUSE: From XY main menu, select Scripting > Run Script. copy and paste this script code there, then press OK. Then follow direction that pop up.
edit: hotfixed a regexp mismatch!
edit: now it explicitly points out where to enter the delimiter
Remember to close that Notepad window you'd opened earlier without saving any changes to tag.dat
Also remember to separate newly added tags with the new separator that you're gong to pick.
HOWTOUSE: From XY main menu, select Scripting > Run Script. copy and paste this script code there, then press OK. Then follow direction that pop up.
Code: Select all
//rewrites tag database with modified tag separator at ini\Settings\TagsSeparator
//--changes from highend's original --
// some invisible handholding, updated disallowed separators list, reopens inputbox in case of invalid input,
// and most importantly, set the new tweak! :wink:
savesettings;
$tagFile = "<xydata>\tag.dat";
$tagFileContent = readfile($tagFile);
$tagFileHeader = gettoken($tagFileContent, 1, "Data:<crlf>");
$tagFileTags = gettoken($tagFileContent, 2, "Data:<crlf>");
$tagFileVer = regexreplace($tagFileContent, "(XYplorer File Tags v)(\d+)", "$2");
if ($tagFileVer < 3) { status "tag.dat file must be of version 3 (or later), aborted!", "8B4513", "stop"; end 1==1; }
$delim = '';
while ((strlen($delim)!=1) || (regexmatches($delim, "(\|\<|\>|\*|\?)"))){
$delim = input("Type new tag delimiter here", "Only single character delimiters are possible.<crlf>'<>|*?' are not allowed!", , , , 250, 150);
if (regexmatches($delim, "(\|\<|\>|\*|\?)")) { status "$delim is not allowed as a replacement delimiter!", "8B4513", "stop"; }
if (strlen($delim) > 1) { status "The delimiter can only be a SINGLE character!", "8B4513", "stop"; }
}
$newTags = "";
foreach($entry, $tagFileTags, "<crlf>") {
if !($entry) { continue; }
$tags = gettoken($entry, 3, "|");
if ($tags) {
$newTags = $newTags . regexreplace($entry, "^(.*?\|\d+\|)([^\|]*)(.*(?=$))", "$1" . replace($tags, ",", $delim) . "$3") . "<crlf>";
} else { $newTags = $newTags . $entry . "<crlf>"; }
}
if (confirm("Write the converted tag.dat file back?<crlf 2>(Advice: press OK)")) {
writefile($tagFile, $tagFileHeader . "Data:<crlf>" . $newTags);
}
setkey $delim, 'TagsSeparator', 'Settings';
echo "XYplorer will automagically restart now, don't worry.",' ',,0;
exit 'nr';edit: now it explicitly points out where to enter the delimiter
Remember to close that Notepad window you'd opened earlier without saving any changes to tag.dat
Also remember to separate newly added tags with the new separator that you're gong to pick.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
Re: I want to use XYplorer as a library cataloging program
Ok... Getting closer.
Where in the script do I specify my desired semicolon delimiter?
I appreciate both of you staying with me on this.
Where in the script do I specify my desired semicolon delimiter?
I appreciate both of you staying with me on this.
Re: I want to use XYplorer as a library cataloging program
HOWTOUSE: From XY main menu, select Scripting > Run Script. copy and paste this script code there, then press OK. Then follow directions that pop up.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
Re: I want to use XYplorer as a library cataloging program
Sorry, this is getting ridiculous...1. Use my script to convert your tag.dat file (use the semicolon in the input dialog)
One of my scripts helped you out? Please donate via Paypal
Re: I want to use XYplorer as a library cataloging program
Look, I don't have the expertise in this that the rest of you apparently have. I am trying to understand your instructions but you are assuming that I know my way around a procedure like this but I simply do not! "Use my script to convert your tag.dat file (use the semicolon in the input dialog)"... WHERE IS THE INPUT DIALOGUE??? I don't know where to put the semicolon.
Re: I want to use XYplorer as a library cataloging program
temper, temper.
Just follow my instructions up ^there^.
Just follow my instructions up ^there^.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
Linkaday
- Posts: 386
- Joined: 06 Aug 2007 14:40
- Location: Hamburg, Germany - Win 11 Home v24H2 x64 1920x1080 (100%)
Re: I want to use XYplorer as a library cataloging program
HTH
- Attachments
-
- DelimiterInput.jpg (507.81 KiB) Viewed 3620 times
Re: I want to use XYplorer as a library cataloging program
Hi Linkaday,
You are very kind - thank you. When I get to step 4, the popup says "Convert tag delimiter" rather than "Type new tag delimiter here." I type the semicolon in the field, hit enter, and the next popup says "Write the converted tag.dat file back?" I select ok, but that seems to cancel the process rather than to execute it.
I am running the trial version of the program: Is that what is preventing me from making progress?
You are very kind - thank you. When I get to step 4, the popup says "Convert tag delimiter" rather than "Type new tag delimiter here." I type the semicolon in the field, hit enter, and the next popup says "Write the converted tag.dat file back?" I select ok, but that seems to cancel the process rather than to execute it.
I am running the trial version of the program: Is that what is preventing me from making progress?
Re: I want to use XYplorer as a library cataloging program
Why does it seem so, did you take a look at the rewritten tag.dat?I select ok, but that seems to cancel the process rather than to execute it.
No.Is that what is preventing me from making progress?
One of my scripts helped you out? Please donate via Paypal
Re: I want to use XYplorer as a library cataloging program
It seems to cancel the process because this is what I type for tags:highend wrote:Why does it seem so, did you take a look at the rewritten tag.dat?I select ok, but that seems to cancel the process rather than to execute it.No.Is that what is preventing me from making progress?
Surnames, Jewish—Lists and Histories;
Jewish Identities
But this is what the new script turns that into:
Jewish Identities; Jewish—Lists and Histories; Surnames
My opinion is that the script is simply replacing the comma with a semicolon and breaking up the script the same way, only with a different delimiter.
XYplorer Beta Club