GNOME Bugzilla – Bug 690058
Install a search provider
Last modified: 2018-05-22 13:00:08 UTC
Install a search provider to index locally installed documentation (eg. Mallard & DocBook XML documents, HTML files) to allow users to search for user documentation from a single place. Downstream distributors and ISVs often distribute documents (Mallard & DocBook XML documents, HTML and PDF files) and install them into a common system-wide documentation directory (normally /usr/share/doc/). Currently, users can't easily access these documents via Yelp / Shell search without digging many levels deep into the file system. Somewhat related bug: #652057
Do you want links to all matching topics in all help documents to show up in the shell? That's how search worked in Yelp 2. It wasn't very useful. Also, I'm not touching /usr/share/doc/. It's a grab bag of assorted files with no specification on what's where. If you want your document in Yelp, use /usr/share/help/.
Some relevant background information: https://live.gnome.org/Design/Apps/Help
I think it would be quite useful to be able search for Unix man pages via the search provider.
FWIW we implemented this in Endless. I will try to upload a patchset here.
(Endless code at https://github.com/endlessm/yelp/commits/master)
Created attachment 370716 [details] [review] libyelp: keep passed-in URI alive while resolving parent The caller may release the last reference to the uri it passes in.
Created attachment 370717 [details] [review] src: handle --gapplication-service flag When we launch the application from D-Bus, we just pass in the --gapplication-service flag, where as yelp expects a file to be passed in as an argument. Make sure to only take the file codepath when a file is passed.
Created attachment 370718 [details] [review] yelp-uri: export default uri as YELP_GNOME_HELP_URI To avoid duplication, we export the default uri so it can be used across the project.
Created attachment 370719 [details] [review] Make application D-Bus launchable Changing the application to be launchable from D-Bus, we needed to rename desktop file according to yelp application ID. Also add the yelp service file and add --gapplication-service flag to it.
Created attachment 370720 [details] [review] src: add actions to yelp To be able to launch yelp via the search provider launch_search and activate_result functions, adjustments had to be made to yelp application. "show-page" action is used to display specific page. "show-search" action to display search page with results for given term.
Created attachment 370721 [details] [review] search-provider: add search provider
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/yelp/issues/72.