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

like Find.find(query) explore Find.unfind(URI), to "decode" a URL into a "Find syntax" #94

Open
4www opened this issue Jul 25, 2023 · 0 comments

Comments

@4www
Copy link
Contributor

4www commented Jul 25, 2023

It could be interesting to see if from a URL it is possible to look for matching symbol and engines.

That way for example a <a href="https://github.com/internet4000/find"/> could be parsed, and:

  • could result in &gh internet4000 find
  • could be used to add a title="" with the find query value, as "usage example"
  • a utility to convert list of links (by new lines, like the queries in the node script), to a list of "equivalent" find queries
  • as a "translator" to input a URL/URI and get possible "find representation" to get the same resulting URL

For example, in the case of https://github.com/internet4000/find and pseudo code:

const my_url = "https://github.com/internet4000/find"
const result = Find.unfind(my_url)
console.log(unfind)
{
  input: "https://github.com/internet4000/find",
  matches: [
   {
      exact: true,
      output: "https://github.com/internet4000/find",
      query: "&ghi4k find"
    },
    {
      exact: true,
      output: "https://github.com/internet4000/find",
      query: "&gh internet4000 find"
    },
   {
      exact: false,
      output: "https://github.com/internet4000/find/issues",
      query: "*ghi_i4_find" // could be `*` a bookmark symbol, like firefox
    },
    [...]
  ]
}

Could test matching symbol.engines URLs from the domain, and their path, and figure if there are matching symbols to build such a resulting URL.

If there are domains matching, find from the "placeholder patterns" how to split the query and fit that in a URL, and compare to the originally requested result (and maybe stop if a few are exact match, or so that it feels like typing suggestions)

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

1 participant