brpaz/ulauncher-docsearch

Site personalization

max-bertinetti opened this issue · 7 comments

Hi @brpaz.

I added this three but laravel is not working:

    "laravel": {
        "name": "Laravel Docs",
        "description": "The PHP Framework for Web Artisans",
        "icon": "images/docs/laravel.jpg",
        "algolia_index": "docs",
        "algolia_application_id": "8BB87I11DE",
        "algolia_api_key": "8e1d446d61fce359f69cd7c8b86a50de",
        "url": "https://laravel.com/docs/7.x/"
    },
    "livewire": {
        "name": "Livewire",
        "description": "Livewire is a full-stack framework that makes building dynamic interfaces simple, without leaving the comfort of Laravel.",
        "icon": "images/docs/livewire.jpg",
        "algolia_index": "livewire-framework",
        "algolia_application_id": "BH4D9OD16A",
        "algolia_api_key": "cec0554d960fa30b4b0b610f372a8636",
        "url": "https://laravel-livewire.com/docs/quickstart/"
    },
    "pestphp": {
        "name": "PestPHP",
        "description": "Pest is a Testing Framework with a focus on simplicity. It was carefully crafted to bring the joy of testing to PHP.",
        "icon": "images/docs/pestphp.png",
        "algolia_index": "pestphp",
        "algolia_application_id": "BH4D9OD16A",
        "algolia_api_key": "d25b0b281fd72e7b8ce770857fff45bf",
        "url": "https://pestphp.com/docs/installation/"
    },

brpaz commented

Hello.

Please close your Ulauncher instance and start it from command line with:

ulauncher -v |& grep "docsearch" 

And paste here any relevant output like error messages.

This is the output trying to make a search for Laravel:

$ ulauncher -v |& grep "docsearch"                                                                                                                                                                      
2020-05-22 17:35:02,163 | INFO | ulauncher.api.server.ExtensionRunner: _run_process() | Extension "com.github.brpaz.ulauncher-docsearch" started. PID 5930
2020-05-22 17:35:02,386 | INFO | ulauncher.api.server.ExtensionController: handleConnected() | Extension "com.github.brpaz.ulauncher-docsearch" connected
2020-05-22 17:35:02,387 | DEBUG | ulauncher.api.server.ExtensionController: _send_event() | Send event PreferencesEvent to "com.github.brpaz.ulauncher-docsearch"
2020-05-22 17:35:18,318 | DEBUG | ulauncher.api.server.ExtensionController: _send_event() | Send event KeywordQueryEvent to "com.github.brpaz.ulauncher-docsearch"
2020-05-22 17:35:18,386 | DEBUG | ulauncher.api.server.ExtensionController: handleMessage() | Incoming response (KeywordQueryEvent, RenderResultListAction) from "com.github.brpaz.ulauncher-docsearch"
2020-05-22 17:35:19,557 | DEBUG | ulauncher.api.server.ExtensionController: _send_event() | Send event KeywordQueryEvent to "com.github.brpaz.ulauncher-docsearch"
2020-05-22 17:35:19,598 | DEBUG | ulauncher.api.server.ExtensionController: handleMessage() | Incoming response (KeywordQueryEvent, RenderResultListAction) from "com.github.brpaz.ulauncher-docsearch"
2020-05-22 17:35:22,364 | DEBUG | ulauncher.api.server.ExtensionController: _send_event() | Send event KeywordQueryEvent to "com.github.brpaz.ulauncher-docsearch"
2020-05-22 17:35:22,418 | DEBUG | ulauncher.api.server.ExtensionController: handleMessage() | Incoming response (KeywordQueryEvent, RenderResultListAction) from "com.github.brpaz.ulauncher-docsearch"
2020-05-22 17:35:22,508 | DEBUG | ulauncher.api.server.ExtensionController: _send_event() | Send event KeywordQueryEvent to "com.github.brpaz.ulauncher-docsearch"
2020-05-22 17:35:22,523 | DEBUG | ulauncher.api.server.ExtensionController: handleMessage() | Incoming response (KeywordQueryEvent, RenderResultListAction) from "com.github.brpaz.ulauncher-docsearch"
2020-05-22 17:35:22,659 | DEBUG | ulauncher.api.server.ExtensionController: _send_event() | Send event KeywordQueryEvent to "com.github.brpaz.ulauncher-docsearch"
2020-05-22 17:35:22,804 | DEBUG | ulauncher.api.server.ExtensionController: _send_event() | Send event KeywordQueryEvent to "com.github.brpaz.ulauncher-docsearch"
2020-05-22 17:35:22,948 | DEBUG | ulauncher.api.server.ExtensionController: handleMessage() | Incoming response (KeywordQueryEvent, RenderResultListAction) from "com.github.brpaz.ulauncher-docsearch"
2020-05-22 17:35:22,996 | DEBUG | ulauncher.api.server.ExtensionController: _send_event() | Send event KeywordQueryEvent to "com.github.brpaz.ulauncher-docsearch"
2020-05-22 17:35:23,103 | DEBUG | ulauncher.api.server.ExtensionController: handleMessage() | Incoming response (KeywordQueryEvent, RenderResultListAction) from "com.github.brpaz.ulauncher-docsearch"
2020-05-22 17:35:23,131 | DEBUG | ulauncher.api.server.ExtensionController: _send_event() | Send event KeywordQueryEvent to "com.github.brpaz.ulauncher-docsearch"
2020-05-22 17:35:23,256 | DEBUG | ulauncher.api.server.ExtensionController: handleMessage() | Incoming response (KeywordQueryEvent, RenderResultListAction) from "com.github.brpaz.ulauncher-docsearch"
2020-05-22 17:35:23,324 | DEBUG | ulauncher.api.server.ExtensionController: _send_event() | Send event KeywordQueryEvent to "com.github.brpaz.ulauncher-docsearch"
2020-05-22 17:35:23,406 | DEBUG | ulauncher.api.server.ExtensionController: handleMessage() | Incoming response (KeywordQueryEvent, RenderResultListAction) from "com.github.brpaz.ulauncher-docsearch"
2020-05-22 17:35:23,569 | DEBUG | ulauncher.api.server.ExtensionController: handleMessage() | Incoming response (KeywordQueryEvent, RenderResultListAction) from "com.github.brpaz.ulauncher-docsearch"
2020-05-22 17:35:23,572 | DEBUG | ulauncher.api.server.ExtensionController: _send_event() | Send event KeywordQueryEvent to "com.github.brpaz.ulauncher-docsearch"
2020-05-22 17:35:24,333 | DEBUG | ulauncher.api.server.ExtensionController: handleMessage() | Incoming response (KeywordQueryEvent, RenderResultListAction) from "com.github.brpaz.ulauncher-docsearch"

The data for algolia is taken for the same packages for Alfred or Albert app

brpaz commented

Hmm, I Can´t see anything special from that log. Can you try without the grep please? just ulauncher -v

brpaz commented

I tested with your json file and Laravel docs are indeed not working. Still, I can't see any error in the logs. which is very strange.

Pest documentation is working fine for me.

brpaz commented

. Sorry for the delay.
I found the issue with the Laravel docs. it seems your api key and index configurations are wrong. Please try with the following configuration:

{
    "laravel": {
        "name": "Laravel Docs",
        "description": "The PHP Framework for Web Artisans",
        "icon": "icons/laravel.png",
        "algolia_index": "laravel",
        "algolia_application_id": "BH4D9OD16A",
        "algolia_api_key": "7dc4fe97e150304d1bf34f5043f178c4",
        "url": "https://laravel.com/docs/7.x/"
    }
}

I am doing some refactors to the extension that will allow to load custom docsets, without need to add them to the extension. But if want to make a PR to add these ones, I would be glad.

I am also implementing a feature, that will allow to have multiple keywords, so for example instead of typing docs laravel you can just type laravel. This will only be possible for docsets that are within the extension as I need to add a new keyword.

Btw, I will add larevel by default to the new version

brpaz commented

Merged.

Type laradocs instead of docs laravel as a faster way to access the documentation.
Feel free to make a PR with Pest and Livewire.

I will close this issue.