Create a searchable catalog based on keywords and tags

Features wanted...
Post Reply
BillyMo
Posts: 2
Joined: 18 May 2025 11:11

Create a searchable catalog based on keywords and tags

Post 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.

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

Re: Create a searchable catalog based on keywords and tags

Post 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
To see the attached files, you need to log into the forum.
One of my scripts helped you out? Please donate via Paypal

BillyMo
Posts: 2
Joined: 18 May 2025 11:11

Re: Create a searchable catalog based on keywords and tags

Post by BillyMo »

THANKS for your help !

Post Reply