Library Manager search improvement

I know this has been raised before but nothing happened for various reasons.
All that is required to make it better is to mandate that the metadata contain the exact (case, spacing) name of the include.
Example #include <MiniGrafx.h>
But the library name is "Mini Grafx," NOT MiniGrafx
This means the search does not find MiniGrafx, but if you are astute enough to just enter Grafx, then you find it. Entering Mini returns a hit list that is miles long, so it is therefore pretty much useless.

It is already a requirement that you use the exact case and spelling of the filename in the #include so what benefit do you envisage ?

When I do that I get zero hits.

Here is a sample

You didn't say that you were talking about the search in the Library Manager !

In any case, all it takes is a little common sense and you can find the library

Bob, the topic is Library Search Improvement.
It has nothing to do with common sense; the library does not always have metadata that matches the external world.
Indeed, most times it works, and some with a bit of guesswork, but I have had a few times where it took minutes to days to hit upon what the author dreamt up.
The entire existence of computers and software is to save time and money. I don't install games on my computers, so don't bother to go there.

What do you think that the compiler does when you #include a library ? Guess what, it searches for it in one of several locations depending on a number of factors. Can you see how your original post was not specific enough ?

Presumably you knew something about the library before you searched for it so using a sensible search term is not usually difficult. As usual when searching, less is often better

That rings a bell!

You are right, I fixed the Topic

The readily achievable solution I will suggest is to specify the library's primary header file via the includes property in the library metadata file:

https://arduino.github.io/arduino-cli/latest/library-specification/#libraryproperties-file-format

  • includes - (available from Arduino IDE 1.6.10) (optional) a comma separated list of files of the library to be
    added to the sketch as #include <...> lines. This property is used with the "Include library" command in the Arduino
    IDE. If the includes property is missing, all the header files (.h) on the root source folder are included.

In this specific case, the addition would look like:

includes=MiniGrafx.h

The content of this property is included in the Library Manager search for this exact reason:

This is a good opportunity to make contributions to libraries. The addition is relatively simple and quick, as well as being quite straightforward.

Beyond the obvious benefit of being easy for the contributor, these factors also make it much more likely that the contribution will actually end up being accepted. The average Arduino library maintainer created the library as a hobby project and can only maintain it in whatever scraps of free time they might find to dedicate to it. It can be difficult for a maintainer to find the time and motivation to tackle reviewing a complex or potentially controversial proposal from a contributor, and so it is too common for such proposals to be neglected. But a simple straightforward enhancement like this is easy for them to just accept as soon as it comes in.

You can further improve the chances of your proposal being accepted by making the effort to clearly communicate the reason for the change in your commit and pull request messages.

If you have any questions about making a proposal via a pull request on GitHub, just let us know and I'm sure we'll be able to assist.

I'm thinking a better choice is to never return zero results. Including some results with a low Levenshtein distance would certainly improve the search and would solve the include file problem.

The only advantage to that approach is we still get ;ousy results but something gets returned. I have never heard of that search type, is there code for Levenshtein?

Plethora of code. Including Java libraries which should make adding it to the IDE fairly easy.

In your example searching for “MiniGrafx” would have brought you happiness. A single edit on the library name results in a match. Compare that to the multiple edits necessary to match something like “Comet Button”.