Page 1 of 1

Create a searchable catalog based on keywords and tags

Posted: 18 May 2025 11:28
by BillyMo
Enable catalog creation using tags and relevant keywords


Is there already a function for this, or will one be implemented, or how can the following be solved?

A film, for example, has the name:
“HOLIDAY IN MALLORCA WITH HEIDI AND WERNER AT THE VILLAGE SQUARE WITH BEER”
The film is located in a directory on the hard drive.

Now, a catalog should be created with entries like:
MALLORCA
HEIDI
WERNER
VILLAGE SQUARE
BEER
SPAIN
EUROPE
BEACH
HOLIDAY
...

Of course, searching for parts of the film title is no problem — but how would it work if I wanted to search the film title using a term like SPAIN?

Thanks for help.

Re: Create a searchable catalog based on keywords and tags

Posted: 18 May 2025 12:22
by highend
The catalog can create "Click and Search: Tags" categories by e.g. right clicking on a category and from the context menu: Insert as New Category Here - Click and Search: Tags
This category can be updated via the context menu and will populate with all tags from the tag database so you only need a script to tag your movies

A basic one could look like this:

Code: Select all

    $remove = <<<>>>
a
and
at
in
of
the
to
too
with
    >>>;
    $pattern = "\b(" . replace($remove, <crlf>, "|") . ")\b";

    $items = quicksearch("/types={:Video}", 3:="s");
    end (!$items), "No video(s) found, aborted!";

    foreach($item, $items, <crlf>, "e") {
        $base  = gpc($item, "base");
        $words = regexmatches($base, "[^\W\d_]+", ","); // Capture only words
        $words = regexreplace($words, $pattern, ",");   // Remove all non-wanted words
        $words = recase($words, "u");                   // Uppercase all words
        tagitems("tags", $words, $item);
    }
It should be run at the root of a folder that contains videos...

To filter out non-wanted words, edit the $remove variable at the top and no, things like "VILLAGE SQUARE" as one tag aren't possible if you don't script further logic into it...
Animation.gif

Re: Create a searchable catalog based on keywords and tags

Posted: 20 May 2025 16:45
by BillyMo
THANKS for your help !