Placeholders as Commands on Custom Search Engines



  • THE FEATURE

    The ability to use more than one single placeholder for strings to send on a query to custom search engines.

    Example

    For a custom search engine defined with the t keyword, which is used to translate the text so much procrastination to French:

    User writes the following:
    t fr "so much procrastination"

    Which is then converted to the following possible placeholders:

    • %s – The entire entered text as it was written (like fr "so much procrastination");
    • %s1 – The first entered word or text entered inside quotes (like fr);
    • %s2 – The second entered word or text entered inside quotes (like so much procrastination (note that the quotes are not included on the string on this case));

    The following URL with the %s1 and %s2 placeholders:
    https://translate.google.com/#en/%s1/%s2
    Converts to:
    https://translate.google.com/#en/fr/so%20much%20procrastination

    And the following URL with %s placeholder:
    https://translate.google.com/#en/fr/%s
    Converts to:
    https://translate.google.com/#en/fr/"so%20much%20procrastination"

    POSSIBLE USES

    This feature would enable us to use custom search engines as if they were tools and accept multiple commands. In fact, this would be similar to a console command-line that is available on most Operating Systems.

    I use custom search engines not only to search for something, but also as tools. For example, I have Google Translate and dictionary sites as custom search engines, which I use like dic procrastinação to define the word procrastinação in a Portuguese dictionary or like t procrastination to translate the word procrastination to Portuguese using Google Translate.

    But sometimes I would like to have the ability to use something like t fr procrastination to translate the word procrastination to French. I would like to be able to send more than one query to the custom search engine — in this case, the queries fr and procrastination.

    Because this feature would only add additional placeholders and keep the existing %s placeholder unchanged, it would not affect users and would add more possibilities to the use of custom search engines on Vivaldi.



  • I tried to implement it as Java app: https://bitbucket.org/karelik/multisearch/overview
    Try to look at it.

    It can be useful in browser.



  • @aderitobonito First of all, really nice explanation. This idea seems a perfect fit for Vivaldi, i hope it gets implemented one day.


  • Moderator

    Do you want a Translate Submenu like Opera 12.18?



  • @karel-ulman Your idea of implementing this is very good! Although this would be best to have it built-in on the browser, its a nice alternative to have access to. :-D Thank you very much!

    @MasterLeo29 Thank you! I imagine this one should be easy to implement. Hope to have in on Vivalvi.

    @Pesala A translate submenu would indeed be very nice and I would definitely want to have it as one more feature on my browser. However, most of the translations I use to need are not written on web pages, they are, instead, words I read on books or somewhere else.


Log in to reply
 

Looks like your connection to Vivaldi Forum was lost, please wait while we try to reconnect.