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

Smarter hentag titles #840

Merged
merged 4 commits into from
Aug 29, 2023
Merged

Conversation

siliconfeces
Copy link
Contributor

This PR improves the success rate of the hentag plugin, when searching by title.

Before this PR, the plugin just picks the first search result if there's multiple. This usually works fine, but for entries in a series this can result in the wrong result being picked.

To solve this, this PR checks which hit seems to be most similar to the requested title. Still not 100% perfect, of course, but a notable improvement. Also, the magic sauce is added as a reusable function as other plugin makers might find it useful.

@siliconfeces
Copy link
Contributor Author

It requires a new cpan module, so that might be what causes the failures.

@Difegue
Copy link
Owner

Difegue commented Aug 29, 2023

The actions workflow normally uses a nightly container so cpan packages will work in tests post-merge, but I've had CI fail for a while due to the YAML package we added last time so I'm starting to think this isn't a very good way to proceed 🤓

I'll be modifying the workflow to process the cpanfile before running tests and come back to this PR in a bit.

@Difegue
Copy link
Owner

Difegue commented Aug 29, 2023

@siliconfeces fixed, feel free to rebase/merge on top of dev. ✌️ (can't believe that's not something GH allows maintainers to just do yet..)

@Difegue
Copy link
Owner

Difegue commented Aug 29, 2023

Thanks! This all looks good to me.

There technically already is a remove_spaces method in the existing Utils module, but I'll probably clean up after this PR to remove it in favor of Strings::trim.

@Difegue Difegue merged commit 2d0abd4 into Difegue:dev Aug 29, 2023
1 check passed
@holopin-bot
Copy link

holopin-bot bot commented Aug 29, 2023

Congratulations @siliconfeces, you just earned a holobyte! Here it is: https://holopin.io/holobyte/cllwkl9yi25510fjyfwk0afmk

This badge can only be claimed by you, so make sure that your GitHub account is linked to your Holopin account. You can manage those preferences here: https://holopin.io/account.
Or if you're new to Holopin, you can simply sign up with GitHub, which will do the trick!

@siliconfeces siliconfeces deleted the smarter_hentag_titles branch October 18, 2023 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants