awesome-cli
awesome-cli copied to clipboard
"Search" Functionality
It is not a must-do task but needs to be discussed.
- Check if possible to implement a search
- Local search or over a service
Hi, I like to do this task but if we want to use the promptui and make a seach for it, then it will be like this pic so are you ok with that?
Hi @azibom ,
Many thanks :), I really appreciate if you do this task. I could not see the pic you linked in the comment. Can you please check it?
Hi @umutphp, That is the first pic which is in the main page of the promptui (https://github.com/manifoldco/promptui) (and try to search "jajapeno")
ok :).
It is ok for me to use promtui for interface. But the main question is that what we will use for search service. A local storage or a service?
So you want to fetch all names and then search on it? , I thought you just want to search in the chosen layer
Oh, your idea is better than mine :). I think searching in the chosen layer will be very very ok. It is a pity for me that I did not thought in the way before :).
Hi @azibom ,
Any update or any question to discuss about the topic?
I do not want to bother you, but this feature feature will be a valuable addition to the tool.
Hi Thanks for your reminding, I think the good way is to fetch all the awesome tree names at the first (one problem is how work with this big tree and what is the best data structure for it) and then use the prompt-ui search for search at the first time (for example if you search for the "a" and we have two category "alex" and "abraham", that "alex" is in first layer in tree and "abraham" is in second layer in tree, we show both of them in the list but we consider there position in the tree) and for the next step we just use the select prompt So that is my idea first of all tell what do you think about my idea? And these are my other questions Is it logical and possible to fetch all the awesome tree at the first step? What is your idea about the data structure of the awesome tree that we want to work with it? Thanks @umutphp
Hi @azibom ,
When I created this issue, there were two kinds of search in my mind. First one is the one you explained in your former comment, a search in all of the awesome tree recursively. The second one is a quick search in the first layer of the existing tree node so that user should not walk through all the list to find the list. Let me explain both of the options and my opinions.
Option 1 Search In all Awesome Three For this, we need all the data of the awesome tree. So, we need to fetch all the data at the first step. But, I am not sure if it is feasible or not. It may also take too much time. And also I think that It may not be possible because the awesome lists are getting bigger and bigger. I think using a third-party service can be a wise solution for this option. There are already two search indexes contains all the awesome lists data under the related section of the main awesome repository. We can use them to perform the queries for user inputs. So, at the first step the user either makes a search or uses the menu to find the repository.
Option 2 Search In Existing Node For this, we do not need to fetch data. The search will be performed in the child data of the existing node. The data is already fetched to create the list under the node. So, the user can either search in the child nodes or uses the list to find the node.
To sum up, I think It is more feasible to implement the second option.