Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fakku metadata plugin #662

Closed
polak14 opened this issue Jul 21, 2022 · 1 comment
Closed

fakku metadata plugin #662

polak14 opened this issue Jul 21, 2022 · 1 comment

Comments

@polak14
Copy link
Contributor

polak14 commented Jul 21, 2022

Some books that can be acquired in various ways are most often named like so:
[Artist] Title (img resolution) [Publisher]
Because the search results are most accurate when only the Title is given i added 2 new filters to get rid of
[Artist] Title (img resolution) [Publisher] making it a lot more accurate.

here is the script i used to test with, i didn't bother to remove spaces as it didn't seem to affect the search results but might as well do that too. Tested on a few hundred archives and it was close to 95% accurate with the only problems coming from works with multiple works but the same name like "Title 1" Title 2", but that's a limitation of the search not the plugin.

#! /usr/bin/perl
use v5.36.0;

my $title = "[Artist] Title (img resolution) [Publisher]";
$title =~ s/ -|'\w*|~|!|@//g;
# Removes everything inside [ ] as well as the brackets themselves
$title =~ s/\[([^\[\]]|(?0))*]//g;
# Removes everything inside () as well as the parentheses themselves
$title =~ s/\(.*$//g;
say $title;
@Difegue
Copy link
Owner

Difegue commented Oct 14, 2022

👍 Thanks for that!

@Difegue Difegue closed this as completed Oct 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants